mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-01 18:21:31 -04:00
[web-src] Update spotify-web-api and adapt to simpified playlist
endpoints
This commit is contained in:
parent
e72fd88fb9
commit
388c8868d5
10
web-src/package-lock.json
generated
10
web-src/package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hello-world",
|
"name": "forked-daapd-web",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -12060,9 +12060,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"spotify-web-api-js": {
|
"spotify-web-api-js": {
|
||||||
"version": "0.23.0",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/spotify-web-api-js/-/spotify-web-api-js-0.23.0.tgz",
|
"resolved": "https://registry.npmjs.org/spotify-web-api-js/-/spotify-web-api-js-1.1.1.tgz",
|
||||||
"integrity": "sha512-5Evfz7yz+Ti7QrFZDBJf60LRI5ZjljklA48erFolpvK9QIE2C9CwjgBrUImnG4onhP6Uc+thaxMZtbX1ZyyP0A=="
|
"integrity": "sha512-1via0GvAIxExxtQr30bQSwifxwN2i5nJsJGsn26DTtFmaPIzn0jYiI2eJAuBIdxejphE/ijHHcJNtf2HClS8QA=="
|
||||||
},
|
},
|
||||||
"sprintf-js": {
|
"sprintf-js": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"moment-duration-format": "^2.2.2",
|
"moment-duration-format": "^2.2.2",
|
||||||
"npm": "^6.4.1",
|
"npm": "^6.4.1",
|
||||||
"reconnectingwebsocket": "^1.0.0",
|
"reconnectingwebsocket": "^1.0.0",
|
||||||
"spotify-web-api-js": "^0.23.0",
|
"spotify-web-api-js": "^1.1.1",
|
||||||
"vue": "^2.5.17",
|
"vue": "^2.5.17",
|
||||||
"vue-infinite-loading": "^2.4.0",
|
"vue-infinite-loading": "^2.4.0",
|
||||||
"vue-progressbar": "^0.7.4",
|
"vue-progressbar": "^0.7.4",
|
||||||
|
@ -100,7 +100,7 @@ export default {
|
|||||||
|
|
||||||
open_playlist: function () {
|
open_playlist: function () {
|
||||||
this.show_details_modal = false
|
this.show_details_modal = false
|
||||||
this.$router.push({ path: '/music/spotify/playlists/' + this.playlist.owner.id + '/' + this.playlist.id })
|
this.$router.push({ path: '/music/spotify/playlists/' + this.playlist.id })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,8 @@ const playlistData = {
|
|||||||
const spotifyApi = new SpotifyWebApi()
|
const spotifyApi = new SpotifyWebApi()
|
||||||
spotifyApi.setAccessToken(store.state.spotify.webapi_token)
|
spotifyApi.setAccessToken(store.state.spotify.webapi_token)
|
||||||
return Promise.all([
|
return Promise.all([
|
||||||
spotifyApi.getPlaylist(to.params.user_id, to.params.playlist_id),
|
spotifyApi.getPlaylist(to.params.playlist_id),
|
||||||
spotifyApi.getPlaylistTracks(to.params.user_id, to.params.playlist_id, { limit: 50, offset: 0 })
|
spotifyApi.getPlaylistTracks(to.params.playlist_id, { limit: 50, offset: 0 })
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ export default {
|
|||||||
load_next: function ($state) {
|
load_next: function ($state) {
|
||||||
const spotifyApi = new SpotifyWebApi()
|
const spotifyApi = new SpotifyWebApi()
|
||||||
spotifyApi.setAccessToken(this.$store.state.spotify.webapi_token)
|
spotifyApi.setAccessToken(this.$store.state.spotify.webapi_token)
|
||||||
spotifyApi.getPlaylistTracks(this.playlist.owner.id, this.playlist.id, { limit: 50, offset: this.offset }).then(data => {
|
spotifyApi.getPlaylistTracks(this.playlist.id, { limit: 50, offset: this.offset }).then(data => {
|
||||||
this.append_tracks(data, $state)
|
this.append_tracks(data, $state)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -168,7 +168,7 @@ export const router = new VueRouter({
|
|||||||
meta: { show_progress: true }
|
meta: { show_progress: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/music/spotify/playlists/:user_id/:playlist_id',
|
path: '/music/spotify/playlists/:playlist_id',
|
||||||
name: 'Spotify Playlist',
|
name: 'Spotify Playlist',
|
||||||
component: SpotifyPagePlaylist,
|
component: SpotifyPagePlaylist,
|
||||||
meta: { show_progress: true }
|
meta: { show_progress: true }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user