[web] Lint source code

This commit is contained in:
Alain Nussbaumer
2024-03-26 12:04:04 +01:00
parent f2c3e8ff50
commit 57207c1ff4
16 changed files with 108 additions and 130 deletions

View File

@@ -67,7 +67,7 @@ const dataObject = {
index: { field: 'disc_number', type: Number }
})
if (vm.tracks.indices.length < 2) {
vm.tracks.group({ index: { type: undefined } })
vm.tracks.group()
}
}
}

View File

@@ -183,7 +183,7 @@ export default {
},
play() {
webapi.player_play_uri(
this.albums.items.map((a) => a.uri).join(','),
this.albums.items.map((item) => item.uri).join(),
true
)
}

View File

@@ -62,10 +62,10 @@ const dataObject = {
return Promise.all([
spotifyApi.getArtist(to.params.id),
spotifyApi.getArtistAlbums(to.params.id, {
limit: PAGE_SIZE,
offset: 0,
include_groups: 'album,single',
market: store.state.spotify.webapi_country
limit: PAGE_SIZE,
market: store.state.spotify.webapi_country,
offset: 0
})
])
},

View File

@@ -131,7 +131,7 @@ export default {
id: 2,
name: this.$t('page.artist.sort.rating'),
options: {
criteria: [{ field: 'rating', type: Number, order: -1 }],
criteria: [{ field: 'rating', order: -1, type: Number }],
index: { field: 'rating', type: 'Digits' }
}
}
@@ -169,7 +169,7 @@ export default {
return this.$store.state.spotify.webapi_token_valid
},
track_uris() {
return this.tracks_list.items.map((a) => a.uri).join(',')
return this.tracks_list.items.map((item) => item.uri).join()
},
tracks() {
const grouping = this.grouping_options.find(
@@ -193,7 +193,7 @@ export default {
},
play() {
webapi.player_play_uri(
this.tracks_list.items.map((a) => a.uri).join(','),
this.tracks_list.items.map((item) => item.uri).join(),
true
)
}

View File

@@ -119,7 +119,7 @@ export default {
id: 2,
name: this.$t('page.artists.sort.recently-added'),
options: {
criteria: [{ field: 'time_added', type: Date, order: -1 }],
criteria: [{ field: 'time_added', order: -1, type: Date }],
index: { field: 'time_added', type: Date }
}
}

View File

@@ -88,7 +88,7 @@ export default {
methods: {
play() {
webapi.player_play_uri(
this.albums.items.map((a) => a.uri).join(','),
this.albums.items.map((item) => item.uri).join(),
false
)
}

View File

@@ -119,7 +119,7 @@ export default {
id: 2,
name: this.$t('page.composer.sort.rating'),
options: {
criteria: [{ field: 'rating', type: Number, order: -1 }],
criteria: [{ field: 'rating', order: -1, type: Number }],
index: { field: 'rating', type: 'Digits' }
}
}

View File

@@ -114,7 +114,7 @@ export default {
id: 2,
name: this.$t('page.genre.sort.rating'),
options: {
criteria: [{ field: 'rating', type: Number, order: -1 }],
criteria: [{ field: 'rating', order: -1, type: Number }],
index: { field: 'rating', type: 'Digits' }
}
}

View File

@@ -33,7 +33,7 @@ const dataObject = {
set(vm, response) {
vm.recently_added = new GroupedList(response.data.albums, {
criteria: [{ field: 'time_added', type: Date, order: -1 }],
criteria: [{ field: 'time_added', order: -1, type: Date }],
index: { field: 'time_added', type: Date }
})
}

View File

@@ -84,7 +84,7 @@ export default {
computed: {
uris() {
if (this.playlist.random) {
return this.tracks.map((a) => a.uri).join(',')
return this.tracks.map((item) => item.uri).join()
}
return this.playlist.uri
}

View File

@@ -65,8 +65,8 @@ const dataObject = {
spotifyApi.getPlaylist(to.params.id),
spotifyApi.getPlaylistTracks(to.params.id, {
limit: PAGE_SIZE,
offset: 0,
market: store.state.spotify.webapi_country
market: store.state.spotify.webapi_country,
offset: 0
})
])
},