mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-16 06:15:09 -05:00
Merge pull request #593 from tutipeti/feature/synods_destination
Destination option for the Synology DS
This commit is contained in:
commit
b312c9dcda
@ -448,6 +448,10 @@
|
|||||||
<span class="component-title"> </span>
|
<span class="component-title"> </span>
|
||||||
<span class="component-desc">Where should it save the downloaded files? (blank for default)</span>
|
<span class="component-desc">Where should it save the downloaded files? (blank for default)</span>
|
||||||
</label>
|
</label>
|
||||||
|
<label class="nocheck clearfix">
|
||||||
|
<span class="component-title"> </span>
|
||||||
|
<span class="component-desc"><b>Note:</b> For Synology DS the destination has to be a shared folder</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field-pair" id="Torrent_Seed_Time">
|
<div class="field-pair" id="Torrent_Seed_Time">
|
||||||
|
@ -93,7 +93,7 @@ $(document).ready(function(){
|
|||||||
$('#Torrent_Label').hide();
|
$('#Torrent_Label').hide();
|
||||||
$('#Torrent_username').show();
|
$('#Torrent_username').show();
|
||||||
$('#Torrent_Paused').hide();
|
$('#Torrent_Paused').hide();
|
||||||
$('#Torrent_Path').hide();
|
$('#Torrent_Path').show();
|
||||||
$('#Torrent_Ratio').hide();
|
$('#Torrent_Ratio').hide();
|
||||||
$('#Torrent_Seed_Time').hide();
|
$('#Torrent_Seed_Time').hide();
|
||||||
$('#Torrent_High_Bandwidth').hide();
|
$('#Torrent_High_Bandwidth').hide();
|
||||||
@ -102,6 +102,7 @@ $(document).ready(function(){
|
|||||||
$('#password_desc').text('Synology Password');
|
$('#password_desc').text('Synology Password');
|
||||||
$('#label_desc').text('Synology Label');
|
$('#label_desc').text('Synology Label');
|
||||||
$('#directory_desc').text('Synology Directory');
|
$('#directory_desc').text('Synology Directory');
|
||||||
|
$('#Torrent_Path').find('.fileBrowser').hide();
|
||||||
} else if (selectedProvider == "rtorrent"){
|
} else if (selectedProvider == "rtorrent"){
|
||||||
$('#t_blackhole_settings').hide();
|
$('#t_blackhole_settings').hide();
|
||||||
$('#torrent_settings').show();
|
$('#torrent_settings').show();
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
|
# 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
|
import sickbeard
|
||||||
from sickbeard.clients.generic import GenericClient
|
from sickbeard.clients.generic import GenericClient
|
||||||
@ -51,6 +51,8 @@ class DownloadStationAPI(GenericClient):
|
|||||||
'_sid':self.auth,
|
'_sid':self.auth,
|
||||||
'uri':result.url
|
'uri':result.url
|
||||||
}
|
}
|
||||||
|
if sickbeard.TORRENT_PATH:
|
||||||
|
data['destination'] = sickbeard.TORRENT_PATH
|
||||||
self._request(method='post', data=data)
|
self._request(method='post', data=data)
|
||||||
|
|
||||||
return self.response.json()['success']
|
return self.response.json()['success']
|
||||||
@ -63,6 +65,8 @@ class DownloadStationAPI(GenericClient):
|
|||||||
'session':'DownloadStation',
|
'session':'DownloadStation',
|
||||||
'_sid':self.auth
|
'_sid':self.auth
|
||||||
}
|
}
|
||||||
|
if sickbeard.TORRENT_PATH:
|
||||||
|
data['destination'] = sickbeard.TORRENT_PATH
|
||||||
files = {'file':(result.name + '.torrent', result.content)}
|
files = {'file':(result.name + '.torrent', result.content)}
|
||||||
self._request(method='post', data=data, files=files)
|
self._request(method='post', data=data, files=files)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user