Browse Source

Merge pull request #7139 from thijstijsma/develop

Removed changing of global uTorrent settings.
pull/7145/head
Ruud Burger 9 years ago
committed by GitHub
parent
commit
fbf0672b8f
  1. 4
      .gitignore
  2. 20
      couchpotato/core/downloaders/utorrent.py

4
.gitignore

@ -10,3 +10,7 @@
.coverage
coverage.xml
nosetests.xml
# Visual Studio
/.vs

20
couchpotato/core/downloaders/utorrent.py

@ -1,4 +1,4 @@
from base64 import b16encode, b32decode
from base64 import b16encode, b32decode
from datetime import timedelta
from hashlib import sha1
import cookielib
@ -74,24 +74,6 @@ class uTorrent(DownloaderBase):
if not self.connect():
return False
settings = self.utorrent_api.get_settings()
if not settings:
return False
#Fix settings in case they are not set for CPS compatibility
new_settings = {}
if not (settings.get('seed_prio_limitul') == 0 and settings['seed_prio_limitul_flag']):
new_settings['seed_prio_limitul'] = 0
new_settings['seed_prio_limitul_flag'] = True
log.info('Updated uTorrent settings to set a torrent to complete after it the seeding requirements are met.')
if settings.get('bt.read_only_on_complete'): #This doesn't work as this option seems to be not available through the api. Mitigated with removeReadOnly function
new_settings['bt.read_only_on_complete'] = False
log.info('Updated uTorrent settings to not set the files to read only after completing.')
if new_settings:
self.utorrent_api.set_settings(new_settings)
torrent_params = {}
if self.conf('label'):
torrent_params['label'] = self.conf('label')

Loading…
Cancel
Save