mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
Fixed small bug in the getUrl function for helpers.
This commit is contained in:
parent
36643acf5e
commit
4b1dc8a63e
2 changed files with 6 additions and 8 deletions
|
@ -204,13 +204,12 @@ def _remove_file_failed(file):
|
|||
|
||||
def download_file(url, filename):
|
||||
try:
|
||||
with closing(requests.get(url, stream=True)) as r:
|
||||
r = requests.get(url, stream=True)
|
||||
with open(filename, 'wb') as fp:
|
||||
for chunk in r.iter_content(chunk_size=(16 *1024)):
|
||||
for chunk in r.iter_content(chunk_size=1024):
|
||||
if chunk:
|
||||
fp.write(chunk)
|
||||
fp.flush()
|
||||
fp.close()
|
||||
|
||||
except requests.HTTPError, e:
|
||||
_remove_file_failed(filename)
|
||||
|
|
|
@ -243,7 +243,6 @@ def _xem_refresh(indexer_id):
|
|||
|
||||
try:
|
||||
logger.log(u'Looking up XEM scene mapping for show %s on %s' % (indexer_id, indexer,), logger.DEBUG)
|
||||
#data = getURL('http://thexem.de/map/all?id=%s&origin=tvdb&destination=scene' % (indexer_id,))
|
||||
data = None
|
||||
if 'Tvdb' in indexer:
|
||||
data = requests.get('http://thexem.de/map/all?id=%s&origin=tvdb&destination=scene' % (indexer_id,)).json()
|
||||
|
|
Loading…
Reference in a new issue