Add:Local setting for autoplay next item in queue #603

This commit is contained in:
advplyr 2022-08-28 14:21:28 -05:00
parent 772c7b3217
commit dee4ca3559
7 changed files with 44 additions and 11 deletions

View file

@ -522,6 +522,17 @@ export default {
if (res && res.hasUpdate) this.showUpdateToast(res)
})
.catch((err) => console.error(err))
},
initLocalStorage() {
// If experimental features set in local storage
var experimentalFeaturesSaved = localStorage.getItem('experimental')
if (experimentalFeaturesSaved === '1') {
this.$store.commit('setExperimentalFeatures', true)
}
// Queue auto play
var playerQueueAutoPlay = localStorage.getItem('playerQueueAutoPlay')
this.$store.commit('setPlayerQueueAutoPlay', playerQueueAutoPlay !== '0')
}
},
beforeMount() {
@ -535,11 +546,7 @@ export default {
this.$store.dispatch('libraries/load')
// If experimental features set in local storage
var experimentalFeaturesSaved = localStorage.getItem('experimental')
if (experimentalFeaturesSaved === '1') {
this.$store.commit('setExperimentalFeatures', true)
}
this.initLocalStorage()
this.checkVersionUpdate()