Skip to content

A self-hosted media server and file management system

fix: default video is chosen as first api response rather than first in locally sorted playlist

aminnausin607433af2539
diff --git a/resources/js/stores/ContentStore.ts b/resources/js/stores/ContentStore.ts
index 83ef0a98..65939f99 100644
--- a/resources/js/stores/ContentStore.ts
+++ b/resources/js/stores/ContentStore.ts
@@ -135,7 +135,7 @@ export const useContentStore = defineStore('Content', () => {
result = stateFolder.value.videos.find((media) => media.id === queryId);
} else {
// the default is the first video in the list
- result = stateFolder.value.videos[0];
+ result = stateFilteredPlaylist.value.length > 0 ? stateFilteredPlaylist.value[0] : stateFolder.value.videos[0];
}
// Media matching query not found or no media in playlist in the first place