From 87032a2a5e139b29d6e3b9a1d310e3236074c932 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 18 Aug 2012 22:11:19 +0200 Subject: [PATCH] movie.py: when replacing title in file name, strip leading whitespace --- ox/movie.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ox/movie.py b/ox/movie.py index 2cf5f89..03b96e9 100644 --- a/ox/movie.py +++ b/ox/movie.py @@ -123,7 +123,7 @@ def parse_path(path): data['title'] = title[:-len(match.group(0))] if match else title data['year'] = match.group(0)[2:-1] if match else None file_title = re.sub('[/:]', '_', data['title']) - file = re.sub('^' + re.escape(file_title) + '(?=.*\.)', '', file) + file = re.sub('^' + re.escape(file_title) + '(?=.*\.)', '', file).strip() parts = re.split('(?