Don't replace apostrophes in qBittorrent input_name

Don't replace apostrophes in qBittorrent input_name - only trim if found at beginning/end of string.

This stops nzbtomedia processing the entire download folder when asked to process a folder with apostrophes in the title
This commit is contained in:
TheHolyRoger 2019-06-08 00:20:12 +01:00 committed by GitHub
commit 3237336775
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,7 +127,11 @@ def parse_qbittorrent(args):
except Exception:
input_directory = ''
try:
input_name = cur_input[1].replace('\'', '')
input_name = cur_input[1]
if input_name[0] == '\'':
input_name = input_name[1:]
if input_name[-1] == '\'':
input_name = input_name[:-1]
except Exception:
input_name = ''
try: