mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-07 04:42:58 -05:00
[web] Use named route for audiobook albums
Switching to named routes in order to reduce future maintenance.
This commit is contained in:
@@ -69,13 +69,13 @@
|
||||
|
||||
<script>
|
||||
import CoverArtwork from '@/components/CoverArtwork.vue'
|
||||
import ModalDialogAlbum from '@/components/ModalDialogAlbum.vue'
|
||||
import ModalDialog from '@/components/ModalDialog.vue'
|
||||
import ModalDialogAlbum from '@/components/ModalDialogAlbum.vue'
|
||||
import webapi from '@/webapi'
|
||||
|
||||
export default {
|
||||
name: 'ListAlbums',
|
||||
components: { CoverArtwork, ModalDialogAlbum, ModalDialog },
|
||||
components: { CoverArtwork, ModalDialog, ModalDialogAlbum },
|
||||
props: ['albums', 'media_kind', 'hide_group_title'],
|
||||
emits: ['play-count-changed', 'podcast-deleted'],
|
||||
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
if (this.media_kind_resolved === 'podcast') {
|
||||
this.$router.push({ path: '/podcasts/' + album.id })
|
||||
} else if (this.media_kind_resolved === 'audiobook') {
|
||||
this.$router.push({ path: '/audiobooks/' + album.id })
|
||||
this.$router.push({ name: 'audiobook', params: { id: album.id } })
|
||||
} else {
|
||||
this.$router.push({ path: '/music/albums/' + album.id })
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ export default {
|
||||
if (this.media_kind_resolved === 'podcast') {
|
||||
this.$router.push({ path: '/podcasts/' + this.album.id })
|
||||
} else if (this.media_kind_resolved === 'audiobook') {
|
||||
this.$router.push({ path: '/audiobooks/' + this.album.id })
|
||||
this.$router.push({ name: 'audiobook', params: { id: this.album.id } })
|
||||
} else {
|
||||
this.$router.push({ path: '/music/albums/' + this.album.id })
|
||||
}
|
||||
|
||||
@@ -211,7 +211,10 @@ export default {
|
||||
if (this.media_kind === 'podcast') {
|
||||
this.$router.push({ path: '/podcasts/' + this.item.album_id })
|
||||
} else if (this.media_kind === 'audiobook') {
|
||||
this.$router.push({ path: '/audiobooks/' + this.item.album_id })
|
||||
this.$router.push({
|
||||
name: 'audiobook',
|
||||
params: { id: this.item.album_id }
|
||||
})
|
||||
} else {
|
||||
this.$router.push({ path: '/music/albums/' + this.item.album_id })
|
||||
}
|
||||
|
||||
@@ -245,7 +245,10 @@ export default {
|
||||
if (this.track.media_kind === 'podcast') {
|
||||
this.$router.push({ path: '/podcasts/' + this.track.album_id })
|
||||
} else if (this.track.media_kind === 'audiobook') {
|
||||
this.$router.push({ path: '/audiobooks/' + this.track.album_id })
|
||||
this.$router.push({
|
||||
name: 'audiobook',
|
||||
params: { id: this.track.album_id }
|
||||
})
|
||||
} else {
|
||||
this.$router.push({ path: '/music/albums/' + this.track.album_id })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user