mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-28 08:05:56 -05:00
[web] Lint the source code
This commit is contained in:
parent
a34e14f483
commit
604b1d3fdf
@ -423,7 +423,7 @@ export default {
|
|||||||
name: 'search-spotify',
|
name: 'search-spotify',
|
||||||
query: {
|
query: {
|
||||||
query: this.$route.query.query,
|
query: this.$route.query.query,
|
||||||
type: type
|
type
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -446,8 +446,8 @@ export default {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.query.query = this.search_query
|
this.query.query = this.search_query
|
||||||
this.search_param.limit = this.query.limit ? this.query.limit : PAGE_SIZE
|
this.search_param.limit = this.query.limit ?? PAGE_SIZE
|
||||||
this.search_param.offset = this.query.offset ? this.query.offset : 0
|
this.search_param.offset = this.query.offset ?? 0
|
||||||
this.$store.dispatch('add_recent_search', this.query.query)
|
this.$store.dispatch('add_recent_search', this.query.query)
|
||||||
this.search_all()
|
this.search_all()
|
||||||
},
|
},
|
||||||
@ -461,12 +461,10 @@ export default {
|
|||||||
},
|
},
|
||||||
search_all() {
|
search_all() {
|
||||||
this.spotify_search().then((data) => {
|
this.spotify_search().then((data) => {
|
||||||
this.tracks = data.tracks ? data.tracks : { items: [], total: 0 }
|
this.tracks = data.tracks ?? { items: [], total: 0 }
|
||||||
this.artists = data.artists ? data.artists : { items: [], total: 0 }
|
this.artists = data.artists ?? { items: [], total: 0 }
|
||||||
this.albums = data.albums ? data.albums : { items: [], total: 0 }
|
this.albums = data.albums ?? { items: [], total: 0 }
|
||||||
this.playlists = data.playlists
|
this.playlists = data.playlists ?? { items: [], total: 0 }
|
||||||
? data.playlists
|
|
||||||
: { items: [], total: 0 }
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
search_artists_next({ loaded }) {
|
search_artists_next({ loaded }) {
|
||||||
|
@ -162,9 +162,7 @@ export default {
|
|||||||
) {
|
) {
|
||||||
return this.spotify.webapi_required_scope
|
return this.spotify.webapi_required_scope
|
||||||
.split(' ')
|
.split(' ')
|
||||||
.filter(
|
.filter((scope) => !this.spotify.webapi_granted_scope.includes(scope))
|
||||||
(scope) => this.spotify.webapi_granted_scope.indexOf(scope) < 0
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
return []
|
return []
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user