pymedusa / Medusa

Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
https://pymedusa.com
GNU General Public License v3.0
1.81k stars 278 forks source link

New Synology Downloadstation breaks integration #9366

Closed Tailslide closed 3 years ago

Tailslide commented 3 years ago

Just a FYI Medusa has this same issue with downloadstation 3.8.16.-3566

https://github.com/Sonarr/Sonarr/issues/4388

Downloading an older version of download station from here made medusa start working again: https://archive.synology.com/download/Package/DownloadStation/3.8.15-3563

Log: 2021-03-18 19:47:15 WARNING SNATCHQUEUE-SNATCH-78125 :: [55cecb9] DownloadStation: Unable to send Torrent 2021-03-18 19:47:15 WARNING SNATCHQUEUE-SNATCH-78125 :: [55cecb9] Error: 'Invalid parameter'

p0psicles commented 3 years ago

Would appreciate if someone with this version of ds and Synology would do a PR

sam5558 commented 3 years ago

Hello, Everything was working fine for me but yesterday i started having the same issue...

Sorry, i would love to help but i'm not really a dev :(

EDIT : Downgrading the DownloadStation fixes the issue. (Hope it is a temporary fix and some hero comes with a PR)

BenjV commented 3 years ago

I have no problem with Download Station and using torrents. My version of Download Station is 3.8.16-3566

BenjV commented 3 years ago

No I am not using 'Black Hole"

If it is random then most likely it has something to do with a timeout, is your Nas very busy? What type of Synology device do you use?

BenjV commented 3 years ago

Maybe it is dependent on the torrent you try to add. Can you give me a link to a torrent that failed?

p0psicles commented 3 years ago

That's a valid point @BenjV. As medusa can send the torrent as well as magnet url

But maybe there are even some other subtle differences here.

H85 commented 3 years ago

Performed some tests with different open providers and so far only been able to recreate the issue with eztv. Don't know if this provider parses a file or a magnet

BenjV commented 3 years ago

I found a mention on the web that adding to DownloadStation according to the API documentation should be done with a post command but only works correct with a get command. In the Medusa code a post is used as stated in the documentation from Synology

I will build a test application to test this in the debugger, I post the results when if have something. I already found some minor other issues with the Medusa current code.

p0psicles commented 3 years ago

@BenjV could you contact me on our discord. Have something to ask

BenjV commented 3 years ago

I have no Idea what your "discord" is.

p0psicles commented 3 years ago

https://discord.gg/zMdAdUK

BenjV commented 3 years ago

Still not able to reproduce the problem. Tried downloads from eztv but found no problem.

@H85 @sam5558 @Tailslide Can anyone please post a filename and provider for which this problem occurred?

sam5558 commented 3 years ago

@BenjV Not sure this will help but for me this happened 19/03 so i couldn't find exhaustive logs in the UI...

Anyway i think this happened with the following shows :

Based on what i could retrieve :

2021-03-20 12:08:45 WARNING  Thread_17 :: [55cecb9] Error while testing downloadstation connection: 'NoneType' object has no attribute 'status_code'
2021-03-20 12:06:43 ERROR    SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Snatch failed! For result: [Tsundere-Raws].Mushoku.Tensei.-.10.VOSTFR.[WEBRIP.1080p].mp4
Traceback (most recent call last):
  File "/app/medusa/medusa/search/queue.py", line 516, in run
    self.success = snatch_result(result)
  File "/app/medusa/medusa/search/core.py", line 168, in snatch_result
    result_downloaded = client.send_torrent(result)
  File "/app/medusa/medusa/clients/torrent/generic.py", line 240, in send_torrent
    if not self._get_auth():
  File "/app/medusa/medusa/clients/torrent/downloadstation.py", line 98, in _get_auth
    self.response.raise_for_status()
AttributeError: 'NoneType' object has no attribute 'raise_for_status'
2021-03-20 12:06:40 ERROR    SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Snatch failed! For result: [Tsundere-Raws].Mushoku.Tensei.-.09.VOSTFR.[WEBRIP.1080p].mp4
Traceback (most recent call last):
  File "/app/medusa/medusa/search/queue.py", line 516, in run
    self.success = snatch_result(result)
  File "/app/medusa/medusa/search/core.py", line 168, in snatch_result
    result_downloaded = client.send_torrent(result)
  File "/app/medusa/medusa/clients/torrent/generic.py", line 240, in send_torrent
    if not self._get_auth():
  File "/app/medusa/medusa/clients/torrent/downloadstation.py", line 98, in _get_auth
    self.response.raise_for_status()
AttributeError: 'NoneType' object has no attribute 'raise_for_status'
2021-03-20 12:06:37 ERROR    SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Snatch failed! For result: [Tsundere-Raws].Mushoku.Tensei.-.08.VOSTFR.[WEBRIP.1080p].mp4
Traceback (most recent call last):
  File "/app/medusa/medusa/search/queue.py", line 516, in run
    self.success = snatch_result(result)
  File "/app/medusa/medusa/search/core.py", line 168, in snatch_result
    result_downloaded = client.send_torrent(result)
  File "/app/medusa/medusa/clients/torrent/generic.py", line 240, in send_torrent
    if not self._get_auth():
  File "/app/medusa/medusa/clients/torrent/downloadstation.py", line 98, in _get_auth
    self.response.raise_for_status()
AttributeError: 'NoneType' object has no attribute 'raise_for_status'
2021-03-20 12:06:34 ERROR    SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Snatch failed! For result: [Tsundere-Raws].Mushoku.Tensei.-.07.VOSTFR.[WEBRIP.1080p].mp4
Traceback (most recent call last):
  File "/app/medusa/medusa/search/queue.py", line 516, in run
    self.success = snatch_result(result)
  File "/app/medusa/medusa/search/core.py", line 168, in snatch_result
    result_downloaded = client.send_torrent(result)
  File "/app/medusa/medusa/clients/torrent/generic.py", line 240, in send_torrent
    if not self._get_auth():
  File "/app/medusa/medusa/clients/torrent/downloadstation.py", line 98, in _get_auth
    self.response.raise_for_status()
AttributeError: 'NoneType' object has no attribute 'raise_for_status'
2021-03-20 12:06:31 ERROR    SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Snatch failed! For result: [Tsundere-Raws].Mushoku.Tensei.-.06.VOSTFR.[WEBRIP.1080p].mp4
Traceback (most recent call last):
  File "/app/medusa/medusa/search/queue.py", line 516, in run
    self.success = snatch_result(result)
  File "/app/medusa/medusa/search/core.py", line 168, in snatch_result
    result_downloaded = client.send_torrent(result)
  File "/app/medusa/medusa/clients/torrent/generic.py", line 240, in send_torrent
    if not self._get_auth():
  File "/app/medusa/medusa/clients/torrent/downloadstation.py", line 98, in _get_auth
    self.response.raise_for_status()
AttributeError: 'NoneType' object has no attribute 'raise_for_status'
2021-03-20 12:06:28 ERROR    SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Snatch failed! For result: [Tsundere-Raws].Mushoku.Tensei.-.05.VOSTFR.[WEBRIP.1080p].mp4
Traceback (most recent call last):
  File "/app/medusa/medusa/search/queue.py", line 516, in run
    self.success = snatch_result(result)
  File "/app/medusa/medusa/search/core.py", line 168, in snatch_result
    result_downloaded = client.send_torrent(result)
  File "/app/medusa/medusa/clients/torrent/generic.py", line 240, in send_torrent
    if not self._get_auth():
  File "/app/medusa/medusa/clients/torrent/downloadstation.py", line 98, in _get_auth
    self.response.raise_for_status()
AttributeError: 'NoneType' object has no attribute 'raise_for_status'
2021-03-20 12:06:25 ERROR    SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Snatch failed! For result: [RiPiT].Mushoku.Tensei.:.Isekai.Ittara.Honki.Dasu.-.04.VOSTFR.[WEB.1080p]
Traceback (most recent call last):
  File "/app/medusa/medusa/search/queue.py", line 516, in run
    self.success = snatch_result(result)
  File "/app/medusa/medusa/search/core.py", line 168, in snatch_result
    result_downloaded = client.send_torrent(result)
  File "/app/medusa/medusa/clients/torrent/generic.py", line 240, in send_torrent
    if not self._get_auth():
  File "/app/medusa/medusa/clients/torrent/downloadstation.py", line 98, in _get_auth
    self.response.raise_for_status()
AttributeError: 'NoneType' object has no attribute 'raise_for_status'
2021-03-20 12:06:22 ERROR    SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Snatch failed! For result: [Tsundere-Raws].Mushoku.Tensei.-.03.VOSTFR.[WEBRIP.1080p].mp4
Traceback (most recent call last):
  File "/app/medusa/medusa/search/queue.py", line 516, in run
    self.success = snatch_result(result)
  File "/app/medusa/medusa/search/core.py", line 168, in snatch_result
    result_downloaded = client.send_torrent(result)
  File "/app/medusa/medusa/clients/torrent/generic.py", line 240, in send_torrent
    if not self._get_auth():
  File "/app/medusa/medusa/clients/torrent/downloadstation.py", line 98, in _get_auth
    self.response.raise_for_status()
AttributeError: 'NoneType' object has no attribute 'raise_for_status'
2021-03-20 12:06:19 ERROR    SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Snatch failed! For result: [Tsundere-Raws].Mushoku.Tensei.-.02.VOSTFR.[WEBRIP.1080p].mp4
Traceback (most recent call last):
  File "/app/medusa/medusa/search/queue.py", line 516, in run
    self.success = snatch_result(result)
  File "/app/medusa/medusa/search/core.py", line 168, in snatch_result
    result_downloaded = client.send_torrent(result)
  File "/app/medusa/medusa/clients/torrent/generic.py", line 240, in send_torrent
    if not self._get_auth():
  File "/app/medusa/medusa/clients/torrent/downloadstation.py", line 98, in _get_auth
    self.response.raise_for_status()
AttributeError: 'NoneType' object has no attribute 'raise_for_status'
2021-03-20 12:06:16 ERROR    SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Snatch failed! For result: [matheousse].Mushoku.Tensei.-.01.MULTi.VF/VOSTFR.[WEBRip.1080p.AAC].[403F7454].mkv.(Jobless.Reincarnation)
Traceback (most recent call last):
  File "/app/medusa/medusa/search/queue.py", line 516, in run
    self.success = snatch_result(result)
  File "/app/medusa/medusa/search/core.py", line 168, in snatch_result
    result_downloaded = client.send_torrent(result)
  File "/app/medusa/medusa/clients/torrent/generic.py", line 240, in send_torrent
    if not self._get_auth():
  File "/app/medusa/medusa/clients/torrent/downloadstation.py", line 98, in _get_auth
    self.response.raise_for_status()
AttributeError: 'NoneType' object has no attribute 'raise_for_status'
2021-03-20 11:52:36 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-20 11:52:36 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Error: 'Invalid parameter'
2021-03-20 11:52:30 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-20 11:52:30 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Error: 'Invalid parameter'
2021-03-20 11:52:27 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-20 11:52:27 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Error: 'Invalid parameter'
2021-03-20 11:52:24 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-20 11:52:24 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Error: 'Invalid parameter'
2021-03-20 11:52:21 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-20 11:52:21 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Error: 'Invalid parameter'
2021-03-20 11:52:18 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-20 11:52:18 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Error: 'Invalid parameter'
2021-03-20 11:52:15 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-20 11:52:15 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Error: 'Invalid parameter'
2021-03-20 11:52:10 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-20 11:52:10 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Error: 'Invalid parameter'
2021-03-20 11:52:06 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-20 11:52:06 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Error: 'Invalid parameter'
2021-03-20 11:52:01 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-20 11:52:01 WARNING  SNATCHQUEUE-SNATCH-371310 :: [55cecb9] Error: 'Invalid parameter'
2021-03-20 11:49:54 WARNING  SHOWQUEUE-ADD :: [55cecb9] 371310: while adding the show Mushoku Tensei: Jobless Reincarnation we noticed thexem.de has an episode mapping available
you might want to consider enabling the scene option for this show.
2021-03-20 11:47:06 WARNING  APIv2-Thread_7 :: [55cecb9] Config patch ignored {'search': {'general': {'downloadHandlerFrequency': 60, 'mindownloadHandlerFrequency': 5}}}
2021-03-20 10:27:19 WARNING  SNATCHQUEUE-SNATCH-374191 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-20 10:27:19 WARNING  SNATCHQUEUE-SNATCH-374191 :: [55cecb9] Error: 'Invalid parameter'
2021-03-19 22:48:26 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-19 22:48:26 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] Error: 'Invalid parameter'
2021-03-19 22:42:50 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-19 22:42:50 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] Error: 'Invalid parameter'
2021-03-19 22:41:12 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] Torrent file content is empty: [Tsundere-Raws].JUJUTSU.KAISEN.-.23.VOSTFR.[CR.1080p].mp4
2021-03-19 22:39:07 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-19 22:39:07 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] Error: 'Invalid parameter'
2021-03-19 22:36:00 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-19 22:36:00 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] Error: 'Invalid parameter'
2021-03-19 22:08:14 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-19 22:08:14 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] Error: 'Invalid parameter'
2021-03-19 21:28:17 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-19 21:28:17 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] Error: 'Invalid parameter'
2021-03-19 20:48:12 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-19 20:48:12 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] Error: 'Invalid parameter'
2021-03-19 20:08:14 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-19 20:08:14 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] Error: 'Invalid parameter'
2021-03-19 20:03:53 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-19 20:03:53 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] Error: 'Invalid parameter'
2021-03-19 19:28:22 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-03-19 19:28:22 WARNING  SNATCHQUEUE-SNATCH-377543 :: [55cecb9] Error: 'Invalid parameter'
BenjV commented 3 years ago

Hmm does not help much. It show Medusa is trying to send Torrents tot Download Station and downloadstation replies with "Invalid parameter". En after a while Medusa tries to login on your Nas and you get an response of "None". Non of this I can reproduce on my Nas.

Did you change anything in your Nas concerning the username and/or password you are using for Medusa and forgot to change that in Medusa? Could you try to the "Test Connection" in Medusa on the downloadstation configuration page?

EDIT: Found the problem! If Medusa is using magetnet link everything works ok. If Medusa is "thinking" it found a ".torrent" file it is sending the "file" and not the "uri' to download Station which is wrong.

The file option is only to be used if you want to use a file located on the filesystem of the Nas, if it is a link (HTTP/FTP/magnet/ED2K) the uri option has to be used.

I will look for the best way to fix this, along with some other minor issues.

snechaev commented 3 years ago

@BenjV I'm not checked the code, but actually the file parameter is designed to give ability to the client to upload the file (torrent or similar) from the client. The file content is just passed as post body. And I can confirm that this worked fine for years until the latest DS update. So, if you need to pass url/path/magnet - you need uri parameter (and looks like you can use GET instead of POST). If you have torrent file and want to add corresponding download - you can only use POST with file parameter. Exactly this stopped working in latest DS.

BenjV commented 3 years ago

You are half correct. What Medusa is doing is also the link to a torrent file on the web sending als file to Download Station. For that Medusa need also use the 'uri' and not the file.

If you use the 'file" option in the DownLoad Station API then it expect a file on the local filesystem and not a link to something on the web.

This could never have worked.

This is an example what Medusa is sending to DownLoad Station when it does not find a magnetlink but a link to a .torrent file DownloadStation: Requested a POST connection to http://localhost:5000/webapi/DownloadStation/task.cgi with params: None Data: {'api': 'SYNO.DownloadStation.Task', 'version': '1', 'method': 'create', 'session': 'DownloadStation'} Files: {'file': ('The.Witcher.S01E08.480p.x264-mSD.EZTV.torrent', b'd8:announce34:udp://tracker.coppersurf...

The var "file" should be filled with the path+filename of the torrent file.

BenjV commented 3 years ago

I have located the problem. The API in the latest version of Download Station ( 3.8.16.-3566) is broken for downloading via a file, only uri's are working correct. On the positive side, Medusa actual does not need this functionality and all downloads can be done via an uri.

@p0psicles I will create a pull request to change Medusa so that it always uses uri's when I have the other changes you wanted ready and tested. I will add the same calls as for Transmission but you will have to make the changes in the gui so Medusa can use these calls..

sam5558 commented 3 years ago

I've reupdated to the latest version (3.8.16.-3566) and it's giving me the issue again. I suppose you're right @BenjV , but here's some additional logs in case someone needs them :

2021-04-03 11:09:29 WARNING SNATCHQUEUE-SNATCH-374191 :: [55cecb9] DownloadStation: Unable to send Torrent
2021-04-03 11:09:29 WARNING SNATCHQUEUE-SNATCH-374191 :: [55cecb9] Error: 'Invalid parameter'
2021-04-03 11:09:29 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] DownloadStation: Response to POST request is {"error":{"code":101},"success":false}
2021-04-03 11:09:29 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] With post data: --500e09f7486ac7628a82b12480ad68b9
 Content-Disposition: form-data; name="api"

 SYNO.DownloadStat...
2021-04-03 11:09:29 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] User-Agent: Medusa/0.5.10 (Linux; 4.4.59+; 4188d204-9460-11eb-8cf8-0242ac110004)
2021-04-03 11:09:29 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] POST URL: http://x.x.x.x:8000/webapi/DownloadStation/task.cgi [Status: 200]
2021-04-03 11:09:29 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] DownloadStation: Requested a POST connection to http://192.168.240.20:8000/webapi/DownloadStation/task.cgi with params: None Data: {'api': 'SYNO.DownloadStation.Task', 'version': '1', 'method': 'create', 'session': 'DownloadStation'} Files: {'file': ('[IssouCorp].Dragon.Quest.-.Dai.no.Daibouken.(2020).-.26.VOSTFR.[1080p].mkv.torrent', b'd...
2021-04-03 11:09:29 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] Add torrent files with data: {"api": "SYNO.DownloadStation.Task", "version": "1", "method": "create", "session": "DownloadStation"}
2021-04-03 11:09:29 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] User-Agent: Medusa/0.5.10 (Linux; 4.4.59+; 4188d204-9460-11eb-8cf8-0242ac110004)
2021-04-03 11:09:29 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] GET URL: http://x.x.x.x:8000/webapi/DownloadStation/info.cgi?api=SYNO.DownloadStation.Info&version=2&method=getinfo&session=DownloadStation [Status: 200]
2021-04-03 11:09:29 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] User-Agent: Medusa/0.5.10 (Linux; 4.4.59+; 4188d204-9460-11eb-8cf8-0242ac110004)
2021-04-03 11:09:29 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] GET URL: http://x.x.x.x:8000/webapi/auth.cgi?api=SYNO.API.Auth&version=2&method=login&account=**********&passwd=**********&session=DownloadStation&format=cookie [Status: 200]
2021-04-03 11:09:23 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] Calling DownloadStation Client
2021-04-03 11:09:23 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] User-Agent: Medusa/0.5.10 (Linux; 4.4.59+; 4188d204-9460-11eb-8cf8-0242ac110004)
2021-04-03 11:09:23 DEBUG   SNATCHQUEUE-SNATCH-374191 :: [55cecb9] GET URL: https://nyaa.si/download/1366742.torrent [Status: 200]
2021-04-03 11:09:23 INFO    SNATCHQUEUE-SNATCH-374191 :: [55cecb9] Downloading [IssouCorp].Dragon.Quest.-.Dai.no.Daibouken.(2020).-.26.VOSTFR.[1080p].mkv with 19 seeders and 19 leechers and size 1.40 GB from Nyaa, through a SearchType.BACKLOG_SEARCH search
2021-04-03 11:09:23 INFO    SNATCHQUEUE-SNATCH-374191 :: [55cecb9] Beginning to snatch release: [IssouCorp].Dragon.Quest.-.Dai.no.Daibouken.(2020).-.26.VOSTFR.[1080p].mkv
2021-04-03 11:09:21 INFO    FORCEDSEARCHQUEUE-BACKLOG-374191 :: [55cecb9] Downloading [IssouCorp].Dragon.Quest.-.Dai.no.Daibouken.(2020).-.26.VOSTFR.[1080p].mkv with 19 seeders and 19 leechers and size 1.40 GB from Nyaa
BenjV commented 3 years ago

@p0psicles It will take some time to do the other stuff on the Download Station API but in the meantime you can use this quick fix to solve the current problem.

In the "downloadstation.py" file you should add this on line 129

`        if result.url[:4].lower() in ['http', 'magn']:
            return self._add_torrent_uri(result)
`

If there is a uri available (always the case) then the add_torrent_uri is used instead of the add_torrent_file

This fix will solve the problem of the latest version of Download Station.

p0psicles commented 3 years ago

@BenjV can you double check the branch I created?

BenjV commented 3 years ago

I made a copy of your change and installed it on my Medusa installation on my Nas and it now it works flawless with both magnet links as well http(s) links on the latest version of DownLoad Station.

p0psicles commented 3 years ago

Merged fix to develop branch