1
0
mirror of https://github.com/TeamPiped/Piped.git synced 2024-12-12 21:30:27 +05:30

feat: support for subscription imports from FreeTube (#3426)

This commit is contained in:
endingisnight 2024-02-27 01:06:54 +02:00 committed by GitHub
parent 4b6aa54804
commit 6275202f2c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -88,10 +88,11 @@ export default {
});
}
// NewPipe
else if (text.indexOf("app_version") != -1) {
else if (text.indexOf("subscriptions") != -1) {
const json = JSON.parse(text);
json.subscriptions
.filter(item => item.service_id == 0)
// if service_id is undefined, chances are it's a freetube export
.filter(item => item.service_id == 0 || item.service_id == undefined)
.forEach(item => {
const url = item.url;
const id = url.slice(-24);