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

Enhancement: Allow direct stream selection for downloads on stream change Related Issue: #1484 #1626

Closed
wants to merge 7 commits into from

Conversation

Krishcode264
Copy link

Implementation Details

  • The selectNewStream function now dispatches an action that includes the selectedStreamId.
  • The Download service uses selectedStreamId to fetch the appropriate stream from the provider, ensuring the selected stream is downloaded.
  • Updated the getTrackItem utility to include selectedStreamId, defaulting to the first stream ID if selectedStreamId is not defined.

Benefits

  • This enhancement ensures that users can download the exact stream they select during playback, which improves the user experience by providing more control over the content they download.

Limitations

This PR does not fully implement verification service checks. It only ensures the selected stream ID is used for downloading.

Testing

  1. Verified that selecting a different stream updates the track's selectedStreamId.
  2. Confirmed that the download service uses the selectedStreamId if available.
  3. Ensured that the default stream is used if selectedStreamId is not set.

Notes for Reviewers

  • Please review the logic for handling selectedStreamId in the download service.
  • Feedback on any edge cases or potential improvements is welcome.

@Krishcode264 Krishcode264 changed the title Enhancement: Allow direct stream selection for downloads on stream change **Related Issue:** #1484 Enhancement: Allow direct stream selection for downloads on stream change Related Issue: #1484 Jul 7, 2024
@nukeop
Copy link
Owner

nukeop commented Jul 7, 2024

Hi, can you explain, conceptually, how this is going to work? The play queue and and the download queue are separate and independent, and don't influence each other, so I don't understand how this is supposed to do anything.

Can you also please not generate your PR descriptions with AI? It's a bunch of gibberish.

@nukeop nukeop added the AI slop This has been AI generated label Jul 7, 2024
@nukeop nukeop closed this Jul 7, 2024
@Krishcode264
Copy link
Author

@nukeop , i am sorry for that ,
we have multiple streams for each track , when a user adds an track to queue , it start to plays track.streams[0] the first stream which is available for that track , if user changes the stream for that song from play queue (by right clicking on that queue item ), it start to play that newly selected stream , but now if user add that stream to download what happens is that we only pass the track with uuid to downloading service which doesnt know what perticular stream user want to download for that track ,
so before it was always taking tracks[0].id in getStreamForId()

const tracks = await Youtube.trackSearchByString(query, undefined, false);
    const videoWithStream = await Youtube.getStreamForId(tracks[0]?.id, undefined);

what i did is that passed user's selectedStreamId to download that perticular track for that newly selected stream by user

 let videoWithStream: any;
    if (selectedStreamId) {
      videoWithStream = await Youtube.getStreamForId(
        selectedStreamId,
        undefined
      );
    } else {
      const tracks = await Youtube.trackSearchByString(query, undefined, false);
      videoWithStream = await Youtube.getStreamForId(tracks[0]?.id, undefined);
    }

was i able to clear things up ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI slop This has been AI generated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants