[web] Use named route for podcast page

Switching to named routes in order to reduce future maintenance.
This commit is contained in:
Alain Nussbaumer
2023-07-10 10:03:05 +02:00
parent 72c5172f12
commit 53e132f441
6 changed files with 25 additions and 19 deletions

View File

@@ -105,7 +105,7 @@ export default {
open_album(album) {
this.selected_album = album
if (this.media_kind_resolved === 'podcast') {
this.$router.push({ path: '/podcasts/' + album.id })
this.$router.push({ name: 'podcast', params: { id: album.id } })
} else if (this.media_kind_resolved === 'audiobook') {
this.$router.push({ name: 'audiobook', params: { id: album.id } })
} else {

View File

@@ -158,7 +158,7 @@ export default {
open_album() {
this.$emit('close')
if (this.media_kind_resolved === 'podcast') {
this.$router.push({ path: '/podcasts/' + this.album.id })
this.$router.push({ name: 'podcast', params: { id: this.album.id } })
} else if (this.media_kind_resolved === 'audiobook') {
this.$router.push({ name: 'audiobook', params: { id: this.album.id } })
} else {

View File

@@ -209,7 +209,10 @@ export default {
open_album() {
if (this.media_kind === 'podcast') {
this.$router.push({ path: '/podcasts/' + this.item.album_id })
this.$router.push({
name: 'podcast',
params: { id: this.item.album_id }
})
} else if (this.media_kind === 'audiobook') {
this.$router.push({
name: 'audiobook',

View File

@@ -243,7 +243,10 @@ export default {
open_album() {
this.$emit('close')
if (this.track.media_kind === 'podcast') {
this.$router.push({ path: '/podcasts/' + this.track.album_id })
this.$router.push({
name: 'podcast',
params: { id: this.track.album_id }
})
} else if (this.track.media_kind === 'audiobook') {
this.$router.push({
name: 'audiobook',