NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Sync between devices

Open AlexDumi29 opened this issue 4 years ago • 25 comments

Checklist

  • [x] I checked, but didn't find any duplicates (open OR closed) of this issue in the repo.
  • [x] I have read the contribution guidelines given at https://github.com/TeamNewPipe/NewPipe/blob/HEAD/.github/CONTRIBUTING.md.
  • [x] This issue contains only one feature request. I will open one issue for every feature I want to request.

Describe the feature you want

Sync playlists and subscriptions between devices.

Is your feature request related to a problem? Please describe it

I have two phones and a tablet and I have to add new subscriptions and videos manually. Import export exists but it' kind of tedious and from what I've observed a while ago not too reliable.

Additional context

How will you/everyone benefit from this feature?

I believe the community would benefit tremendously because of the ease of use this feature brings. Many more people would use Newpipe thanks to the simplicity of having all of your playlist and subscriptions in one place, plus people won't lose all of their subscriptions and playlists due to a bad export.

AlexDumi29 avatar Jan 01 '21 01:01 AlexDumi29

Will defeat the whole purpose of privacy until it is aes256 encrypted or something

Timmy183-ui avatar Jan 07 '21 16:01 Timmy183-ui

Probably this can be done with https://github.com/syncthing/syncthing ? Then the sync is safe regarding any privacy risks.

ovz93br43v7 avatar Jan 25 '21 08:01 ovz93br43v7

I, too, was going to recommend Syncthing. However, with the emergence of EteBase ( https://github.com/etesync ), I think it would be possible to create a clean, clutter-free database that all your devices could use to sync NewPipe. I would very much like to see this become a thing.

If nothing else, a DecSync ( https://github.com/39aldo39/DecSync ) like method with Syncthing would be great.

Zakkumaru avatar Feb 11 '21 22:02 Zakkumaru

I want to add my support to what @Zakkumaru said about implementing sync with etesync. It's the way to go in my opinion.

eternaltyro avatar Feb 18 '21 06:02 eternaltyro

#1163 is about (server based) sync

QJKX avatar Mar 06 '21 13:03 QJKX

Would love to be able to use Syncthing. Is this currently not possible because the NewPipe data/configuration are not accessible in the phone directory (without root)?

Thanks

tdehaeze avatar May 13 '21 15:05 tdehaeze

As freetube, the yt desktop client has no sync system yet too, but mention future plans to implement it, how cool it would be for NewPipe to collaborate on a common system! So we could sync not only across devices but across platforms!

cloo avatar May 24 '21 15:05 cloo

+1 for a simple Time based (daily, hourly etc ) Option to Import and Export database automatically in the background and use Syncthing to sync all my devices from a given Path on the storage.

Delikt avatar Jun 14 '21 18:06 Delikt

@Delikt I started using seedvault to backup my phone. It periodically writes app backups, including NewPipe and databases to a local folder - which Syncthing then syncs elsewhere.

Has been working well so far

sentriz avatar Jun 14 '21 19:06 sentriz

Maybe some kind of integration with cloud storages, eg. Nextcloud? The database would be storied and updated there and NewPipe would check if there are changes.

Garbulix avatar Jun 16 '21 15:06 Garbulix

Syncing state like this is not trivial and needs a custom implementation that is tailored for this purpose. Pretty much a dup of #1163 because if you can do cloud sync with multiple devices, you can do P2P sync or anything of that nature; it requires the same code.

RE general purpose syncers: These will not work because state changes need to be merged more precisely than on a file-level.

Example: You subscribed to channel foo on device A and to channel bar on device B while both couldn't talk to each other.

A file sync would mean choosing the state of the subscriptions list of either A or B (probably the older one): You'd lose one of the additions due to sync.
A custom syncer could merge these additions together because it'd know the semantics of the operations that were executed on each device. It'd arrive at a state of the subscriptions list which contains both foo and bar.

Atemu avatar Sep 15 '21 18:09 Atemu

I think you don't need to merge. You can periodically export and overwrite the backup ( if any changes occurred ) in the same way Scarlet Notes FD does. At that point, other applications can sync the backup.

faan11 avatar Jan 04 '22 20:01 faan11

That's a great way to lose data. I personally prefer to keep mine consistent.

Atemu avatar Jan 05 '22 08:01 Atemu

RE general purpose syncers: These will not work because state changes need to be merged more precisely than on a file-level.

This could work if the different devices exclusively wrote to different files (eg prefix filename with a unique device identifier).

There are various feedback problems that need to be designed around:

A canonical way to represent and order the contents of the file would be important to avoid 2 clients endlessly resyncing the same data.

Similarly you need to represent if data was deleted long enough to disambiguate it from data that was never there in the first place. Otherwise clients might get caught in a loop deleting and adding the same items.

QJKX avatar Jan 05 '22 17:01 QJKX

Definetly support this. Would be cool if one could access the subscriptions and playlist via a browser extension

fabian-st avatar Jul 11 '22 22:07 fabian-st

Maybe some kind of integration with cloud storages, eg. Nextcloud? The database would be storied and updated there and NewPipe would check if there are changes.

That's a great idea!

It wouldn't even be necessary to implement a new Nextcloud app: Nextcloud Bookmarks seems to fit the bill perfectly and you could even synchronize all your subscriptions and playlists with a browser. It features a public REST API which can be used to create, retrieve, modify and delete bookmarks as well as (sub-)folders.

The folder structure for subscriptions and playlists could look like this:

Subscriptions folder structure Playlists folder structure
NewPipe subscriptions/
├─ YouTube/
│  ├─ Channel1
│  ├─ Channel2
├─ PeerTube/
│  ├─ framatube.org/
│  │  ├─ Channel1
NewPipe playlists/
├─ Playlist1/
│  ├─ Video1
│  ├─ Video2
├─ Playlist2/

h4n23s avatar Aug 21 '22 22:08 h4n23s

Yes, yes, yes! We need more apps to start hopping onto decentralized file-based synchronization methods. That is a crucial step in reaching feature parity with "The Cloud" and ending that poison once and for all.

devycarol avatar Jan 27 '23 06:01 devycarol

Could we get an option to periodicaly/on change save the backup to a file so we could use Syncthing to backup it to the cloud?

Thank you for the great app

iulko avatar May 12 '23 20:05 iulko

@iulko that's a separate feature that belongs in a separate issue.

Atemu avatar May 13 '23 13:05 Atemu

Some input to reactivate this topic: Currently I use NewPipe as a compromise under windows (with the Windows Subysystem for Android), also because FreeTube is not running stable on my device. I (and i think many others) still miss the possibility to synchronize between devices. Import/Export function shouldn't remain as the only option - it's uncomfortable for many reasons. AntennaPod e.g. gives us with gpoddersync the possibility to synchronize between devices, and these are also just plain .xml, .rss etc. gpoddersync then can run (as a installed app: https://apps.nextcloud.com/apps/gpoddersync) on a nextcloud instance for synchronization. Maybe this could also be a way for NewPipe? FreeTube as a win-client could also follow this and implement an option for sync-function. Or is there a reason why this does not make sense?

gpoddersync repository: https://github.com/thrillfall/nextcloud-gpodder/tree/main

moagee avatar Sep 09 '23 13:09 moagee

Some input to reactivate this topic: Currently I use NewPipe as a compromise under windows (with the Windows Subysystem for Android), also because FreeTube is not running stable on my device. I (and i think many others) still miss the possibility to synchronize between devices. Import/Export function shouldn't remain as the only option - it's uncomfortable for many reasons. AntennaPod e.g. gives us with gpoddersync the possibility to synchronize between devices, and these are also just plain .xml, .rss etc. gpoddersync then can run (as a installed app: https://apps.nextcloud.com/apps/gpoddersync) on a nextcloud instance for synchronization. Maybe this could also be a way for NewPipe? FreeTube as a win-client could also follow this and implement an option for sync-function. Or is there a reason why this does not make sense?

gpoddersync repository: https://github.com/thrillfall/nextcloud-gpodder/tree/main

Something like #9973 that is a auto export to file (on change) and than user 3rd party tool to synchonize it? Wouldnt it be faster to implement and more customizable?

iulko avatar Sep 10 '23 12:09 iulko

Question: changing where newpipe looks for the database would be difficult?

If we could choose where to store and fetch the database, the user was able to choose whatever sync product it wants to use to have the same subscription list in several devices.

abacao avatar Feb 08 '24 10:02 abacao

Question: changing where newpipe looks for the database would be difficult?

If we could choose where to store and fetch the database, the user was able to choose whatever sync product it wants to use to have the same subscription list in several devices.

+1 to that, 3rd party program are the way to go, newpipe should not try to do their job, so just let us choose where we save database and check if the file changed

iulko avatar Feb 08 '24 11:02 iulko