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

- [RDStationManager skipsLeft] returning 1 when call to [RDPlayer next] results in console message #179

Open
dherberger opened this issue Nov 4, 2015 · 0 comments

Comments

@dherberger
Copy link

it appears that the RDStationManager instance that we are examining to check remaining skips is in an odd state that is impacted by the number of tracks queued for the selected station. In testing, I was able to reproduce the issue and have the following logs that indicate that the [RDPlayer playAndRestart] call invoked by calling [RDPlayer next] is calling an index outside of the bounds of current track information and being ignored/reset:

NSLog: Station manager has 6 skips left
Console Message: -[RDPlayer playAndRestart:](555): play called with index 1 and queue length 1, ignoring.
NSLog: Station manager has 1 skips left
<[RDPlayer next] invoked>
NSLog: Station manager has 0 skips left
NSLog: Station manager has 0 skips left
Console Message: -[RDPlayer playAndRestart:](555): play called with index 2 and queue length 2, ignoring.
NSLog: Station manager has 1 skips left
<[RDPlayer next] invoked>
NSLog: Station manager has 0 skips left
NSLog: Station manager has 0 skips left
Console Message: -[RDPlayer playAndRestart:](555): play called with index 3 and queue length 3, ignoring.
NSLog: Station manager has 1 skips left
<[RDPlayer next] invoked>
NSLog: Station manager has 0 skips left
NSLog: Station manager has 0 skips left
Console Message: -[RDPlayer playAndRestart:](555): play called with index 4 and queue length 4, ignoring.
NSLog: Station manager has 1 skips left

At the start of the log, the Rdio instance and RDPlayer are set up. It appears that the RDStationManager still believes it has 6 skips remaining prior to initiating playback; this updates once -[RDPlayerDelegate rdioPlayerChangedFromState:toState:] reaches RDPlayerStatePlaying. Once playback is initiated, it updates to reflect 1 skip remaining. At this point, if a user requests a skip, the request causes the subsequent 0 skips left messages before encountering -[RDPlayer playAndRestart:](555): play called with index 2 and queue length 2, ignoring., which seems to reset the skip count to 1.

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

2 participants