Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.

Radiant unloves now playing track #390

Closed
chrismou opened this issue Oct 28, 2015 · 4 comments
Closed

Radiant unloves now playing track #390

chrismou opened this issue Oct 28, 2015 · 4 comments
Assignees
Milestone

Comments

@chrismou
Copy link
Member

Running radiant through a web debugging proxy, I've noticed that the app seems to randomly unlove tracks multiple times (!).

This seems to get worse as it gets further down the playlist. As the 3rd song starts, I'm seeing the following:

  • It unloves the 2nd track
  • It unloves the 3rd track 3 times
  • It tells last.fm the 3rd track is "now playing" (expected behaviour)
  • It scrobbles the 2nd track (expected behaviour)

This isn't visible in the master branch currently, as scrobbling seems to be broken (see #388 (comment)) but once it's working again, I expect this issue will be back.

@chrismou
Copy link
Member Author

Confirmed, still an issue. Investigating.

@chrismou chrismou self-assigned this Nov 30, 2015
@chrismou
Copy link
Member Author

All the extra notifications are being caused by this line: https://github.com/chrismou/radiant-player-mac/blob/master/radiant-player-mac/js/main.js#L248

Commenting out stops extra notifications, but also stops last.fm loved track notifications on thumb up

@chrismou
Copy link
Member Author

I think I've got it - it makes multiples calls to the api, which is rubbish but not the end of the world. The issue arises when the song moves from a loved track to an unloved track - notifySong is called with the "unloved" rating, but uses currentTitle - which isn't updated to the new song until later in the JS, which means the previous track in unloved instead of the current one.

Theoretically this is a simple fix. Just needs a bit more testing.

@chrismou
Copy link
Member Author

chrismou commented Dec 1, 2015

Fixed in #426

@chrismou chrismou closed this as completed Dec 1, 2015
@jacobwgillespie jacobwgillespie added this to the v2.0.0 milestone Dec 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants