mirror of
https://github.com/iv-org/invidious.git
synced 2026-11-01 17:37:15 +00:00
The current option to export subscriptions for NewPipe (`Export subscriptions as OPML (for NewPipe & FreeTube)`) isn't accepted by NewPipe anymore. As far as I can tell, NewPipe only accepts importing from its own SQLite database, from Google Account CSV export and from its own JSON export format. This is mentioned in https://github.com/iv-org/invidious/issues/5438. This PR adds support to export subscriptions in the NewPipe compatible format. I'm looking for input on a few points: - I'm not a huge fan of hardcoding the NewPipe version in the export, but it is required by NewPipe to recognize it as a valid file. If someone has a better idea I'm all ears but I think it's the only way. In any case, NewPipe can import formats in a backwards compatible way in the future so it shouldn't be a huge deal. - I haven't checked if the OPML export option actually works for FreeTube. If it doesn't, it should probably be removed altogether, for now I just removed the `(for NewPipe)` part. - The translations would need to be updated, but I don't know how that is handled in this project so I need some help there. The new format looks like this: ``` { "subscriptions": [ { "service_id": 0, "url": "https://www.youtube.com/channel/UCHnyfMqiRRG1u-2MsSQLbXA", "name": "Veritasium" }, { "service_id": 0, "url": "https://www.youtube.com/channel/UC6nSFpj9HTCZ5t-N3Rm3-HA", "name": "Vsauce" } ], "app_version": "0.29.0", "app_version_int": 1014 } ``` * add subscription json export for NewPipe * remove old newpipe export format * make newpipe export values constant * remove duplicate export option, add i18n keys * Convert to_newpipe to a serializable struct * Use same naming format as NewPipe for the exported subscriptions --------- Co-authored-by: Fijxu <fijxu@nadeko.net>