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

Fix LiveTV Playback #6166

Merged
merged 5 commits into from
Oct 8, 2024
Merged

Fix LiveTV Playback #6166

merged 5 commits into from
Oct 8, 2024

Conversation

viown
Copy link
Member

@viown viown commented Oct 5, 2024

Fixes LiveTV playback not working when specifying mediaSourceId

Changes

Issues
Fixes #6164

@viown viown requested a review from a team as a code owner October 5, 2024 05:52
@viown viown added regression We broke something bug Something isn't working labels Oct 5, 2024
@viown
Copy link
Member Author

viown commented Oct 5, 2024

@dmitrylyzo Also is mediaSourceId not working with live TV a server bug? (returns NoCompatibleStream). Would it be better to fix this on the server than workaround it here?

@dmitrylyzo
Copy link
Contributor

@dmitrylyzo Also is mediaSourceId not working with live TV a server bug? (returns NoCompatibleStream). Would it be better to fix this on the server than workaround it here?

Probably. Here and here MediaSourceId is superseded by LiveStreamId. Here it is not.
I don't know why we need 2 separate parameters or even why we can't use the item id as the source for LiveTV.

Possible fix: we can make them mutually exclusive:

if (mediaSourceId) {
query.MediaSourceId = mediaSourceId;
}
if (liveStreamId) {
query.LiveStreamId = liveStreamId;
}

    if (liveStreamId) {
        query.LiveStreamId = liveStreamId;
    } else if (mediaSourceId) {
        query.MediaSourceId = mediaSourceId;
    }

There was a regression in the server that was recently fixed. Made a comment on that issue. But now I think that it fails here. I am surfing the code from mobile and could be wrong.

@viown
Copy link
Member Author

viown commented Oct 5, 2024

I should note that liveStreamId isn't set by getPlaybackMediaSource

return getPlaybackInfo(player, apiClient, item, deviceProfile, mediaSourceId, null, options).then(function (playbackInfoResult) {

Copy link

@joshjryan joshjryan left a comment

Choose a reason for hiding this comment

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

I tested Live TV with these changes on the 10/7/24 10.10 build, and live TV works with these changes.
I did not do additional testing with DefaultAudioStreamIndex or DefaultSubtitleStreamIndex.

Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>
@thornbill thornbill added this to the v10.10.0 milestone Oct 8, 2024
Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
Copy link

sonarcloud bot commented Oct 8, 2024

@jellyfin-bot
Copy link
Collaborator

Cloudflare Pages deployment

Latest commit 07316cf870948483bd740a147b222282d2ab4818
Status ✅ Deployed!
Preview URL https://99ffe07a.jellyfin-web.pages.dev
Type 🔀 Preview

@thornbill thornbill merged commit a5427e8 into jellyfin:master Oct 8, 2024
12 checks passed
@viown viown deleted the fix-livetv-playback branch October 11, 2024 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working regression We broke something
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Live TV playback error
5 participants