Skip to content
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

Moving played items from queue into a history view. #70

Open
EHLOVader opened this issue Feb 26, 2015 · 5 comments
Open

Moving played items from queue into a history view. #70

EHLOVader opened this issue Feb 26, 2015 · 5 comments
Labels

Comments

@EHLOVader
Copy link

Instead of keeping the played items in the play queue, it might be nice to push them into another list view of past played items. This would also help for finding things you played recently.

@kingosticks
Copy link
Member

I think tracklist history was recently added to mopidy, could maybe make
use of that to do this.
On 26 Feb 2015 19:47, "Joseph Richardson" [email protected] wrote:

Instead of keeping the played items in the play queue, it might be nice to
push them into another list view of past played items. This would also help
for finding things you played recently.


Reply to this email directly or view it on GitHub
#70.

@jcass77
Copy link
Member

jcass77 commented Feb 1, 2016

As far as I know the Queue is actually just a visual representation of mopidy.core.TracklistController. So once the web client has seeded the tracklist, which tracks are in there and what happens to them once played is up to Mopidy and also depends on things like whether consume mode is enabled.

As of today, I don't think mopidy.core.HistoryController is quite ready to be integrated in frontend extensions as it does not emit any events that frontends can listen to at this stage.

So there is no practical way of implementing this that I can see, but this may change in the future.

@kingosticks
Copy link
Member

I've not remotely thought this through but can we do a getHistory() request back on tracklist and playback event changes?

@jcass77
Copy link
Member

jcass77 commented Feb 1, 2016

The Mopidy-Pandora extension also tries to interrogate the history on specific events: https://github.com/rectalogic/mopidy-pandora/blob/d6d7f073dda57eb59c3f350cea81a1505de28274/mopidy_pandora/frontend.py#L360-L374

The problem (that I found at least) is that it is not possible to tell exactly when the history will have been updated after receiving whatever event you are listening for. I ran into a few race conditions where the track just wasn't there yet when I checked the history.

I suppose it would also be possible to poll the history controller continuously, but that might be taking a step backwards seeing as we are trying to move away from polling (#40). What's really needed is a history_updated event, or something similar, that extensions can listen for and then act on accordingly.

@jcass77
Copy link
Member

jcass77 commented Feb 1, 2016

The Mopidy feature request to be notified of history changes has been logged: mopidy/mopidy#1420.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants