Skip to content

Commit

Permalink
Update SimpleYoutubeDLGui.py
Browse files Browse the repository at this point in the history
Update this to the latest version from standalone
* This will correct a small bug that would have had to do with FFMPEG pathing
  • Loading branch information
jessielw committed Nov 11, 2021
1 parent 59b7808 commit 61b81f1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Packages/SimpleYoutubeDLGui.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ def open_browser_for_ffmpeg():
messagebox.showinfo(title='Error', message='Could Not Write to config.ini file, delete and try again')
# --------------------------------------------------- This creates the config file if on the standalone version

ffmpeg = config['ffmpeg_path']['path'] # Sets path to ffmpeg from config.ini
if not combined_with_ffmpeg_audio_encoder:
ffmpeg = pathlib.Path(config['ffmpeg_path']['path']) # Sets path to ffmpeg from config.ini'
if combined_with_ffmpeg_audio_encoder:
ffmpeg = pathlib.Path(config['ffmpeg_path']['path'].replace('"', '')) # Sets path to ffmpeg from config.ini

# Code needed to add location of ffmpeg.exe in the event it's missing for standalone version -----------------
# Code needed to add location of ffmpeg.exe in the event it's missing for standalone version ------------------
if not combined_with_ffmpeg_audio_encoder:
if not pathlib.Path(ffmpeg).is_file(): # Checks config for bundled app paths path ------------------------
def check_ffmpeg(): # FFMPEG -------------------------------------------------------------------------
Expand Down Expand Up @@ -445,7 +448,7 @@ def error(self, msg):
'merge_output_format': 'mkv',
'final_ext': 'mkv',
'outtmpl': str(pathlib.Path(VideoOutput)) + '/%(title)s.%(ext)s',
'ffmpeg_location': str(pathlib.Path(config['ffmpeg_path']['path'])),
'ffmpeg_location': str(ffmpeg),
'logger': MyLogger(),
"progress_with_newline": True,
'format': video_menu_options_choices[video_menu_options.get()]}
Expand All @@ -455,7 +458,7 @@ def error(self, msg):
'noplaylist': True,
'overwrites': True,
'outtmpl': str(pathlib.Path(VideoOutput)) + '/%(title)s.%(ext)s',
'ffmpeg_location': str(pathlib.Path(config['ffmpeg_path']['path'])),
'ffmpeg_location': str(ffmpeg),
'logger': MyLogger(),
"progress_with_newline": True,
'format': 'bestaudio/best',
Expand Down Expand Up @@ -553,5 +556,5 @@ def start_job_btn_hover_leave(e):

# Code needed for Standalone Release----------------------------------------------------------------------------------
if not combined_with_ffmpeg_audio_encoder:
youtube_dl_launcher_for_ffmpeguaudioencoder()
youtube_dl_launcher_for_ffmpegaudioencoder()
# ------------------------------------------------------------------------------------------ Code needed for Standalone

0 comments on commit 61b81f1

Please sign in to comment.