Skip to content

Commit

Permalink
Merge pull request #1590 from pymedusa/full-path-get-rel-path
Browse files Browse the repository at this point in the history
Return full file path instead of parent in get_rel_path
  • Loading branch information
ratoaq2 authored Nov 18, 2016
2 parents 532d8fc + b8400e4 commit 6c59d6e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
4 changes: 1 addition & 3 deletions medusa/post_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
2 changes: 1 addition & 1 deletion tests/legacy/pp_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion tests/legacy/test_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")


Expand Down

0 comments on commit 6c59d6e

Please sign in to comment.