chore: some small code cleanups in PlaylistPage.vue

This commit is contained in:
Bnyro 2024-07-29 16:31:24 +02:00
parent 0d37601997
commit 6b218d0c88

View file

@ -131,7 +131,7 @@ export default {
this.loading = false; this.loading = false;
this.playlist.relatedStreams.push(...json.relatedStreams); this.playlist.relatedStreams.push(...json.relatedStreams);
this.updateTotalDuration(); this.updateTotalDuration();
this.fetchDeArrowContent(this.playlist.relatedStreams); this.fetchDeArrowContent(json.relatedStreams);
}); });
} }
}, },
@ -157,10 +157,11 @@ export default {
}); });
}, },
downloadPlaylistAsTxt() { downloadPlaylistAsTxt() {
var data = ""; const data = this.playlist.relatedStreams
this.playlist.relatedStreams.forEach(element => { .map(video => {
data += "https://piped.video" + element.url + "\n"; return "https://piped.video" + video.url;
}); })
.join("\n");
this.download(data, this.playlist.name + ".txt", "text/plain"); this.download(data, this.playlist.name + ".txt", "text/plain");
}, },
async bookmarkPlaylist() { async bookmarkPlaylist() {