mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #6166 from viown/fix-livetv-playback
Fix LiveTV Playback
This commit is contained in:
commit
a5427e8585
1 changed files with 10 additions and 2 deletions
|
@ -22,6 +22,7 @@ import { MediaType } from '@jellyfin/sdk/lib/generated-client/models/media-type'
|
|||
|
||||
import { MediaError } from 'types/mediaError';
|
||||
import { getMediaError } from 'utils/mediaError';
|
||||
import { BaseItemKind } from '@jellyfin/sdk/lib/generated-client/models/base-item-kind.js';
|
||||
|
||||
const UNLIMITED_ITEMS = -1;
|
||||
|
||||
|
@ -2573,8 +2574,15 @@ export class PlaybackManager {
|
|||
}
|
||||
|
||||
const apiClient = ServerConnections.getApiClient(item.ServerId);
|
||||
const mediaSourceId = playOptions.mediaSourceId || item.Id;
|
||||
const getMediaStreams = apiClient.getItem(apiClient.getCurrentUserId(), mediaSourceId)
|
||||
let mediaSourceId;
|
||||
|
||||
const isLiveTv = [BaseItemKind.TvChannel, BaseItemKind.LiveTvChannel].includes(item.Type);
|
||||
|
||||
if (!isLiveTv) {
|
||||
mediaSourceId = playOptions.mediaSourceId || item.Id;
|
||||
}
|
||||
|
||||
const getMediaStreams = isLiveTv ? Promise.resolve([]) : apiClient.getItem(apiClient.getCurrentUserId(), mediaSourceId)
|
||||
.then(fullItem => {
|
||||
return fullItem.MediaStreams;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue