From 379d789adc3b18e5fb712dee5eb02dfce4cb76a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Sun, 23 Sep 2018 16:28:44 +0200 Subject: [PATCH] Disbled hashing of filenames for now --- src/core.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/core.py b/src/core.py index 9cf7c11..8d06822 100755 --- a/src/core.py +++ b/src/core.py @@ -73,15 +73,17 @@ def scan_video(path): video.size = os.path.getsize(path) # hash of name - try: - if isinstance(video, Movie): - hash_str = ''.join([video.title, str(video.year) or '']) - elif isinstance(video, Episode): - hash_str = ''.join([video.series, str(video.season), str(video.episode)]) - videoHash = hashlib.md5(hash_str.encode()).hexdigest() - video.hash = videoHash - except: - print(video) + # if isinstance(video, Movie): + # if type(video.title) is str and type(video.year) is int: + # home_path = '{} ({})'.format(video.title, video.year) + # hash_str = ''.join([video.title, str(video.year) or '']) + # elif isinstance(video, Episode): + # if type(video.series) is str and type(video.season) is int and type(video.episode) is int: + # home_path = '{} ({})'.format(video.title, video.year) + # hash_str = ''.join([video.series, str(video.season), str(video.episode)]) + # video.hash = hashlib.md5(hash_str.encode()).hexdigest() + # except: + # print(video) return video