From 9f60eb917bda5de500ae0427318cabe1231c2bf0 Mon Sep 17 00:00:00 2001 From: Dario Date: Fri, 18 Nov 2016 16:30:24 +0100 Subject: [PATCH 1/3] Return full file path instead of parent in get_rel_path --- medusa/post_processor.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/medusa/post_processor.py b/medusa/post_processor.py index e5b764f7a6..5229572654 100644 --- a/medusa/post_processor.py +++ b/medusa/post_processor.py @@ -114,9 +114,7 @@ def _get_rel_path(self): except ValueError: pass - parent_name = os.path.basename(os.path.dirname(self.file_path)) - # return self.file_path once this bug is fixed: goo.gl/U4XNoP - return os.path.join(parent_name, self.file_name) + return self.file_path def _checkForExistingFile(self, existing_file): """ From a037a0faf634ea394f8e1fa8af9aec7055bf7c37 Mon Sep 17 00:00:00 2001 From: Dario Date: Fri, 18 Nov 2016 16:37:47 +0100 Subject: [PATCH 2/3] Update test_lib.py --- tests/legacy/test_lib.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/legacy/test_lib.py b/tests/legacy/test_lib.py index 0a9530473c..ea9af761ca 100644 --- a/tests/legacy/test_lib.py +++ b/tests/legacy/test_lib.py @@ -50,7 +50,6 @@ FILENAME = u"show name - s0" + str(SEASON) + "e0" + str(EPISODE) + ".mkv" FILE_DIR = os.path.join(TEST_DIR, SHOW_NAME) FILE_PATH = os.path.join(FILE_DIR, FILENAME) -REL_PATH = os.path.join(os.path.basename(os.path.dirname(FILE_PATH)), FILENAME) SHOW_DIR = os.path.join(TEST_DIR, SHOW_NAME + " final") From b8400e4e791c583d269a5f2dadbe86e509680b94 Mon Sep 17 00:00:00 2001 From: Dario Date: Fri, 18 Nov 2016 16:39:03 +0100 Subject: [PATCH 3/3] Update pp_tests.py --- tests/legacy/pp_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/legacy/pp_tests.py b/tests/legacy/pp_tests.py index 322fae18fd..d77efcfdf4 100644 --- a/tests/legacy/pp_tests.py +++ b/tests/legacy/pp_tests.py @@ -39,7 +39,7 @@ def test_init_file_name(self): self.assertEqual(self.post_processor.file_name, test.FILENAME) def test_init_folder_name(self): - self.assertEqual(self.post_processor.rel_path, test.REL_PATH) + self.assertEqual(self.post_processor.rel_path, test.FILE_PATH) class PPBasicTests(test.AppTestDBCase):