mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-12-13 22:00:28 +05:30
parent
960f5d414c
commit
dcf6e672a9
@ -104,7 +104,7 @@ export default {
|
||||
const json = JSON.parse(text);
|
||||
this.subscriptions = json.subscriptions;
|
||||
}
|
||||
// Google Takeout
|
||||
// Google Takeout JSON
|
||||
if (text.indexOf("contentDetails") != -1) {
|
||||
const json = JSON.parse(text);
|
||||
json.forEach(item => {
|
||||
@ -112,6 +112,16 @@ export default {
|
||||
this.subscriptions.push(id);
|
||||
});
|
||||
}
|
||||
|
||||
// Google Takeout CSV
|
||||
if (text.indexOf("Channel Id,") != -1) {
|
||||
const lines = text.split("\n");
|
||||
for (let i = 1; i < lines.length; i++) {
|
||||
const line = lines[i];
|
||||
const id = line.substr(0, line.indexOf(","));
|
||||
if (id.length === 24) this.subscriptions.push(id);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handleImport() {
|
||||
|
Loading…
Reference in New Issue
Block a user