mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-03-18 23:36:22 +00:00
wip
This commit is contained in:
@@ -907,6 +907,12 @@ export default function SettingsTV() {
|
||||
}
|
||||
disabled={isModalOpen}
|
||||
/>
|
||||
<TVSettingsToggle
|
||||
label={t("home.settings.appearance.show_home_backdrop")}
|
||||
value={settings.showHomeBackdrop}
|
||||
onToggle={(value) => updateSettings({ showHomeBackdrop: value })}
|
||||
disabled={isModalOpen}
|
||||
/>
|
||||
|
||||
{/* User Section */}
|
||||
<SectionHeader title={t("home.settings.user_info.user_info_title")} />
|
||||
|
||||
@@ -928,6 +928,23 @@ export default function page() {
|
||||
router,
|
||||
]);
|
||||
|
||||
// TV: Add subtitle file to player (for client-side downloaded subtitles)
|
||||
const addSubtitleFile = useCallback(async (path: string) => {
|
||||
await videoRef.current?.addSubtitleFile?.(path, true);
|
||||
}, []);
|
||||
|
||||
// TV: Handle server-side subtitle download (needs media source refresh)
|
||||
// Note: After downloading via Jellyfin API, the subtitle appears in the track list
|
||||
// but we need to re-fetch the media source to see it. For now, we just log a message.
|
||||
// A full implementation would refetch getStreamUrl and update the stream state.
|
||||
const handleServerSubtitleDownloaded = useCallback(() => {
|
||||
console.log(
|
||||
"Server-side subtitle downloaded - track list should be refreshed",
|
||||
);
|
||||
// TODO: Implement media source refresh to pick up new subtitle
|
||||
// This would involve re-calling getStreamUrl and updating the stream state
|
||||
}, []);
|
||||
|
||||
// TV: Navigate to next item
|
||||
const goToNextItem = useCallback(() => {
|
||||
if (!nextItem || !settings) return;
|
||||
@@ -1129,6 +1146,8 @@ export default function page() {
|
||||
nextItem={nextItem}
|
||||
goToPreviousItem={goToPreviousItem}
|
||||
goToNextItem={goToNextItem}
|
||||
onServerSubtitleDownloaded={handleServerSubtitleDownloaded}
|
||||
addSubtitleFile={addSubtitleFile}
|
||||
/>
|
||||
) : (
|
||||
<Controls
|
||||
|
||||
Reference in New Issue
Block a user