Fix: FreeTube Subscription Import

This commit is contained in:
ChunkyProgrammer 2023-08-01 10:46:12 -07:00
parent eba287e955
commit de50a8fc6c

View file

@ -105,10 +105,15 @@ export default {
} }
// FreeTube DB // FreeTube DB
else if (text.indexOf("allChannels") != -1) { else if (text.indexOf("allChannels") != -1) {
const json = JSON.parse(text); const lines = text.split("\n");
json.subscriptions.forEach(item => { for (let i = 0; i < lines.length; i++) {
this.subscriptions.push(item.id); if (lines[i] !== "") {
}); const json = JSON.parse(lines[i]);
json.subscriptions.forEach(item => {
this.subscriptions.push(item.id);
});
}
}
} }
// Google Takeout JSON // Google Takeout JSON
else if (text.indexOf("contentDetails") != -1) { else if (text.indexOf("contentDetails") != -1) {