New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change core.history.add() signature #1056

Closed
jodal opened this Issue Mar 19, 2015 · 3 comments

Comments

2 participants
@jodal
Member

jodal commented Mar 19, 2015

Take uri, name instead of a track that is simply converted to a track ref.

This makes the API also work for the use case of adding stream titles to the history.

@jodal jodal added this to the v1.0 - Audio cleanup 1 milestone Mar 19, 2015

@jodal jodal added the 1 - Ready label Mar 20, 2015

@adamcik

This comment has been minimized.

Member

adamcik commented Mar 20, 2015

Other thing regarding this, the add API should not be public. History is read only for anything outside of core.

@jodal

This comment has been minimized.

Member

jodal commented Mar 20, 2015

As in _add() or just internal through documentation?

@adamcik

This comment has been minimized.

Member

adamcik commented Mar 20, 2015

As in _add IMO

jodal added a commit to jodal/mopidy that referenced this issue Mar 20, 2015

core: Make history.add() private
Instead of changing the signature to add(uri, name) I opted for
renaming it to _add_track(track).

Since it's internal we may change it whenever we like to. Since you need
different logic for extracting an interesting name from a track and from
a ref or a stream title, it makes sense to add another method for adding
refs/stream titles to the history when that time comes.

Fixes mopidy#1056

@jodal jodal self-assigned this Mar 20, 2015

@jodal jodal added 3 - Done and removed 1 - Ready labels Mar 20, 2015

jodal added a commit to jodal/mopidy that referenced this issue Mar 20, 2015

core: Make history.add() private
Instead of changing the signature to add(uri, name) I opted for
renaming it to _add_track(track).

Since it's internal we may change it whenever we like to. Since you need
different logic for extracting an interesting name from a track and from
a ref or a stream title, it makes sense to add another method for adding
refs/stream titles to the history when that time comes.

Fixes mopidy#1056

jodal added a commit to jodal/mopidy that referenced this issue Mar 20, 2015

core: Make history.add() private
Instead of changing the signature to add(uri, name) I opted for
renaming it to _add_track(track).

Since it's internal we may change it whenever we like to. Since you need
different logic for extracting an interesting name from a track and from
a ref or a stream title, it makes sense to add another method for adding
refs/stream titles to the history when that time comes.

Fixes mopidy#1056

@jodal jodal removed the 3 - Done label Mar 20, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment