A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
fix: video isnt loaded if navigated to from folder info
aminnausinc98c3a1b8f93
diff --git a/resources/js/stores/ContentStore.ts b/resources/js/stores/ContentStore.tsindex 2f18fbe3..3dfbb390 100644--- a/resources/js/stores/ContentStore.ts+++ b/resources/js/stores/ContentStore.ts@@ -327,9 +327,11 @@ export const useContentStore = defineStore('Content', () => {};}- function clearState() {- stateDirectory.value = emptyLibrary;- stateFolder.value = emptyFolder;+ function clearState(onlyVideo = false) {+ if (!onlyVideo) {+ stateDirectory.value = emptyLibrary;+ stateFolder.value = emptyFolder;+ }stateVideo.value = emptyMedia;}@@ -376,8 +378,8 @@ export const useContentStore = defineStore('Content', () => {* Watches the current route and clears app state when leaving the video player page.*/watch(route, (to) => {- if (to.name !== 'home' && route.name !== 'folder') {- clearState();+ if (to.name !== 'home') {+ clearState(route.name === 'folder');}});diff --git a/resources/js/views/VideoView.vue b/resources/js/views/VideoView.vueindex e81f0471..ede7b467 100755--- a/resources/js/views/VideoView.vue+++ b/resources/js/views/VideoView.vue@@ -54,6 +54,7 @@ async function reload() {isLoadingContent.value = true;await getCategory(URL_CATEGORY, URL_FOLDER);}+ if (!stateVideo.value.id) playlistFind(queryVideoId.value);} catch (error) {console.log(error);}