From de50a8fc6cec62d0c6dad28ad61bb9cbbd671a0a Mon Sep 17 00:00:00 2001 From: ChunkyProgrammer <78101139+ChunkyProgrammer@users.noreply.github.com> Date: Tue, 1 Aug 2023 10:46:12 -0700 Subject: [PATCH] Fix: FreeTube Subscription Import --- src/components/ImportPage.vue | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/ImportPage.vue b/src/components/ImportPage.vue index 9e598018..98e269da 100644 --- a/src/components/ImportPage.vue +++ b/src/components/ImportPage.vue @@ -105,10 +105,15 @@ export default { } // FreeTube DB else if (text.indexOf("allChannels") != -1) { - const json = JSON.parse(text); - json.subscriptions.forEach(item => { - this.subscriptions.push(item.id); - }); + const lines = text.split("\n"); + for (let i = 0; i < lines.length; i++) { + if (lines[i] !== "") { + const json = JSON.parse(lines[i]); + json.subscriptions.forEach(item => { + this.subscriptions.push(item.id); + }); + } + } } // Google Takeout JSON else if (text.indexOf("contentDetails") != -1) {