diff --git a/tests/test_ditem.py b/tests/test_ditem.py index 5636add..ad7229e 100644 --- a/tests/test_ditem.py +++ b/tests/test_ditem.py @@ -64,7 +64,7 @@ class TestGetFiles(unittest.TestCase): self.ditem.filenames = ["file1", "file2"] self.ditem.extensions = [".mp4", ".m4a"] - self.assertEqual(self.ditem.get_files(), [os.path.join(path, "file1", ".mp4"), os.path.join(path, "file2", ".m4a")]) + self.assertEqual(self.ditem.get_files(), [os.path.join(path, "file1" + ".mp4"), os.path.join(path, "file2" + ".m4a")]) def test_get_files_no_data(self): self.assertEqual(self.ditem.get_files(), []) diff --git a/youtube_dl_gui/downloadmanager.py b/youtube_dl_gui/downloadmanager.py index 857dfaf..c1112f9 100644 --- a/youtube_dl_gui/downloadmanager.py +++ b/youtube_dl_gui/downloadmanager.py @@ -123,8 +123,8 @@ class DownloadItem(object): files = [] for index, item in enumerate(self.filenames): - path = os.path.join(self.path, item, self.extensions[index]) - files.append(path) + filename = item + self.extensions[index] + files.append(os.path.join(self.path, filename)) return files