-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add remote sync capability - POC #442
Conversation
override val requiresSecret = true | ||
override val requiresClientId = true | ||
override val defaultFilenameValue = "cloudstreamapp-sync-file" | ||
override val defaultRedirectUrl = "https://chiff.github.io/cloudstream-sync/google-drive" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume Google doesn't allow to directly set the redirect url to cloudstreamapp://oauth/google-drive
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tldr; Yes you are right.
Took a while to figure this out. There are two viable approaches I am aware of.
Easiest for the user would be for cloudstream to create google console project, create an android oauth client and we would use in app login which is really smooth to use and looks really cool. However this may need to pay some kind of subscription because there is a quota for free. Also, there may be something like a privacy concern for users.
The other way (the one i implemented) is to create web client which allows redirects only to https origins and that's the reason for this redirect url. I tried deep links for smthn like https://my-non-existent.url/cloudstream/etc but I wasn't able to make it work. I think it is good compromise to create redirect url with cloudstream's gh-pages where source code is still visible for those concerned. Again, this method may seem more plausible for privacy concerned users as they have their own project under control.
Note: I will also create a guide to create projects and some explaining what it does. Im busy for next week and come back to implementation later the other on. I will still be able to answer any questions and if there is a need for
a conversation I created feature request in discord called "bidirectional device sync"
…multiple devices are online
…multiple devices are online
…d improve data restore (pt.2)
…as really changed (true -> true is not a change)
…ad scheduler is throttling job
hey @C10udburst im marking the PR as ready to review. can you please fork https://github.com/Chiff/cloudstream-sync into cloudstream and replace one url in help.html pointing to |
Done! https://recloudstream.github.io/cloudstream-sync/google-drive/ |
Co-Authored-By: Martin Filo <[email protected]>
Great, thanks :) i have also updated https://github.com/Chiff/cloudstream-sync to contain new url |
Hi @LagradOst , thank you very much for looking into this and identifying the problems and suggesting solutions. it is very helpful! :) I will make sure that I will test the icons and backup compatibility. The first two are easy to fix and will be done. with the other ones, there are two "problems" and I identify them as 1. performance and 2. user friendliness/ease of use
If there is any discussion needed I would be happy to talk it out through Discord (Chiffie#4015) |
For the TV's test, you can try downloading a emulator on your PC or connect a keyboard to your existing Android device and try navigating through the keyboard, but without using the alphabets and letters as they are not available to TVs. Moreover, this setup looks very complex. If you could add some provider, other than GDrive would be much cooler. Otherwise it's great for now👍 |
Is this complete? |
# Conflicts: # app/src/main/java/com/lagradost/cloudstream3/ui/player/GeneratorPlayer.kt # app/src/main/res/values/strings.xml
This will need to me moved to viewbindings |
I'm not sure what are you talking about. Is that the new merge conflicts? During this weekend I plan to look on the url shortening for easier sharing on TVs and then I'll try to resolve the conflicts. If it is indeed connected to the conflicts, can you share some commit hashes so I can orient myself better? Tbh I'll need to study a little on that matter |
TLDR: ALL the ui code needs to be changed as cloudstream moved from synthetic to viewbindings. so I wont merge any code that has synthetic. and yes that is why you have 1000 merge conflicts |
check out #507 for more info |
Thanks for the info, will change that :) |
I don't have time for this anymore. I will leave my repo visible and if anyone wants to continue the implementation. |
I will try to continue it 🫂 |
Good soup 🙏 |
This is still a work in progress, however, I'd like to receive feedback.
With this feature, users should be able to use CS on multiple devices, while we would sync their data (basically share DataStore.kt) on Google Drive. Each user will be using their own drive with their own credentials without storing their data by CS.
Usage:
0. User will set up the https://console.cloud.google.com/ project with GoogleDriveAPI enabled and will create OAuth2 web application credentials with an allowed redirect to "https://chiff.github.io/cloudstream-sync/google-drive" (this URL should be on CS repo) or URL they provide themselves
At the current state of PR this "works" but I need to work out how should we correctly sync data.