Skip to content

Commit

Permalink
Merge pull request #10193 from pymedusa/release/release-0.5.22
Browse files Browse the repository at this point in the history
Release/release 0.5.22
  • Loading branch information
p0psicles authored Dec 23, 2021
2 parents 3e258d2 + 539f356 commit 1405fbb
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.5.22 (23-12-2021)

#### Fixes
- Fix connecting to deluge version < 2.x ([10192](https://github.com/pymedusa/Medusa/pull/10192))

-----

## 0.5.21 (20-12-2021)

#### New Features
Expand Down
35 changes: 24 additions & 11 deletions medusa/clients/torrent/deluge.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,21 +223,34 @@ def _get_auth(self):
return self.auth

def _get_version(self):
params = {
'method': 'daemon.get_version',
'params': {},
'id': 12
}

version = self.session.post(
result = self.session.post(
self.url,
data=json.dumps(params),
data=json.dumps({
'method': 'daemon.get_version',
'params': {},
'id': 12
}),
verify=app.TORRENT_VERIFY_CERT
)

split_version = version.json()['result'].split('.')[0:2]
self.version = tuple(int(x) for x in split_version)
return self.version
result = result.json()
if not result.get('result'):
# Version 1.3.15 needs a different rpc method.
result = self.session.post(
self.url,
data=json.dumps({
'method': 'daemon.info',
'params': {},
'id': 12
}),
verify=app.TORRENT_VERIFY_CERT
)
result = result.json()

if result.get('result'):
split_version = result['result'].split('.')[0:2]
self.version = tuple(int(x) for x in split_version)
return self.version

def _add_torrent_uri(self, result):

Expand Down
2 changes: 1 addition & 1 deletion medusa/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
log.logger.addHandler(logging.NullHandler())

INSTANCE_ID = text_type(uuid.uuid1())
VERSION = '0.5.21'
VERSION = '0.5.22'

USER_AGENT = 'Medusa/{version} ({system}; {release}; {instance})'.format(
version=VERSION, system=platform.system(), release=platform.release(),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added themes/dark/assets/img/network/paramount+.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added themes/light/assets/img/network/paramount+.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1405fbb

Please sign in to comment.