youtube-dl-gui
youtube-dl-gui copied to clipboard
Fixed show and open file
#305
The asynchronous function tried to show/open the file even when it was null and the program didn't look for the proper file yet. The promise makes sure the program will show/open the file once it completed the previous steps.
There were also occasions where the file had a string between the actual file name and the file extension like .f140 or .f251. I didn't look for the root cause but I included some code which fixes that issue temporarily.
Another issue was that the the file sometimes had the incorrect file extension. The program now looks for the file even if file was assigned video.filename and was not null to make sure we get the correct file extension afterwards.