Unify playback-state read/write via /api/meta/playback-state

This commit is contained in:
2026-05-31 01:43:56 +00:00
parent b6742f0f27
commit 626fb9a0ae
6 changed files with 435 additions and 83 deletions
+3 -2
View File
@@ -256,7 +256,7 @@ const props = defineProps<{
item: MediaItem
allMovies: MovieUi[]
focusEpisode?: { seasonNumber: number; episodeNumber: number } | null
hasResumePosition: (filePath: string | null) => boolean
hasResumePosition: (mediaId: string | null) => boolean
getRootName: (rootId: string | null | undefined) => string | null
}>()
const emit = defineEmits<{
@@ -828,7 +828,8 @@ function closeVersionActionMenu() {
}
function getPlayLabel(filePath: string | null): string {
return props.hasResumePosition(filePath) ? "Continue" : "Play"
if (!filePath || props.item.type !== "movies") return "Play"
return props.hasResumePosition(props.item.id) ? "Continue" : "Play"
}
function handlePlayVersion(filePath: string | null) {