iv-org / invidious

Invidious is an alternative front-end to YouTube
https://invidious.io
GNU Affero General Public License v3.0
16.3k stars 1.81k forks source link

[Feature request] Automatically sync user data between multiple instances (or store it centrally) #2515

Closed xanoni closed 3 years ago

xanoni commented 3 years ago

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

I'd like to use multiple Inviduous instances and randomize selection every time a link is opened. There are browser extensions like Privacy-Redirect which automate this. Unfortunately, the user data (settings, subscriptions, playlists) is stored by the individual instances and requires manual export as JSON followed by re-import on the other instance. This is cumbersome in practice and prevents account sharing between instances.

Describe the solution you'd like

Option A) Allow users to run some lean server component that centrally stores their profile data (self-hosted). The instances would then pull the data from the central component.

Option B) Allow users to authorize instances to automatically synchronize the data of that specific user with a number of other instances. For that, the user would have to generate tokens on each instance and share the tokens with all other instances.

The latter is probably an easier solution from a user experience perspective (no self-hosting required by the user).

Describe alternatives you've considered

A) Only use one instance B) Write a client-side script that regularly pulls profile data from all instances, merges it, and re-imports it into all instances

Additional context

N/A

unixfox commented 3 years ago

In my opinion this kind of things should stay outside of invidious internal code. Like an external program that sync the local data with remote invidious instances through their API.

xanoni commented 3 years ago

In my opinion this kind of things should stay outside of invidious internal code. Like an external program that sync the local data with remote invidious instances through their API.

So that is my alternative (B) ?

unixfox commented 3 years ago

In my opinion this kind of things should stay outside of invidious internal code. Like an external program that sync the local data with remote invidious instances through their API.

So that is my alternative (B) ?

Yes that's correct. I went a bit deeper into the explanations because the API for that already exist: https://github.com/iv-org/documentation/blob/master/Authenticated-Endpoints.md

SamantazFox commented 3 years ago

Yeah, this is something that is way too complex to be implemented as part of invidious itself. That would require some sort of protocol similar to the fediverse (Mastodon, Diaspora, etc..), Matrix or even something entirely new. And we clearly don't have the resources for that.

However, as @unixfox said, the user API should already provide what you need to get and update user data from an external tool. Feel free to open a new PR if you need more things to be available through that API!

unixfox commented 3 years ago

Closing as we have no plans to implement this feature into invidious.