user234683 / youtube-local

browser-based client for watching Youtube anonymously and with greater page performance
GNU Affero General Public License v3.0
504 stars 63 forks source link

Feature Request: Import and Export from and to NewPipe #82

Closed Sogolumbo closed 3 years ago

Sogolumbo commented 3 years ago

I think it would be great if it was possible to import the subscriptions form newpipe and export the subscriptions to NewPipe. This way it is possible to synchronize the subscriptions betwen different devices.

The NewPipe Format is a json file of the following kind:

{
    "app_version": "x.xx.xx",
    "app_version_int": xxx,
    "subscriptions": [
        {
            "service_id": 0,
            "url": "https://www.youtube.com/channel/xxx",
            "name": "xxx"
        },
        {
            "service_id": 1,
            "url": "https://www.youtube.com/channel/xxx",
            "name": "xxx"
        }
    ]   
}   

Also it would be great if there was a little more info about the format of the files for the import next to the button (or a link to a site with more infos).

Sogolumbo commented 3 years ago

I found a pretty easy way to convert files from the NewPipe json format into Googles csv export format:

Edit: turns out this is not the format required by youtube local :/

In notepad++ or any other tool that supports regular expression replacement: Search for: {"service_id":\d+,"url":"(https:\/\/www.youtube.com\/channel\/([^\"]*))","name":"([^\"]*)"}, and replace it with: $2,$1,$3\n

You may also have to remove all entries that are for soundcloud and other sites: Search for: {"service_id":\d+,"url":"(https:\/\/soundcloud.com\/([^\"]*))","name":"([^\"]*)"}, and replace it with blank.