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

Check track before sending to youtube wrapper or spotify #232

Merged
merged 2 commits into from
Jul 19, 2019

Conversation

koderjoker
Copy link
Contributor

Description

Closes #230

Verifies a track number's presence in the youtube/spotify channel before sending it to their respective wrapper, if not present sends the next track in order.

audioSource = find(tracklistToShow, track => track.trackNumber === trackToHighlight);

// If selected track not null find info for selcted track, else find for first track of list of selected channel
audioSource = trackSelected ? tracklistToShow.find(t => t.trackNumber === trackSelected) : tracklistToShow.find(t => t.trackNumber >= 1);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious what happens when a CD is presented with a track number of 0. This album, for example, ripped the media before the first track marker as "Hidden track one audio". With this change wouldn't the player always skip that 0th track?

https://archive.org/details/cd_burn_sister-machine-gun

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case track 0 is actually assigned the trackNumber 1 (and we're only depending on trackNumber to decide the track to be loaded)

track 0
Screen Shot 2019-07-19 at 3 06 00 PM

track 1
Screen Shot 2019-07-19 at 3 06 10 PM

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@iisa iisa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! solution is lightweight, clean, and elegant.

@iisa iisa merged commit 75d9805 into master Jul 19, 2019
@iisa iisa deleted the 230-recheck-track-for-youtube-spotify branch August 1, 2019 20:02
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.

Stop youtube player from loading first track as default
3 participants