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,11 +105,16 @@ 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");
for (let i = 0; i < lines.length; i++) {
if (lines[i] !== "") {
const json = JSON.parse(lines[i]);
json.subscriptions.forEach(item => { json.subscriptions.forEach(item => {
this.subscriptions.push(item.id); this.subscriptions.push(item.id);
}); });
} }
}
}
// Google Takeout JSON // Google Takeout JSON
else if (text.indexOf("contentDetails") != -1) { else if (text.indexOf("contentDetails") != -1) {
const json = JSON.parse(text); const json = JSON.parse(text);