diff --git a/youtube_dl_gui/downloaders.py b/youtube_dl_gui/downloaders.py index 907199c..638e88e 100644 --- a/youtube_dl_gui/downloaders.py +++ b/youtube_dl_gui/downloaders.py @@ -360,6 +360,7 @@ def extract_data(stdout): 'playlist_size' : The number of videos in the playlist. """ + # REFACTOR def extract_filename(input_data): path, fullname = os.path.split(input_data.strip("\"")) filename, extension = os.path.splitext(fullname) @@ -460,6 +461,14 @@ def extract_data(stdout): data_dictionary['filename'] = filename data_dictionary['extension'] = extension + # Get final extension after recoding process + if stdout[1] == 'Converting': + path, filename, extension = extract_filename(' '.join(stdout_with_spaces[8:])) + + data_dictionary['path'] = path + data_dictionary['filename'] = filename + data_dictionary['extension'] = extension + elif stdout[0][0] != '[' or stdout[0] == '[debug]': pass # Just ignore this output