mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-16 17:10:03 -04:00
[web] Lint source code
This commit is contained in:
parent
feaa14b76a
commit
f2c3e8ff50
@ -21,10 +21,7 @@
|
|||||||
/>
|
/>
|
||||||
</p>
|
</p>
|
||||||
<p v-if="!item.folder">
|
<p v-if="!item.folder">
|
||||||
<span
|
<span class="heading" v-text="$t('dialog.playlist.tracks')" />
|
||||||
class="heading"
|
|
||||||
v-text="$t('dialog.playlist.tracks')"
|
|
||||||
/>
|
|
||||||
<span class="title is-6" v-text="item.item_count" />
|
<span class="title is-6" v-text="item.item_count" />
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@ -88,17 +88,16 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
close() {
|
||||||
|
this.update_dialog_scan_kind = ''
|
||||||
|
this.$emit('close')
|
||||||
|
},
|
||||||
update_library() {
|
update_library() {
|
||||||
if (this.rescan_metadata) {
|
if (this.rescan_metadata) {
|
||||||
webapi.library_rescan(this.update_dialog_scan_kind)
|
webapi.library_rescan(this.update_dialog_scan_kind)
|
||||||
} else {
|
} else {
|
||||||
webapi.library_update(this.update_dialog_scan_kind)
|
webapi.library_update(this.update_dialog_scan_kind)
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
close() {
|
|
||||||
this.update_dialog_scan_kind = ''
|
|
||||||
this.$emit('close')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
library_albums(media_kind = undefined) {
|
library_albums(media_kind) {
|
||||||
return axios.get('./api/library/albums', { params: { media_kind } })
|
return axios.get('./api/library/albums', { params: { media_kind } })
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -71,16 +71,14 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
library_artist_tracks(artist) {
|
library_artist_tracks(artist) {
|
||||||
if (artist) {
|
const params = {
|
||||||
const params = {
|
expression: `songartistid is "${artist}"`,
|
||||||
expression: `songartistid is "${artist}"`,
|
type: 'tracks'
|
||||||
type: 'tracks'
|
|
||||||
}
|
|
||||||
return axios.get('./api/search', { params })
|
|
||||||
}
|
}
|
||||||
|
return axios.get('./api/search', { params })
|
||||||
},
|
},
|
||||||
|
|
||||||
library_artists(media_kind = undefined) {
|
library_artists(media_kind) {
|
||||||
return axios.get('./api/library/artists', { params: { media_kind } })
|
return axios.get('./api/library/artists', { params: { media_kind } })
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -104,7 +102,7 @@ export default {
|
|||||||
return axios.get('./api/search', { params })
|
return axios.get('./api/search', { params })
|
||||||
},
|
},
|
||||||
|
|
||||||
library_composers(media_kind = undefined) {
|
library_composers(media_kind) {
|
||||||
return axios.get('./api/library/composers', { params: { media_kind } })
|
return axios.get('./api/library/composers', { params: { media_kind } })
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -112,11 +110,11 @@ export default {
|
|||||||
return axios.get(`./api/library/count?expression=${expression}`)
|
return axios.get(`./api/library/count?expression=${expression}`)
|
||||||
},
|
},
|
||||||
|
|
||||||
library_files(directory = undefined) {
|
library_files(directory) {
|
||||||
return axios.get('./api/library/files', { params: { directory } })
|
return axios.get('./api/library/files', { params: { directory } })
|
||||||
},
|
},
|
||||||
|
|
||||||
library_genre(genre, media_kind = undefined) {
|
library_genre(genre, media_kind) {
|
||||||
return axios.get(`./api/library/genres/${encodeURIComponent(genre)}`, {
|
return axios.get(`./api/library/genres/${encodeURIComponent(genre)}`, {
|
||||||
params: { media_kind }
|
params: { media_kind }
|
||||||
})
|
})
|
||||||
@ -138,7 +136,7 @@ export default {
|
|||||||
return axios.get('./api/search', { params })
|
return axios.get('./api/search', { params })
|
||||||
},
|
},
|
||||||
|
|
||||||
library_genres(media_kind = undefined) {
|
library_genres(media_kind) {
|
||||||
return axios.get('./api/library/genres', { params: { media_kind } })
|
return axios.get('./api/library/genres', { params: { media_kind } })
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -188,12 +186,8 @@ export default {
|
|||||||
return axios.get('./api/search', { params })
|
return axios.get('./api/search', { params })
|
||||||
},
|
},
|
||||||
|
|
||||||
library_rescan(scanKind) {
|
library_rescan(scan_kind) {
|
||||||
const params = {}
|
return axios.put('./api/rescan', undefined, { params: { scan_kind } })
|
||||||
if (scanKind) {
|
|
||||||
params.scan_kind = scanKind
|
|
||||||
}
|
|
||||||
return axios.put('./api/rescan', undefined, { params })
|
|
||||||
},
|
},
|
||||||
|
|
||||||
library_stats() {
|
library_stats() {
|
||||||
@ -214,12 +208,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
library_update(scanKind) {
|
library_update(scan_kind) {
|
||||||
const params = {}
|
return axios.put('./api/update', undefined, { params: { scan_kind } })
|
||||||
if (scanKind) {
|
|
||||||
params.scan_kind = scanKind
|
|
||||||
}
|
|
||||||
return axios.put('./api/update', undefined, { params })
|
|
||||||
},
|
},
|
||||||
|
|
||||||
output_toggle(outputId) {
|
output_toggle(outputId) {
|
||||||
@ -264,23 +254,23 @@ export default {
|
|||||||
return axios.put('./api/player/play', undefined, { params: options })
|
return axios.put('./api/player/play', undefined, { params: options })
|
||||||
},
|
},
|
||||||
|
|
||||||
player_play_expression(expression, shuffle, position = undefined) {
|
player_play_expression(expression, shuffle, position) {
|
||||||
const params = {
|
const params = {
|
||||||
clear: 'true',
|
clear: 'true',
|
||||||
expression,
|
expression,
|
||||||
playback: 'start',
|
playback: 'start',
|
||||||
playback_from_position: position,
|
playback_from_position: position,
|
||||||
shuffle: `${shuffle}`
|
shuffle
|
||||||
}
|
}
|
||||||
return axios.post('./api/queue/items/add', undefined, { params })
|
return axios.post('./api/queue/items/add', undefined, { params })
|
||||||
},
|
},
|
||||||
|
|
||||||
player_play_uri(uris, shuffle, position = undefined) {
|
player_play_uri(uris, shuffle, position) {
|
||||||
const params = {
|
const params = {
|
||||||
clear: 'true',
|
clear: 'true',
|
||||||
playback: 'start',
|
playback: 'start',
|
||||||
playback_from_position: position,
|
playback_from_position: position,
|
||||||
shuffle: `${shuffle}`,
|
shuffle,
|
||||||
uris
|
uris
|
||||||
}
|
}
|
||||||
return axios.post('./api/queue/items/add', undefined, { params })
|
return axios.post('./api/queue/items/add', undefined, { params })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user