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

"Next track button" does not behave as expected #76

Open
hlgirard opened this issue Mar 25, 2016 · 30 comments
Open

"Next track button" does not behave as expected #76

hlgirard opened this issue Mar 25, 2016 · 30 comments
Assignees

Comments

@hlgirard
Copy link

The "Next track" button skips backwards within the track instead of going to next track.
My configuration: Spotmop 2.6.2 running on a Raspberry Pi 3 (Raspian Jessie) and accessed from Chrome 49.0.2623.87.

@jaedb
Copy link
Owner

jaedb commented Mar 30, 2016

@hlgirard what version of Mopidy are you running?

@jaedb jaedb self-assigned this Mar 30, 2016
@jaedb jaedb added the bug label Mar 30, 2016
@hlgirard
Copy link
Author

hlgirard commented Apr 3, 2016

I have version 2.0.0 of Mopidy installed with apt-get and kept up to date. I just updated all packages and the abnormal behavior is still happening.

@jaedb
Copy link
Owner

jaedb commented Apr 3, 2016

@hlgirard I haven't been able to replicate this issue just yet, but I'll try a few more combinations. I don't have a Raspberry PI 3 to test on (only 1B+ and 2) but I wouldn't expect this to have any impact on this issue.

Are you able to give me an example tracklist of URIs that you experience this on? Do you experience this issue when using the interface from Firefox or another modern browser?

@hlgirard
Copy link
Author

hlgirard commented Apr 7, 2016

@jaedb It happens for all tracks grabbed from my spotify account. An example URI would be the following: spotify:playlist:0eDq2STmk8tKcD7qWCwrze

The issue happens on both Chrome and Safari (running on a mac). The back button works exactly as expected. The next button, however, seems to restart the track playback, without restarting the timing counter and progression bar, though.

Edit: Added a screenshot showing the time counter going above the track length in a case where I tried to skip to the next track but the current track just restarted instead.
screeshot_spotmop_nextbutton

Edit2: I have tried to uninstall and reinstall spotmop through pip but the issue persists.

@ddelnano
Copy link

I have the opposite problem where the next track button works fine but the previous button does not work.

Don't think that this should matter but I am running mopidy on a raspberry pi 3.

@ddelnano
Copy link

Maybe an I not understanding the queue correctly? Once a song completes am I not able to go back and replay it? Thats what I was trying to do and I can restart the current song but not replay the song before the current one.

@jaedb
Copy link
Owner

jaedb commented Apr 13, 2016

@hlgirard thanks for that screenshot, it helps explain in more detail what is happening. I suspect there is something funky going on with the Mopidy backend, rather than the Spotmop web frontend.

Are you savvy with the command line interface? Perhaps you could try another front-end to debug the Mopidy backend. I personally use the mpd commandline for this. Then you'd be able to perform the next track commands and identify if the issue still occurs (ie mpd next).

@ddelnano Do you have Consume mode enabled? This removes tracks as they get played, so previous track is not really a thing.

@jaedb
Copy link
Owner

jaedb commented Apr 13, 2016

@hlgirard I'm making progress! I have managed to replicate some funky behavior, similar to what you're experiencing. Can you please try disabling Consume mode and seeing if this fixes the issue?

@ddelnano
Copy link

Ah I was wondering what consume mode was. That makes perfect sense now.

@hlgirard
Copy link
Author

@jaedb Thanks for getting back to us. I have done a bit more testing and can confirm that:

  1. The issue does not happen with another front end (I used MusicBox to test)
  2. The issue happens regardless of whether Consume mode is enabled.

@jaedb
Copy link
Owner

jaedb commented Apr 13, 2016

@hlgirard are you able to try an interface reset for me? Under Settings, check Enable advanced settings and click Reset all settings. This should have little effect, but worth trying.

@hlgirard
Copy link
Author

@jaedb Just did. It did not have any effect

@jaedb
Copy link
Owner

jaedb commented Apr 18, 2016

@hlgirard Side thought... have you got Echonest enabled?

@hlgirard
Copy link
Author

No, I don't.

@jaedb
Copy link
Owner

jaedb commented Sep 4, 2016

@hlgirard The latest release of Spotmop revisits the play progress detection (which addresses some issues with inaccurate position data). I'm hoping that this will have some impact on the issue you're experiencing. Can you please update and confirm?

@jaedb jaedb added the stale label Sep 10, 2016
@ghost
Copy link

ghost commented Oct 16, 2016

Having this issue as well. If I'm listening to an album and press the next button in the bottom left corner, nothing happens. Same as the next button on the now playing, but mpc next works fine.

@fss
Copy link

fss commented Oct 16, 2016

same for me, version 2.10.1, also I can't use "previous" button anymore.

