1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Changed the config page to show the path field for the Synology DS, added the parameter to the DS API

This commit is contained in:
Peter Tutervai 2014-06-09 01:01:47 +02:00
parent 3d062b3510
commit f24999b10d
3 changed files with 10 additions and 2 deletions

View File

@ -448,6 +448,10 @@
<span class="component-title">&nbsp;</span>
<span class="component-desc">Where should it save the downloaded files? (blank for default)</span>
</label>
<label class="nocheck clearfix">
<span class="component-title">&nbsp;</span>
<span class="component-desc"><b>Note:</b> For Synology DS the destination has to be a shared folder</span>
</label>
</div>
<div class="field-pair" id="Torrent_Seed_Time">

View File

@ -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();

View File

@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
#
# 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)