From f24999b10df61267327b2a30a165d18d3d925e8b Mon Sep 17 00:00:00 2001 From: Peter Tutervai Date: Mon, 9 Jun 2014 01:01:47 +0200 Subject: [PATCH 1/2] Changed the config page to show the path field for the Synology DS, added the parameter to the DS API --- gui/slick/interfaces/default/config_search.tmpl | 4 ++++ gui/slick/js/configSearch.js | 2 +- sickbeard/clients/download_station.py | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gui/slick/interfaces/default/config_search.tmpl b/gui/slick/interfaces/default/config_search.tmpl index 513d0316..c21d411c 100644 --- a/gui/slick/interfaces/default/config_search.tmpl +++ b/gui/slick/interfaces/default/config_search.tmpl @@ -448,6 +448,10 @@   Where should it save the downloaded files? (blank for default) +
diff --git a/gui/slick/js/configSearch.js b/gui/slick/js/configSearch.js index 9ddeaba2..2fba161f 100644 --- a/gui/slick/js/configSearch.js +++ b/gui/slick/js/configSearch.js @@ -93,7 +93,7 @@ $(document).ready(function(){ $('#Torrent_Label').hide(); $('#Torrent_username').show(); $('#Torrent_Paused').hide(); - $('#Torrent_Path').hide(); + $('#Torrent_Path').show(); $('#Torrent_Ratio').hide(); $('#Torrent_Seed_Time').hide(); $('#Torrent_High_Bandwidth').hide(); diff --git a/sickbeard/clients/download_station.py b/sickbeard/clients/download_station.py index 6e7fa3f4..62500ecc 100644 --- a/sickbeard/clients/download_station.py +++ b/sickbeard/clients/download_station.py @@ -18,7 +18,7 @@ # You should have received a copy of the GNU General Public License # along with SickRage. If not, see . # -# Uses the Synology Download Station API: http://download.synology.com/download/other/Synology_Download_Station_Official_API_V3.pdf. +# Uses the Synology Download Station API: http://download.synology.com/download/Document/DeveloperGuide/Synology_Download_Station_Web_API.pdf import sickbeard from sickbeard.clients.generic import GenericClient @@ -51,6 +51,8 @@ class DownloadStationAPI(GenericClient): '_sid':self.auth, 'uri':result.url } + if sickbeard.TORRENT_PATH: + data['destination'] = sickbeard.TORRENT_PATH self._request(method='post', data=data) return self.response.json()['success'] @@ -63,6 +65,8 @@ class DownloadStationAPI(GenericClient): 'session':'DownloadStation', '_sid':self.auth } + if sickbeard.TORRENT_PATH: + data['destination'] = sickbeard.TORRENT_PATH files = {'file':(result.name + '.torrent', result.content)} self._request(method='post', data=data, files=files) From 0658f161ee312f38153bf4820ad938d1c37e3ccb Mon Sep 17 00:00:00 2001 From: Peter Tutervai Date: Mon, 9 Jun 2014 01:03:28 +0200 Subject: [PATCH 2/2] Hid the browse button on the Synology DS configuration page as the entered path has to be a relative path from a shared directory --- gui/slick/js/configSearch.js | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/slick/js/configSearch.js b/gui/slick/js/configSearch.js index 2fba161f..cec16e27 100644 --- a/gui/slick/js/configSearch.js +++ b/gui/slick/js/configSearch.js @@ -102,6 +102,7 @@ $(document).ready(function(){ $('#password_desc').text('Synology Password'); $('#label_desc').text('Synology Label'); $('#directory_desc').text('Synology Directory'); + $('#Torrent_Path').find('.fileBrowser').hide(); } else if (selectedProvider == "rtorrent"){ $('#t_blackhole_settings').hide(); $('#torrent_settings').show();