Browse Source

Fix TestGetFiles.test_get_files test case & patch DownloadItem

doc-issue-template
MrS0m30n3 8 years ago
parent
commit
93e06be4f3
2 changed files with 3 additions and 3 deletions
  1. 2
      tests/test_ditem.py
  2. 4
      youtube_dl_gui/downloadmanager.py

2
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(), [])

4
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

Loading…
Cancel
Save