From 934aeeb37f0baec99966fd692c16dd101cab9ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20Midb=C3=B8e?= Date: Sat, 15 Sep 2018 12:15:56 +0200 Subject: [PATCH] Refine imported from utils and all calls to Video class no longer include path. --- src/core.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core.py b/src/core.py index 179ee1d..aecdd72 100755 --- a/src/core.py +++ b/src/core.py @@ -17,7 +17,7 @@ import env_variables as env from video import VIDEO_EXTENSIONS, Episode, Movie, Video from subtitle import SUBTITLE_EXTENSIONS, Subtitle, get_subtitle_path -from utils import sanitize +from utils import sanitize, refine logging.basicConfig(filename=env.logfile, level=logging.INFO) @@ -68,7 +68,7 @@ def scan_video(path): logging.info('Scanning video %r in %r', filename, dirpath) # guess - video = Video.fromguess(path, filename, guessit(path)) + video = Video.fromguess(path, guessit(path)) # size video.size = os.path.getsize(path) @@ -90,7 +90,7 @@ def scan_subtitle(path): # guess parent_path = path.strip(filename) - subtitle = Subtitle.fromguess(filename, parent_path, guessit(path)) + subtitle = Subtitle.fromguess(parent_path, guessit(path)) return subtitle @@ -238,6 +238,7 @@ def save_subtitles(files, single=False, directory=None, encoding=None): logger.info('Refining video with %s', refiner) try: print(refiner) + exit(0) refiner_manager[refiner].plugin(video, **kwargs) except: logger.exception('Failed to refine video')