spotmop icon indicating copy to clipboard operation
spotmop copied to clipboard

"Next track button" does not behave as expected

Open hlgirard opened this issue 10 years ago • 30 comments

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.

hlgirard avatar Mar 25 '16 20:03 hlgirard

@hlgirard what version of Mopidy are you running?

jaedb avatar Mar 30 '16 23:03 jaedb

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.

hlgirard avatar Apr 03 '16 23:04 hlgirard

@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?

jaedb avatar Apr 03 '16 23:04 jaedb

@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.

hlgirard avatar Apr 07 '16 23:04 hlgirard

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 avatar Apr 13 '16 17:04 ddelnano

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.

ddelnano avatar Apr 13 '16 17:04 ddelnano

@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 avatar Apr 13 '16 20:04 jaedb

@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?

jaedb avatar Apr 13 '16 20:04 jaedb

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

ddelnano avatar Apr 13 '16 22:04 ddelnano

@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.

hlgirard avatar Apr 13 '16 22:04 hlgirard

@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.

jaedb avatar Apr 13 '16 23:04 jaedb

@jaedb Just did. It did not have any effect

hlgirard avatar Apr 14 '16 00:04 hlgirard

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

jaedb avatar Apr 18 '16 20:04 jaedb

No, I don't.

hlgirard avatar Apr 18 '16 21:04 hlgirard

@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 avatar Sep 04 '16 22:09 jaedb

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.

ghost avatar Oct 16 '16 03:10 ghost

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

fss avatar Oct 16 '16 07:10 fss

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?

jaedb avatar Oct 16 '16 19:10 jaedb

@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.

ghost avatar Oct 17 '16 00:10 ghost

@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

fss avatar Oct 17 '16 05:10 fss

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

ghost avatar Oct 21 '16 21:10 ghost

@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 ?

mczerski avatar Dec 04 '16 15:12 mczerski

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.

jaedb avatar Dec 04 '16 20:12 jaedb

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 avatar Dec 04 '16 20:12 mczerski

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.

mczerski avatar Dec 05 '16 15:12 mczerski

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

jaedb avatar Dec 07 '16 21:12 jaedb

yes, it is related to the next track problem

mczerski avatar Dec 07 '16 21:12 mczerski

@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.

abandisch avatar Dec 22 '16 17:12 abandisch

@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.

jaedb avatar Dec 22 '16 19:12 jaedb

@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).

abandisch avatar Dec 22 '16 22:12 abandisch