From c80c0cea245550669f1bfd8172fc2aff39acc456 Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 29 Jul 2024 16:32:57 +0200 Subject: [PATCH] chore: some small code cleanups in PlaylistPage.vue (#3741) --- src/components/PlaylistPage.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/PlaylistPage.vue b/src/components/PlaylistPage.vue index cd6a6780..e3ff1f09 100644 --- a/src/components/PlaylistPage.vue +++ b/src/components/PlaylistPage.vue @@ -131,7 +131,7 @@ export default { this.loading = false; this.playlist.relatedStreams.push(...json.relatedStreams); this.updateTotalDuration(); - this.fetchDeArrowContent(this.playlist.relatedStreams); + this.fetchDeArrowContent(json.relatedStreams); }); } }, @@ -157,10 +157,11 @@ export default { }); }, downloadPlaylistAsTxt() { - var data = ""; - this.playlist.relatedStreams.forEach(element => { - data += "https://piped.video" + element.url + "\n"; - }); + const data = this.playlist.relatedStreams + .map(video => { + return "https://piped.video" + video.url; + }) + .join("\n"); this.download(data, this.playlist.name + ".txt", "text/plain"); }, async bookmarkPlaylist() {