mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00: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:
parent
3d062b3510
commit
f24999b10d
3 changed files with 10 additions and 2 deletions
|
@ -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();
|
||||||
|
|
|
@ -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 a new issue