@jaedb
Copy link
Owner

jaedb commented Oct 16, 2016

Hmm, this is such a weird issue as I have been unable to replicate it across a number of devices. Is there any difference if you toggle consume mode?

@fss It may sound like a silly question, but is there a previous track to play? Ie are you at the top of the tracklist?

@ghost
Copy link

ghost commented Oct 17, 2016

@jaedb the previous button goes to the previous track fine works for me, and when in consume mode it simply goes to the beginning of the track.

@fss
Copy link

fss commented Oct 17, 2016

@jaedb yes, of course there is next and the previous track available :) works OK e.g. with Mopify, for me it's only broken with Stopmop in the latest version

@ghost
Copy link

ghost commented Oct 21, 2016

seems like "Add to library" no longer works for albums as well.

@mczerski
Copy link

mczerski commented Dec 4, 2016

@jaedb I have also problem with not working next button. i'm using version 2.10.1. i wan't to try to debug this problem but i'm a python developer and i don't have any experience with java script or html. If You could tell me what can i do to debug this problem i would be very glad.

maybe i ask a specific question.
i can see in webpage source which lines are responsible for next button and i believe this is src/app/queue/template.html:39
but what happens if i click on this button, which part of the code executes ?

@jaedb
Copy link
Owner

jaedb commented Dec 4, 2016

This uses a PlayerService model, which you can see here: https://github.com/jaedb/spotmop/blob/master/src/app/player/service.js

I'm full swing in development of a revamped version of Spotmop, called Iris. You could try running Iris to see if you experience the same issues.

@mczerski
Copy link

mczerski commented Dec 4, 2016

i'm using chromium. i openned "Developer Tools" and picked console. when i hit next button I can see exception thrown :)
app-annotated.js:12121 TypeError: Cannot read property 'url' of undefined
at Object.next (app-annotated.js:36477)
at Object.next (app-annotated.js:35293)
at n.a.next (app-annotated.js:34751)
at fn (eval at compile (app-annotated.js:12936), :4:203)
at app-annotated.js:28656
at n.$eval (app-annotated.js:15579)
at n.$apply (app-annotated.js:15678)
at HTMLSpanElement. (app-annotated.js:28656)
at HTMLSpanElement.dispatch (app-annotated.js:3)
at HTMLSpanElement.b.dispatch (app-annotated.js:29051)

exception is raised at src/app/services/mopidy/service.js:335

@mczerski
Copy link

mczerski commented Dec 5, 2016

i tried to check if setting picture in my spotify account will eliminate the problem but aparently it is harded to do compared to just removing this one line of code ... which eliminates the problem. so i suppose the problem occurs only when spotify account is not connected with facebook - so there is no account picture.

@jaedb
Copy link
Owner

jaedb commented Dec 7, 2016

@mczerski is this related to navigating to the next track? Or a separate concern?

@jaedb jaedb added the Iris label Dec 7, 2016
@mczerski
Copy link

mczerski commented Dec 7, 2016

yes, it is related to the next track problem

@abandisch
Copy link

@jaedb I had the same issue as @mczerski, i.e. I'd get TypeError: Cannot read property 'url' of undefined when clicking the 'Next' button. I found it was specifically related to this if statement in app.js

if( spotifyuser ) icon = spotifyuser.images[0].url;

My spotifyuser variable doesn't bring back any images, so I changed the if statement to this:

if( spotifyuser.images[0] ) icon = spotifyuser.images[0].url;

Clicking the 'next' button seems to work now. Thanks for all your hard work on this. Looking forward to upgrading to Iris.

@jaedb
Copy link
Owner

jaedb commented Dec 22, 2016

@abandisch Good spotting! It may need to be:
if( spotifyuser && spotifyuser.images[0] ) icon = spotifyuser.images[0].url;
to also ensure we have a spotify user (as when not authorized, there is no spotifyuser).

Have you had a chance to have a play with Iris (currently in beta)? It'd be interesting to see if you experience the same issue on the new platform.

@abandisch
Copy link

@jaedb Yeah true - looking at the code again, it does make sense to ensure there is a spotify user first. I prefer your solution.

I did actually have a go with Iris as well to check out the 'Next' button and works correctly there, so all good there. Since it's under active development, I reverted back to Spotmop to see if I can track down the issue.

Just an FYI - I'm running Mopidy and the Spotmop extension on a Raspberry Pi 3 (with Hifiberry DAC+ - in case that matters) - I literally just found out about Spotmop, and by extension Iris, today, but if you need any help with testing on Raspberry Pi 3, I'd be happy to help out if I can (I'm not a pro javascript dev, but I can certainly use chrome dev tools to pin point an issue if need be).

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

No branches or pull requests

6 participants