[web] Lint source code

This commit is contained in:
Alain Nussbaumer 2024-03-26 01:17:07 +01:00
parent ed5f2028a1
commit 3ceb76b016
6 changed files with 70 additions and 98 deletions

View File

@ -138,21 +138,14 @@ export default {
},
methods: {
play() {
this.$emit('close')
webapi.player_play_uri(this.album.uri, false)
mark_played() {
webapi
.library_album_track_update(this.album.id, { play_count: 'played' })
.then(({ data }) => {
this.$emit('play-count-changed')
this.$emit('close')
})
},
queue_add() {
this.$emit('close')
webapi.queue_add(this.album.uri)
},
queue_add_next() {
this.$emit('close')
webapi.queue_add_next(this.album.uri)
},
open_album() {
this.$emit('close')
if (this.media_kind_resolved === 'podcast') {
@ -169,7 +162,6 @@ export default {
})
}
},
open_artist() {
this.$emit('close')
if (this.media_kind_resolved === 'audiobook') {
@ -184,14 +176,17 @@ export default {
})
}
},
mark_played() {
webapi
.library_album_track_update(this.album.id, { play_count: 'played' })
.then(({ data }) => {
this.$emit('play-count-changed')
this.$emit('close')
})
play() {
this.$emit('close')
webapi.player_play_uri(this.album.uri, false)
},
queue_add() {
this.$emit('close')
webapi.queue_add(this.album.uri)
},
queue_add_next() {
this.$emit('close')
webapi.queue_add_next(this.album.uri)
}
}
}

View File

@ -99,25 +99,15 @@ export default {
},
methods: {
artwork_error() {
this.artwork_visible = false
},
artwork_loaded() {
this.artwork_visible = true
},
artwork_url(album) {
return album.images?.[0]?.url || ''
},
play() {
this.$emit('close')
webapi.player_play_uri(this.album.uri, false)
},
queue_add() {
this.$emit('close')
webapi.queue_add(this.album.uri)
},
queue_add_next() {
this.$emit('close')
webapi.queue_add_next(this.album.uri)
},
open_album() {
this.$emit('close')
this.$router.push({
@ -125,7 +115,6 @@ export default {
params: { id: this.album.id }
})
},
open_artist() {
this.$emit('close')
this.$router.push({
@ -133,13 +122,17 @@ export default {
params: { id: this.album.artists[0].id }
})
},
artwork_loaded() {
this.artwork_visible = true
play() {
this.$emit('close')
webapi.player_play_uri(this.album.uri, false)
},
artwork_error() {
this.artwork_visible = false
queue_add() {
this.$emit('close')
webapi.queue_add(this.album.uri)
},
queue_add_next() {
this.$emit('close')
webapi.queue_add_next(this.album.uri)
}
}
}

View File

@ -71,27 +71,24 @@ export default {
emits: ['close'],
methods: {
play() {
this.$emit('close')
webapi.player_play_uri(this.artist.uri, false)
},
queue_add() {
this.$emit('close')
webapi.queue_add(this.artist.uri)
},
queue_add_next() {
this.$emit('close')
webapi.queue_add_next(this.artist.uri)
},
open_artist() {
this.$emit('close')
this.$router.push({
name: 'music-artist',
params: { id: this.artist.id }
})
},
play() {
this.$emit('close')
webapi.player_play_uri(this.artist.uri, false)
},
queue_add() {
this.$emit('close')
webapi.queue_add(this.artist.uri)
},
queue_add_next() {
this.$emit('close')
webapi.queue_add_next(this.artist.uri)
}
}
}

View File

@ -77,27 +77,24 @@ export default {
emits: ['close'],
methods: {
play() {
this.$emit('close')
webapi.player_play_uri(this.artist.uri, false)
},
queue_add() {
this.$emit('close')
webapi.queue_add(this.artist.uri)
},
queue_add_next() {
this.$emit('close')
webapi.queue_add_next(this.artist.uri)
},
open_artist() {
this.$emit('close')
this.$router.push({
name: 'music-spotify-artist',
params: { id: this.artist.id }
})
},
play() {
this.$emit('close')
webapi.player_play_uri(this.artist.uri, false)
},
queue_add() {
this.$emit('close')
webapi.queue_add(this.artist.uri)
},
queue_add_next() {
this.$emit('close')
webapi.queue_add_next(this.artist.uri)
}
}
}

View File

@ -71,27 +71,24 @@ export default {
emits: ['close'],
methods: {
play() {
this.$emit('close')
webapi.player_play_uri(this.uris ? this.uris : this.playlist.uri, false)
},
queue_add() {
this.$emit('close')
webapi.queue_add(this.uris ? this.uris : this.playlist.uri)
},
queue_add_next() {
this.$emit('close')
webapi.queue_add_next(this.uris ? this.uris : this.playlist.uri)
},
open_playlist() {
this.$emit('close')
this.$router.push({
name: 'playlist',
params: { id: this.playlist.id }
})
},
play() {
this.$emit('close')
webapi.player_play_uri(this.uris || this.playlist.uri, false)
},
queue_add() {
this.$emit('close')
webapi.queue_add(this.uris || this.playlist.uri)
},
queue_add_next() {
this.$emit('close')
webapi.queue_add_next(this.uris || this.playlist.uri)
}
}
}

View File

@ -217,7 +217,6 @@ export default {
this.$emit('close')
})
},
mark_played() {
webapi
.library_track_update(this.track.id, { play_count: 'increment' })
@ -226,7 +225,6 @@ export default {
this.$emit('close')
})
},
open_album() {
if (
this.track.data_kind === 'spotify' &&
@ -253,7 +251,6 @@ export default {
})
}
},
open_album_artist() {
if (this.track.data_kind === 'spotify') {
this.$router.push({
@ -275,7 +272,6 @@ export default {
})
}
},
open_genre() {
this.$router.push({
name: 'genre-albums',
@ -283,17 +279,14 @@ export default {
query: { media_kind: this.track.media_kind }
})
},
play() {
this.$emit('close')
webapi.player_play_uri(this.track.uri, false)
},
queue_add() {
this.$emit('close')
webapi.queue_add(this.track.uri)
},
queue_add_next() {
this.$emit('close')
webapi.queue_add_next(this.track.uri)