mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-02-21 03:22:30 +00:00
More fixes
This commit is contained in:
@@ -55,6 +55,8 @@ export const ItemContent: React.FC<ItemContentProps> = React.memo(
|
||||
const [api] = useAtom(apiAtom);
|
||||
const isOffline = useOfflineMode();
|
||||
const { getDownloadedItemById } = useDownload();
|
||||
const downloadedItem =
|
||||
isOffline && item.Id ? getDownloadedItemById(item.Id) : null;
|
||||
const { settings } = useSettings();
|
||||
const { orientation } = useOrientation();
|
||||
const navigation = useNavigation();
|
||||
@@ -95,8 +97,6 @@ export const ItemContent: React.FC<ItemContentProps> = React.memo(
|
||||
useEffect(() => {
|
||||
// When offline, use the indices stored in userData (the last-used tracks for this file)
|
||||
// rather than the server's defaults, so MediaSourceButton reflects what will actually play.
|
||||
const downloadedItem =
|
||||
isOffline && item.Id ? getDownloadedItemById(item.Id) : null;
|
||||
const offlineUserData = downloadedItem?.userData;
|
||||
|
||||
setSelectedOptions(() => ({
|
||||
@@ -116,9 +116,8 @@ export const ItemContent: React.FC<ItemContentProps> = React.memo(
|
||||
defaultBitrate,
|
||||
defaultSubtitleIndex,
|
||||
defaultMediaSource,
|
||||
isOffline,
|
||||
item.Id,
|
||||
getDownloadedItemById,
|
||||
downloadedItem?.userData?.audioStreamIndex,
|
||||
downloadedItem?.userData?.subtitleStreamIndex,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user