mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 05:59:45 -05:00
[web-src] Make use of extended queue/item/add endpoint
Should speed up starting playback from the web ui (reduces number of web api requests)
This commit is contained in:
@@ -153,9 +153,7 @@ export default {
|
||||
},
|
||||
|
||||
play: function () {
|
||||
webapi.search({ 'type': 'tracks', 'expression': 'path starts with "' + this.current_directory + '" order by path asc' }).then(({ data }) => {
|
||||
webapi.player_play_uri(data.tracks.items.map(a => a.uri).join(','), false)
|
||||
})
|
||||
webapi.player_play_expression('path starts with "' + this.current_directory + '" order by path asc', false)
|
||||
},
|
||||
|
||||
play_track: function (position) {
|
||||
|
||||
@@ -85,9 +85,7 @@ export default {
|
||||
},
|
||||
|
||||
play: function () {
|
||||
webapi.library_genre_tracks(this.name).then(({ data }) =>
|
||||
webapi.player_play_uri(data.tracks.items.map(a => a.uri).join(','), true)
|
||||
)
|
||||
webapi.player_play_expression('genre is "' + this.name + '" and media_kind is music', true)
|
||||
},
|
||||
|
||||
open_album: function (album) {
|
||||
|
||||
@@ -84,11 +84,11 @@ export default {
|
||||
},
|
||||
|
||||
play: function () {
|
||||
webapi.player_play_uri(this.tracks.items.map(a => a.uri).join(','), true)
|
||||
webapi.player_play_expression('genre is "' + this.genre + '" and media_kind is music', true)
|
||||
},
|
||||
|
||||
play_track: function (position) {
|
||||
webapi.player_play_uri(this.tracks.items.map(a => a.uri).join(','), false, position)
|
||||
webapi.player_play_expression('genre is "' + this.genre + '" and media_kind is music', false, position)
|
||||
},
|
||||
|
||||
open_dialog: function (track) {
|
||||
|
||||
Reference in New Issue
Block a user