Skip to content
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

Is a RealDebrid integration possible? #6141

Open
itsToggle opened this issue May 2, 2022 · 12 comments
Open

Is a RealDebrid integration possible? #6141

itsToggle opened this issue May 2, 2022 · 12 comments

Comments

@itsToggle
Copy link

What problem are you are trying to solve?

I would like to rclone my RealDebrid Downloads. (So that I can use Plex to serve the files to family members)

How do you think rclone should be changed to solve that?

The RealDebrid api only allows for files to be downloaded, not uploaded and is very rudementary overall.
Would it be possible to make a read-only backend, that simply serves the downloaded files?
Ive had a look into the backend of premiumize, which is a pretty similar service.
If its too niche of a problem, could you guys maybe give me some pointers so that I can try to implement the backend myself?
Thanks!

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.
@Animosity022
Copy link
Collaborator

Very doubtful as it's not a cloud backend but a download tool.

https://github.com/rclone/rclone/blob/master/CONTRIBUTING.md#writing-a-new-backend

Can tag as a new backend, but unless you plan to implement it, I'll bet it just sits since there are so many requests for new backends without much demand/anyone to actually implement them.

@itsToggle
Copy link
Author

I see.. well thank you, i'll have a go at writing it myself then :)

@Animosity022
Copy link
Collaborator

ncw is very good at asnwering/helping as well.

Your request is the 56th new backend that's open right now to give an idea :)

@itsToggle

This comment was marked as outdated.

@itsToggle
Copy link
Author

itsToggle commented May 5, 2022

Previous comment of mine was solved by using cmount instead of WebDAV. WebDAV has file size limitations baked into windows.

To reiterate:
Ive rewritten some of the "premiumizeme" backend to instead call realdebrid's api. I can successfully use ls and lsd in the console. I can successfully mount the remote, using cmount remote: X:. Files can now be read on the virtual drive without any problems. Everything works as intended.

Is this something you guys want to implement? For my purposes im done, but if this were to be officially implemented, there are a few things that would need to be done:

  • turn my rewritten premiumizeme backend into a standalone backend. I dont really now where the backends are referenced.
  • remove all write capabilities (except for deletion), since they are non-functional.
  • prompt the user to enter the personal api key. This already is an option for premiumizeme, but I couldnt figure out how to show the prompt, so I hardcoded my api key. (oauth does not work on realdebrid, since there is no way to obtain a client secret)

Other than that I dont see any reason why this couldnt be implemented. Here is the fork im working with now: https://github.com/itsToggle/rclone_RD
Thanks again for your help!

@ncw
Copy link
Member

ncw commented May 5, 2022

@itsToggle if you want to submit this as a PR then check out: https://github.com/rclone/rclone/blob/master/CONTRIBUTING.md#writing-a-new-backend

It would be nice to have some sort of integration testing, but integration testing read only backends is quite hard.

  • turn my rewritten premiumizeme backend into a standalone backend. I dont really now where the backends are referenced.

The doc should answer that.

  • remove all write capabilities (except for deletion), since they are non-functional.

I'd recommend deleting as much code as possible, and making methods which are required but don't work return a not implemented error.

  • prompt the user to enter the personal api key. This already is an option for premiumizeme, but I couldnt figure out how to show the prompt, so I hardcoded my api key. (oauth does not work on realdebrid, since there is no way to obtain a client secret)

Check out the Options structure and the configuration of the backend. (Check one of the other backends). Its easy to add as much configuration as you want.

Other than that I dont see any reason why this couldnt be implemented. Here is the fork im working with now: https://github.com/itsToggle/rclone_RD Thanks again for your help!

It seems to be exactly the same as the premiumize me API other than the root URL and the auth? Are premiumizeme and RealDebrid related?

In that case an option in the premiumizeme backend would be the way to go which will save having to maintain another backend.

@itsToggle
Copy link
Author

Hey, Ive now added realdebrid as a seperate remote and created a pull request here: #6215

Thanks again for your help!

@ncw
Copy link
Member

ncw commented Jun 8, 2022

@itsToggle - I noticed you deleted your PR before I had a chance to review - are you going to add it back?

@itsToggle
Copy link
Author

Hey, yes Im just trying to check more boxes before I reopen the PR. Are the 'test' files for read-only remotes necessary? Or do I just not create a 'test_remote.go' file?

@ncw
Copy link
Member

ncw commented Jun 8, 2022

Read only remotes are almost impossible to integration test... You can't use test_remote.go as that needs to write to the repo.

Don't worry about it for the moment, and I'll have a think when I see your code in the PR.

@itsToggle
Copy link
Author

Thanks! I will create a new PR, since the main branch im working on has a changed README file.

@dreulavelle
Copy link

Any news on this by chance @ncw ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants