mishpajz / RDRSS

RSS feed to real-debrid.com
MIT License
36 stars 3 forks source link

realdebrid gets stuck when it adds magnets #3

Closed redx113 closed 2 years ago

redx113 commented 3 years ago

I am using rarbg for magnets, but if you don't go to torrent page it will be a giant list of wanting to select files. what makes it worse is it bugs out saying you didnt select a file and if you try to select just certain ones, it claims did not select a file. So you have to click select all for it to process the magnets and than it ends up raring them up which means it isn't streamable.

Is there anyway you can update this script to auto select the video files by itself without anything else? It sends the magnets, but it doesn't select the files.

Hope you are still active and can get this fixed

Thanks

mishpajz commented 2 years ago

I think it is a bug in the Real-Debrid API, because the script does "select" the files it adds. Since it seems to be selecting them in the background, the solution is just to close the whole popup (without manually selecting anything in the background).

File compression is a different problem, the script would have to decide which files it wants to select (probably by looking at file extensions). By default it selects everything. It's a possible feature that could be implemented in the future (I don't plan to yet, but I'm leaving the possibility open).

X41 commented 2 years ago

i am currently dealing with the same issue in my own script magnet links do not contain metadata about the torrent, just the hash, trackers to query and usually the name of the torrent.

in order to actually know which files are even available, the RD server first has to query the trackers and get the list of actual files the torrent should contain. your tool (and mine lol) tell it to just download all files inside the torrent before RD even knows what files it contains, which is why it asks you to select the files when you open the torrent page the torrent page once you log in, it was never actually told what to download.

haven't built a way around that yet though, i'll probably set up a cron job or something that polls the state of the torrent and only sends the selectFiles request once an actual file list gets returned

Root-FTW commented 2 years ago

Creo que es un error en la API de Real-Debrid, porque el script "selecciona" los archivos que agrega. Dado que parece estar seleccionándolos en segundo plano, la solución es simplemente cerrar toda la ventana emergente (sin seleccionar manualmente nada en segundo plano).

La compresión de archivos es un problema diferente, el script tendría que decidir qué archivos quiere seleccionar (probablemente mirando las extensiones de archivo) . Por defecto selecciona todo. Es una característica posible que podría implementarse en el futuro (no planeo hacerlo todavía, pero dejo abierta la posibilidad).

@mishpajz I'm currently having this same problem, if anyone finds a way to fix it that would be great.

I would respectfully be willing to donate a couple of cups of coffee at ko-fi.com :)

This is how I currently see my realdebrid account every time I log in: 2022_08_14_21_03_22_Real_Debrid_All_in_one_solution

(it looks little because I had just cleaned it, but every day it looks like this)

The possibility of configuring more than 1 RSS would also be great, since I personally use 2 RSS sources, and I have configured my PC to run the script once a day with a .bat:

2022_08_14_21_08_11_

I don't know if this is the best way to do this task automatically, or if there is a more efficient way to do it.

*Those 2 RSS feeds add on average 1 or maximum 2 movies a day, they are not very active, but they are the ones that I personally need :)

X41 commented 2 years ago

what i ended up doing in my tool since it runs as a service was to essentially do this every couple of minutes

torrents = requests.get(f"https://api.real-debrid.com:443/rest/1.0/torrents?limit=100", headers=headers).json()
for torrent in torrents:
        if torrent["status"] == "waiting_files_selection":
                requests.post(f"https://api.real-debrid.com:443/rest/1.0/torrents/selectFiles/{torrent["id"]}", data={"files":"all"}, headers=headers)

you could add an additional flag to the script to perform nothing but this test and have people run it as a service or cron job to periodically check for unstarted torrents

Root-FTW commented 2 years ago

lo que terminé haciendo en mi herramienta, ya que se ejecuta como un servicio, fue esencialmente hacer esto cada dos minutos

torrents = requests.get(f"https://api.real-debrid.com:443/rest/1.0/torrents?limit=100", headers=headers).json()
for torrent in torrents:
        if torrent["status"] == "waiting_files_selection":
                requests.post(f"https://api.real-debrid.com:443/rest/1.0/torrents/selectFiles/{torrent["id"]}", data={"files":"all"}, headers=headers)

podría agregar un indicador adicional al script para realizar nada más que esta prueba y hacer que las personas lo ejecuten como un servicio o trabajo cron para verificar periódicamente los torrents no iniciados

This code that you use, do you add the rdrss.py?

If so, where do you add it?

I would like to do this :(

X41 commented 2 years ago

i believe headers is not global in rdrss.py, but if you put headers = {"Authorization": "Bearer " + auth_token} at the top of my code snippet and just place that at the end of the script i see no reason why it shouldn't work