mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-11 14:30:20 -05:00
[web-src] Fix linting errors
This commit is contained in:
@@ -135,7 +135,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
open_parent_directory: function () {
|
||||
var parent = this.current_directory.slice(0, this.current_directory.lastIndexOf('/'))
|
||||
const parent = this.current_directory.slice(0, this.current_directory.lastIndexOf('/'))
|
||||
if (parent === '' || this.$store.state.config.directories.includes(this.current_directory)) {
|
||||
this.$router.push({ path: '/files' })
|
||||
} else {
|
||||
|
||||
@@ -124,9 +124,9 @@ export default {
|
||||
},
|
||||
|
||||
move_item: function (e) {
|
||||
var oldPosition = !this.show_only_next_items ? e.oldIndex : e.oldIndex + this.current_position
|
||||
var item = this.queue_items[oldPosition]
|
||||
var newPosition = item.position + (e.newIndex - e.oldIndex)
|
||||
const oldPosition = !this.show_only_next_items ? e.oldIndex : e.oldIndex + this.current_position
|
||||
const item = this.queue_items[oldPosition]
|
||||
const newPosition = item.position + (e.newIndex - e.oldIndex)
|
||||
if (newPosition !== oldPosition) {
|
||||
webapi.queue_move(item.id, newPosition)
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
var searchParams = {
|
||||
const searchParams = {
|
||||
type: query.type,
|
||||
media_kind: 'music'
|
||||
}
|
||||
@@ -291,7 +291,7 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
var searchParams = {
|
||||
const searchParams = {
|
||||
type: 'album',
|
||||
media_kind: 'audiobook'
|
||||
}
|
||||
@@ -317,7 +317,7 @@ export default {
|
||||
return
|
||||
}
|
||||
|
||||
var searchParams = {
|
||||
const searchParams = {
|
||||
type: 'album',
|
||||
media_kind: 'podcast'
|
||||
}
|
||||
|
||||
@@ -278,10 +278,10 @@ export default {
|
||||
return webapi.spotify().then(({ data }) => {
|
||||
this.search_param.market = data.webapi_country
|
||||
|
||||
var spotifyApi = new SpotifyWebApi()
|
||||
const spotifyApi = new SpotifyWebApi()
|
||||
spotifyApi.setAccessToken(data.webapi_token)
|
||||
|
||||
var types = this.query.type.split(',').filter(type => this.validSearchTypes.includes(type))
|
||||
const types = this.query.type.split(',').filter(type => this.validSearchTypes.includes(type))
|
||||
return spotifyApi.search(this.query.query, types, this.search_param)
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user