Skip to content

Fix playback of the user's own uploaded songs - #761

Merged
kushagrasinghx merged 1 commit into
kushagrasinghx:v1.8.1from
steeben:pr/uploaded-songs-playback
Oct 18, 2026
Merged

kushagrasinghx merged 1 commit into
kushagrasinghx:v1.8.1from
steeben:pr/uploaded-songs-playback

Conversation

@steeben

@steeben steeben commented Oct 12, 2026

Copy link
Copy Markdown

Hello, the main issue I've had with BitChord is that user-uploaded songs do not play. I vibe coded a fix that works in testing on my One Plus 15. I hope this can help fix the issue in the app.

Uploaded tracks are private to their owner. Asked for as ordinary tracks, the InnerTubeX extractor sends no login cookie on the media request, so the CDN refuses the stream and playback fails.

  • Recognise uploads when parsing library rows (delete-entity menu command or a PRIVATELY_OWNED video type) and remember them in UploadedTracks.
  • Ask InnerTubeX for known uploads with ContentHints(isUploaded = true); if an ordinary ask is refused while signed in, retry once as an upload straight away.
  • Fix the stream probe building a negative byte range (bytes=1048576--9223...) for hosts PlayerClient.rangeBytesFor() doesn't recognise, e.g. *.c.youtube.com. The server answered 416, which the probe read as a refusal, so valid streams were discarded. Also log why a probe refuses.
  • Play a known upload's only stream even if the probe objects.

@kushagrasinghx
kushagrasinghx changed the base branch from main to v1.8.1 October 12, 2026 10:10
@kushagrasinghx

Copy link
Copy Markdown
Owner

please add yourself as a primary author of the commit to list in contributors

Uploaded tracks are private to their owner. Asked for as ordinary tracks, the
InnerTubeX extractor sends no login cookie on the media request, so the CDN
refuses the stream and playback fails.

- Recognise uploads when parsing library rows (delete-entity menu command or a
  PRIVATELY_OWNED video type) and remember them in UploadedTracks.
- Ask InnerTubeX for known uploads with ContentHints(isUploaded = true); if an
  ordinary ask is refused while signed in, retry once as an upload straight away.
- Fix the stream probe building a negative byte range (bytes=1048576--9223...)
  for hosts PlayerClient.rangeBytesFor() doesn't recognise, e.g. *.c.youtube.com.
  The server answered 416, which the probe read as a refusal, so valid streams
  were discarded. Also log why a probe refuses.
- Play a known upload's only stream even if the probe objects.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HdCHy56wYcts5YGA8bYMXr
@steeben
steeben force-pushed the pr/uploaded-songs-playback branch from 2c8a43f to 92cf483 Compare October 15, 2026 18:32
kushagrasinghx added a commit that referenced this pull request Oct 18, 2026
#761 fixed the probe's overflowing range for hosts with no range cap by
capping every probe at 16 KiB, which also shrank googlevideo probes
below the 512 KiB-1 MiB the real fetch asks for — the size that catches
URLs that serve small reads and refuse playback-sized ones. Only the
uncapped case changes now: it asks for the rest of the file.

Also drop the second as-an-upload retry in
innerTubeXStreamAllowingUploads. innerTubeXStream already re-asks a
refused first stream as an upload while signed in; the extra pass put
up to three more extractions in front of every signed-in failure.
@kushagrasinghx
kushagrasinghx merged commit 4228862 into kushagrasinghx:v1.8.1 Oct 18, 2026
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.

2 participants