Support server v1.4.0, multiple libraries, new static request routes

This commit is contained in:
advplyr
2021-10-06 07:24:15 -05:00
parent a520a1fd8e
commit 993ff5341d
12 changed files with 355 additions and 44 deletions
+5 -3
View File
@@ -6,6 +6,7 @@
</div>
<app-stream-container ref="streamContainer" />
<modals-downloads-modal ref="downloadsModal" @selectDownload="selectDownload" @deleteDownload="deleteDownload" />
<modals-libraries-modal />
</div>
</template>
@@ -29,13 +30,16 @@ export default {
}
},
methods: {
connected(isConnected) {
async connected(isConnected) {
if (this.$route.name === 'connect') {
if (isConnected) {
this.$router.push('/')
}
}
this.syncUserProgress()
// Load libraries
this.$store.dispatch('libraries/load')
},
updateAudiobookProgressOnServer(audiobookProgress) {
if (this.$server.socket) {
@@ -363,8 +367,6 @@ export default {
mounted() {
if (!this.$server) return console.error('No Server')
console.log('Default Mounted')
this.$server.on('connected', this.connected)
this.$server.on('initialStream', this.initialStream)