diff --git a/resources/lib/mvupdate.py b/resources/lib/mvupdate.py index bc7fbeb..c525a9d 100644 --- a/resources/lib/mvupdate.py +++ b/resources/lib/mvupdate.py @@ -111,7 +111,7 @@ def _log(self, level, message, *args): parts = [] for arg in args: part = arg - if isinstance(arg, basestring): + if isinstance(arg, str): part = arg # arg.decode('utf-8') parts.append(part) output = '{} {} {}{}'.format( diff --git a/resources/lib/mvutils.py b/resources/lib/mvutils.py index 6ca594a..cc19d44 100644 --- a/resources/lib/mvutils.py +++ b/resources/lib/mvutils.py @@ -247,8 +247,8 @@ def build_url(query): def _chunked_url_copier(src, dst, reporthook, chunk_size, aborthook): aborthook = aborthook if aborthook is not None else lambda: False total_size = int( - src.info().getheader('Content-Length').strip() - ) if src.info() and src.info().getheader('Content-Length') else 0 + src.info().get('Content-Length').strip() + ) if src.info() and src.info().get('Content-Length') else 0 total_chunks = 0 while not aborthook(): diff --git a/resources/lib/storesqlite.py b/resources/lib/storesqlite.py index b702ce1..f62b240 100644 --- a/resources/lib/storesqlite.py +++ b/resources/lib/storesqlite.py @@ -986,7 +986,7 @@ def ft_insert_film(self, film, commit=True): # check if the movie is there idhash = hashlib.md5("{}:{}:{}".format( - self.ft_channelid, self.ft_showid, film['url_video'])).hexdigest() + self.ft_channelid, self.ft_showid, film['url_video']).encode('utf8')).hexdigest() cursor.execute(""" SELECT `id`, `touched` diff --git a/resources/lib/updater.py b/resources/lib/updater.py index 9edf86a..bf5ddab 100644 --- a/resources/lib/updater.py +++ b/resources/lib/updater.py @@ -357,7 +357,7 @@ def get_newest_list(self, full): self.notifier.show_download_error(url, err) return False except Exception as err: - self.logger.error('Failure writng {}', url) + self.logger.error('Failure writing {}', url) self.notifier.close_download_progress() self.notifier.show_download_error(url, err) return False