[web-src] Update spotify-web-api and adapt to simpified playlist
endpoints
This commit is contained in:
parent
e72fd88fb9
commit
388c8868d5
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "hello-world",
|
||||
"version": "0.1.0",
|
||||
"name": "forked-daapd-web",
|
||||
"version": "0.1.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -12060,9 +12060,9 @@
|
|||
}
|
||||
},
|
||||
"spotify-web-api-js": {
|
||||
"version": "0.23.0",
|
||||
"resolved": "https://registry.npmjs.org/spotify-web-api-js/-/spotify-web-api-js-0.23.0.tgz",
|
||||
"integrity": "sha512-5Evfz7yz+Ti7QrFZDBJf60LRI5ZjljklA48erFolpvK9QIE2C9CwjgBrUImnG4onhP6Uc+thaxMZtbX1ZyyP0A=="
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/spotify-web-api-js/-/spotify-web-api-js-1.1.1.tgz",
|
||||
"integrity": "sha512-1via0GvAIxExxtQr30bQSwifxwN2i5nJsJGsn26DTtFmaPIzn0jYiI2eJAuBIdxejphE/ijHHcJNtf2HClS8QA=="
|
||||
},
|
||||
"sprintf-js": {
|
||||
"version": "1.0.3",
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"moment-duration-format": "^2.2.2",
|
||||
"npm": "^6.4.1",
|
||||
"reconnectingwebsocket": "^1.0.0",
|
||||
"spotify-web-api-js": "^0.23.0",
|
||||
"spotify-web-api-js": "^1.1.1",
|
||||
"vue": "^2.5.17",
|
||||
"vue-infinite-loading": "^2.4.0",
|
||||
"vue-progressbar": "^0.7.4",
|
||||
|
|
|
@ -100,7 +100,7 @@ export default {
|
|||
|
||||
open_playlist: function () {
|
||||
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()
|
||||
spotifyApi.setAccessToken(store.state.spotify.webapi_token)
|
||||
return Promise.all([
|
||||
spotifyApi.getPlaylist(to.params.user_id, to.params.playlist_id),
|
||||
spotifyApi.getPlaylistTracks(to.params.user_id, to.params.playlist_id, { limit: 50, offset: 0 })
|
||||
spotifyApi.getPlaylist(to.params.playlist_id),
|
||||
spotifyApi.getPlaylistTracks(to.params.playlist_id, { limit: 50, offset: 0 })
|
||||
])
|
||||
},
|
||||
|
||||
|
@ -65,7 +65,7 @@ export default {
|
|||
load_next: function ($state) {
|
||||
const spotifyApi = new SpotifyWebApi()
|
||||
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)
|
||||
})
|
||||
},
|
||||
|
|
|
@ -168,7 +168,7 @@ export const router = new VueRouter({
|
|||
meta: { show_progress: true }
|
||||
},
|
||||
{
|
||||
path: '/music/spotify/playlists/:user_id/:playlist_id',
|
||||
path: '/music/spotify/playlists/:playlist_id',
|
||||
name: 'Spotify Playlist',
|
||||
component: SpotifyPagePlaylist,
|
||||
meta: { show_progress: true }
|
||||
|
|
Loading…
Reference in New Issue