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

Allow addPlay to specify index #1814

Closed
wants to merge 2 commits into from
Closed

Allow addPlay to specify index #1814

wants to merge 2 commits into from

Conversation

gilphilbert
Copy link
Contributor

Enhance addPlay to allow the selection of a track index. Used as:

`io.emit('addPlay ', { list: [ { "uri" : "..." }, { "uri" : "..." } ], index: 1 });

Would add two tracks to the queue and play the second track.

@xipmix
Copy link
Contributor

xipmix commented Oct 2, 2019

A couple of questions/comments:

  • this would be clearer
                  if (data.index != undefined) {
                      index=data.index;
                  }

or even
if (data.index != undefined) index=data.index;

  • Missing ; on this line?
    self.commandRouter.addQueueItems(tracks)
  • too much Indentation on the line below?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@gilphilbert
Copy link
Contributor Author

Thanks xipmix. This was taken from my dev machine, surprised it works with the missing semicolon - I missed that.

I've corrected the whitespace (as well as updating for 4-space indenting to match the rest of the file) and changed the if statement to include braces.

@xipmix
Copy link
Contributor

xipmix commented Dec 31, 2019

This is indeed conflicting, I tried a test merge with 2488f38. It would be nice if github flagged such PRs in the summary list, I thought it used to do that. Do authors get a ping from github when their PR starts to conflict? I guess not.

Care to respin? Also I'm not clear how the variable e gets initialised now.

@gilphilbert
Copy link
Contributor Author

Will respin, closing this PR

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

Successfully merging this pull request may close these issues.

None yet

2 participants