From 3eb3609a3894c308957ab246bbb44745c8211367 Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Sat, 15 Sep 2018 12:32:54 +0200 Subject: [PATCH 1/2] Fixed indentation of refine function and added path parameter the scan_folder function call --- src/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core.py b/src/core.py index aecdd72..5d6e0a0 100755 --- a/src/core.py +++ b/src/core.py @@ -219,7 +219,7 @@ def save_subtitles(files, single=False, directory=None, encoding=None): print() - def refine(video, episode_refiners=None, movie_refiners=None, **kwargs): +def refine(video, episode_refiners=None, movie_refiners=None, **kwargs): """Refine a video using :ref:`refiners`. .. note:: Exceptions raised in refiners are silently passed and logged. @@ -288,7 +288,7 @@ def main(): # hashList = organize_files(episodePath) # pprint(hashList) - videos = scan_folder() + videos = scan_folder(path) for video in videos: pprint(video) From 0badb4e9888f88922c06b211012d02d46c514e30 Mon Sep 17 00:00:00 2001 From: Kevin Midboe Date: Sat, 15 Sep 2018 12:34:18 +0200 Subject: [PATCH 2/2] Sets name_hash to correct variable hashid not name_hash.wq --- src/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.py b/src/core.py index 5d6e0a0..3839775 100755 --- a/src/core.py +++ b/src/core.py @@ -76,7 +76,7 @@ def scan_video(path): # hash of name hashids = Hashids(min_length=16) hashid = hashids.encode(path) - video.name_hash = name_hash + video.name_hash = hashid return video