mirror of
				https://github.com/TeamPiped/Piped.git
				synced 2024-08-14 23:57:27 +00:00 
			
		
		
		
	Fix for API retrieved playlists bug introduced in #3357
This commit is contained in:
		
							parent
							
								
									690467895d
								
							
						
					
					
						commit
						7000b56a13
					
				
					 2 changed files with 2 additions and 10 deletions
				
			
		| 
						 | 
					@ -102,16 +102,8 @@ export default {
 | 
				
			||||||
        window.removeEventListener("scroll", this.handleScroll);
 | 
					        window.removeEventListener("scroll", this.handleScroll);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    methods: {
 | 
					    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() {
 | 
					        async getPlaylistData() {
 | 
				
			||||||
            this.fetchPlaylist()
 | 
					            this.getPlaylist(this.$route.query.list)
 | 
				
			||||||
                .then(data => (this.playlist = data))
 | 
					                .then(data => (this.playlist = data))
 | 
				
			||||||
                .then(() => {
 | 
					                .then(() => {
 | 
				
			||||||
                    this.updateTitle();
 | 
					                    this.updateTitle();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -359,7 +359,7 @@ const mixin = {
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        async getPlaylist(playlistId) {
 | 
					        async getPlaylist(playlistId) {
 | 
				
			||||||
            if (!this.authenticated) {
 | 
					            if (playlistId.startsWith("local")) {
 | 
				
			||||||
                const playlist = await this.getLocalPlaylist(playlistId);
 | 
					                const playlist = await this.getLocalPlaylist(playlistId);
 | 
				
			||||||
                const videoIds = JSON.parse(playlist.videoIds);
 | 
					                const videoIds = JSON.parse(playlist.videoIds);
 | 
				
			||||||
                const videosFuture = videoIds.map(videoId => this.getLocalPlaylistVideo(videoId));
 | 
					                const videosFuture = videoIds.map(videoId => this.getLocalPlaylistVideo(videoId));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue