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.79k stars 276 forks source link

DownloadStation Error #5588

Closed LaBoss closed 5 years ago

LaBoss commented 5 years ago

Describe the bug Synology Download dont work.

When sending is torrent to Syno Download the error program, and does not send anything ...

When I installed I also had to change the class name download_station_client.py to downloadstation_client.py to test.

Any help? I really wanted to change SickRage

To Reproduce Steps to reproduce the behavior:

  1. Send Torrent to DownloadStation

Expected behavior Torrent Added to DownloadStation

Medusa (please complete the following information):

Logs:

``` 2018-11-02 10:26:09 WARNING SNATCHQUEUE-MANUALSNATCH-349661 :: [0c0a735] DownloadStation: Unable to send Torrent 2018-11-02 10:26:09 WARNING SNATCHQUEUE-MANUALSNATCH-349661 :: [0c0a735] Error: {u'success': False, u'error': {u'code': 403}} 2018-11-02 10:26:09 ERROR SNATCHQUEUE-MANUALSNATCH-349661 :: [0c0a735] BraceMessage string formatting failed. Using representation instead. Traceback (most recent call last): File "/volume4/@appstore/sickbeard-custom/var/SickBeard/medusa/logger/adapters/style.py", line 53, in __str__ return self.msg.format(*args) KeyError: u"u'version'" Traceback (most recent call last): File "/volume4/@appstore/sickbeard-custom/var/SickBeard/medusa/logger/adapters/style.py", line 60, in __str__ raise BraceException(self.msg) BraceException: Add torrent URI with data: {u'version': u'1', u'api': u'SYNO.DownloadStation.Task', u'destination': u'/volume3/Downloads/Series', u'uri': u'magnet:?xt=urn:btih:bf4c68569d5dafbf4817a92fa16f4b6fb578120a&dn=The.Purge.S01E09.1080p.WEB.x264-TBS%5Brartv%5D&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710&tr=udp%3A%2F%2F9.rarbg.to%3A2710&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce&tr=udp://tracker.coppersurfer.tk:6969/announce&tr=udp://tracker.leechers-paradise.org:6969/announce&tr=udp://tracker.zer0day.to:1337/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=http://tracker.opentrackr.org:1337/announce&tr=udp://p4p.arenabg.com:1337/announce&tr=http://p4p.arenabg.com:1337/announce&tr=udp://explodie.org:6969/announce&tr=udp://9.rarbg.com:2710/announce&tr=http://explodie.org:6969/announce&tr=http://tracker.dler.org:6969/announce&tr=udp://public.popcorn-tracker.org:6969/announce&tr=udp://tracker.internetwarriors.net:1337/announce&tr=udp://ipv4.tracker.harry.lu:80/announce&tr=http://ipv4.tracker.harry.lu:80/announce&tr=udp://mgtracker.org:2710/announce&tr=http://mgtracker.org:6969/announce&tr=udp://tracker.mg64.net:6969/announce&tr=http://tracker.mg64.net:6881/announce&tr=http://torrentsmd.com:8080/announce', u'session': u'DownloadStation', u'method': u'create'} 2018-11-02 10:26:09 ERROR SNATCHQUEUE-MANUALSNATCH-349661 :: [0c0a735] BraceMessage string formatting failed. Using representation instead. Traceback (most recent call last): File "/volume4/@appstore/sickbeard-custom/var/SickBeard/medusa/logger/adapters/style.py", line 53, in __str__ return self.msg.format(*args) KeyError: u"u'version'" Traceback (most recent call last): File "/volume4/@appstore/sickbeard-custom/var/SickBeard/medusa/logger/adapters/style.py", line 60, in __str__ raise BraceException(self.msg) BraceException: Add torrent URI with data: {u'version': u'1', u'api': u'SYNO.DownloadStation.Task', u'destination': u'/volume3/Downloads/Series', u'uri': u'magnet:?xt=urn:btih:bf4c68569d5dafbf4817a92fa16f4b6fb578120a&dn=The.Purge.S01E09.1080p.WEB.x264-TBS%5Brartv%5D&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710&tr=udp%3A%2F%2F9.rarbg.to%3A2710&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce&tr=udp://tracker.coppersurfer.tk:6969/announce&tr=udp://tracker.leechers-paradise.org:6969/announce&tr=udp://tracker.zer0day.to:1337/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=http://tracker.opentrackr.org:1337/announce&tr=udp://p4p.arenabg.com:1337/announce&tr=http://p4p.arenabg.com:1337/announce&tr=udp://explodie.org:6969/announce&tr=udp://9.rarbg.com:2710/announce&tr=http://explodie.org:6969/announce&tr=http://tracker.dler.org:6969/announce&tr=udp://public.popcorn-tracker.org:6969/announce&tr=udp://tracker.internetwarriors.net:1337/announce&tr=udp://ipv4.tracker.harry.lu:80/announce&tr=http://ipv4.tracker.harry.lu:80/announce&tr=udp://mgtracker.org:2710/announce&tr=http://mgtracker.org:6969/announce&tr=udp://tracker.mg64.net:6969/announce&tr=http://tracker.mg64.net:6881/announce&tr=http://torrentsmd.com:8080/announce', u'session': u'DownloadStation', u'method': u'create'} ```
medariox commented 5 years ago

This is already fixed, see: https://github.com/pymedusa/Medusa/pull/5573 You can manually modify the files, switch to develop or wait for the next release.

LaBoss commented 5 years ago

Hello Switch to develop dont fix problem, change files also does not solve, try to wait to next release

medariox commented 5 years ago

Post the debug log error please.

LaBoss commented 5 years ago

Hello the log is

`2018-11-02 14:33:33 ERROR    SNATCHQUEUE-MANUALSNATCH-268592 :: [0c0a735] BraceMessage string formatting failed. Using representation instead.
Traceback (most recent call last):
  File "/volume4/@appstore/sickbeard-custom/var/SickBeard/medusa/logger/adapters/style.py", line 53, in __str__
    return self.msg.format(*args)
KeyError: u'"version"'
Traceback (most recent call last):
  File "/volume4/@appstore/sickbeard-custom/var/SickBeard/medusa/logger/adapters/style.py", line 60, in __str__
    raise BraceException(self.msg)
BraceException: ###Add torrent URI with data: {"version": "1", "api": "SYNO.DownloadStation.Task", "destination": "/volume3/Downloads/Series", "uri": "magnet:?xt=urn:btih:2fb39f9b0b55ce95b9b024d8866a02d458d02a68&dn=The.100.S05E13.REPACK.1080p.WEB.x264-METCON%5Brartv%5D&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710&tr=udp%3A%2F%2F9.rarbg.to%3A2710&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce&tr=udp://tracker.coppersurfer.tk:6969/announce&tr=udp://tracker.leechers-paradise.org:6969/announce&tr=udp://tracker.zer0day.to:1337/announce&tr=udp://tracker.opentrackr.org:1337/announce&tr=http://tracker.opentrackr.org:1337/announce&tr=udp://p4p.arenabg.com:1337/announce&tr=http://p4p.arenabg.com:1337/announce&tr=udp://explodie.org:6969/announce&tr=udp://9.rarbg.com:2710/announce&tr=http://explodie.org:6969/announce&tr=http://tracker.dler.org:6969/announce&tr=udp://public.popcorn-tracker.org:6969/announce&tr=udp://tracker.internetwarriors.net:1337/announce&tr=udp://ipv4.tracker.harry.lu:80/announce&tr=http://ipv4.tracker.harry.lu:80/announce&tr=udp://mgtracker.org:2710/announce&tr=http://mgtracker.org:6969/announce&tr=udp://tracker.mg64.net:6969/announce&tr=http://tracker.mg64.net:6881/announce&tr=http://torrentsmd.com:8080/announce", "session": "DownloadStation", "method": "create"}

I changed the log to make sure the file was being changed correctly


 def _add_torrent_uri(self, result):

        torrent_path = app.TORRENT_PATH

        data = {
            'api': 'SYNO.DownloadStation.Task',
            'version': '1',
            'method': 'create',
            'session': 'DownloadStation',
            'uri': result.url,
        }

        if not self._check_destination():
            return False

        if torrent_path:
            data['destination'] = torrent_path

        log.debug('###Add torrent URI with data: {0}'.format(json.dumps(data)))
        self._request(method='post', data=data)
        return self._check_response()
medariox commented 5 years ago

Please change log.debug('###Add torrent URI with data: {0}'.format(json.dumps(data))) to log.debug('###Add torrent URI with data: {0}', json.dumps(data)) and see if that works.

LaBoss commented 5 years ago

Thus no error ... but also does not write anything in the log ... However still without adding to DownloadStation

2018-11-02 14:52:13 WARNING  SNATCHQUEUE-MANUALSNATCH-268592 :: [0c0a735] DownloadStation: Unable to send Torrent
2018-11-02 14:52:13 WARNING  SNATCHQUEUE-MANUALSNATCH-268592 :: [0c0a735] Error: {u'success': False, u'error': {u'code': 403}}
2018-11-02 14:52:13 INFO     SNATCHQUEUE-MANUALSNATCH-268592 :: [0c0a735] Destination is now /volume3/Downloads/Series
2018-11-02 14:52:12 INFO     SNATCHQUEUE-MANUALSNATCH-268592 :: [0c0a735] Downloading The.100.S05E13.REPACK.1080p.WEB.x264-METCON[rartv] with 23 seeders and 2 leechers and size 1.88 GB from Rarbg
2018-11-02 14:52:12 INFO     SNATCHQUEUE-MANUALSNATCH-268592 :: [0c0a735] Beginning to manual snatch release: The.100.S05E13.REPACK.1080p.WEB.x264-METCON[rartv]

gives the 402 forbidden error

medariox commented 5 years ago

Thanks, you need to enable debug log to see it. Not sure about about the other issue, I don't have a Synology NAS to test it, check your settings/permissions?

LaBoss commented 5 years ago

Reinstall everything and change file with the log.debug('###Add torrent URI with data: {0}', json.dumps(data))

E found another problem the torrent search provider setting dont sabe after restart

and now all works

medariox commented 5 years ago

Fixed with https://github.com/pymedusa/Medusa/pull/5644