mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 10:04:39 +02:00
Add start of new local media page for adding folders and scanning local media items
This commit is contained in:
parent
a8de03b82d
commit
a259883979
14 changed files with 698 additions and 73 deletions
|
@ -488,6 +488,18 @@ export default {
|
|||
.catch((error) => {
|
||||
console.error('TEST failed', error)
|
||||
})
|
||||
},
|
||||
async playLocalItem(localMediaItemId) {
|
||||
console.log('Called play local media item for lmi', localMediaItemId)
|
||||
MyNativeAudio.playLocalLibraryItem({ localMediaItemId, playWhenReady: true })
|
||||
.then((data) => {
|
||||
console.log('TEST library item play response', JSON.stringify(data))
|
||||
var mediaEntity = data.mediaEntity
|
||||
this.$store.commit('globals/setMediaEntityPlaying', mediaEntity)
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('TEST failed', error)
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -499,6 +511,7 @@ export default {
|
|||
|
||||
this.setListeners()
|
||||
this.$eventBus.$on('play-item', this.playLibraryItem)
|
||||
this.$eventBus.$on('play-local-item', this.playLocalItem)
|
||||
this.$eventBus.$on('close_stream', this.closeStreamOnly)
|
||||
this.$store.commit('user/addSettingsListener', { id: 'streamContainer', meth: this.settingsUpdated })
|
||||
},
|
||||
|
@ -514,6 +527,7 @@ export default {
|
|||
this.$server.socket.off('stream_reset', this.streamReset)
|
||||
}
|
||||
this.$eventBus.$off('play-item', this.playLibraryItem)
|
||||
this.$eventBus.$off('play-local-item', this.playLocalItem)
|
||||
this.$eventBus.$off('close_stream', this.closeStreamOnly)
|
||||
this.$store.commit('user/removeSettingsListener', 'streamContainer')
|
||||
}
|
||||
|
|
|
@ -83,8 +83,8 @@ export default {
|
|||
{
|
||||
icon: 'folder',
|
||||
iconOutlined: true,
|
||||
text: 'Downloads',
|
||||
to: '/downloads'
|
||||
text: 'Local Media',
|
||||
to: '/localMedia/folders'
|
||||
}
|
||||
// {
|
||||
// icon: 'settings',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue