Private GIT

Skip to content
Snippets Groups Projects
Commit 99d816f4 authored by Fernando's avatar Fernando Committed by fernandog
Browse files

Only set torrent label if label is set and remove space for safety

Change space for "_" as space is not allowed
parent 5e1cdeaa
Branches
Tags
No related merge requests found
...@@ -82,9 +82,9 @@ class qbittorrentAPI(GenericClient): ...@@ -82,9 +82,9 @@ class qbittorrentAPI(GenericClient):
if result.show.is_anime: if result.show.is_anime:
label = sickbeard.TORRENT_LABEL_ANIME label = sickbeard.TORRENT_LABEL_ANIME
if self.api > 6: if self.api > 6 and label:
self.url = self.host + 'command/setLabel' self.url = self.host + 'command/setLabel'
data = {'hashes': result.hash.lower(), 'label': label} data = {'hashes': result.hash.lower(), 'label': label.replace(' ','_')}
return self._request(method='post', data=data, cookies=self.session.cookies) return self._request(method='post', data=data, cookies=self.session.cookies)
return None return None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment