1
0
mirror of https://github.com/TeamPiped/Piped.git synced 2024-12-13 22:00:28 +05:30

Merge pull request #3361 from dadus33/playlists-fix

fix: API retrieved playlists not shown in watch video page
This commit is contained in:
Kavin 2024-01-26 22:01:50 +00:00 committed by GitHub
commit ee1b0bdc29
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 10 deletions

View File

@ -102,16 +102,8 @@ export default {
window.removeEventListener("scroll", this.handleScroll);
},
methods: {
async fetchPlaylist() {
const playlistId = this.$route.query.list;
if (playlistId.startsWith("local")) {
return this.getPlaylist(playlistId);
}
return await await this.fetchJson(this.authApiUrl() + "/playlists/" + this.$route.query.list);
},
async getPlaylistData() {
this.fetchPlaylist()
this.getPlaylist(this.$route.query.list)
.then(data => (this.playlist = data))
.then(() => {
this.updateTitle();

View File

@ -359,7 +359,7 @@ const mixin = {
});
},
async getPlaylist(playlistId) {
if (!this.authenticated) {
if (playlistId.startsWith("local")) {
const playlist = await this.getLocalPlaylist(playlistId);
const videoIds = JSON.parse(playlist.videoIds);
const videosFuture = videoIds.map(videoId => this.getLocalPlaylistVideo(videoId));