diff --git a/GUI.py b/GUI.py index 020e386..66290db 100644 --- a/GUI.py +++ b/GUI.py @@ -124,7 +124,8 @@ def create_cuda_indicator(self): def create_ffmpeg_indicator(self): """ - Create an indicator light to show the status of the CUDA check. + Create an indicator to show the status of FFmpeg, and calls the method to use either the newest version of ffmpeg + or packaged version """ self.ffmpeg_indicator = QLabel(self) self.ffmpeg_indicator.setFixedSize(22, 22) # Increase size to include space for border and padding @@ -136,6 +137,7 @@ def create_ffmpeg_indicator(self): pixmap = QPixmap(icon_path).scaled(20, 20, Qt.KeepAspectRatio, Qt.SmoothTransformation) ffmpeg_path, is_packaged_version = Utils.get_ffmpeg_path(include_packaged_version=True) + self.ffmpeg_path = ffmpeg_path if is_packaged_version: self.ffmpeg_indicator.setStyleSheet(""" diff --git a/Smelt.py b/Smelt.py index df07797..1049218 100644 --- a/Smelt.py +++ b/Smelt.py @@ -64,7 +64,7 @@ def __init__(self): self.audio_file_path = None self.folder_path = None self.film_file_path = None - self.ffmpeg_path = ffmpeg_path + self.ffmpeg_path = None """ Initialize UI elements @@ -205,7 +205,7 @@ def recognize_and_combine_audio_files(self, selected_audio_file): proceed_combine = self.exist_check(combined_audio_file) ffmpeg_combine_audio_cmd = [ - ffmpeg_path, + self.ffmpeg_path, '-i', matching_files['L'], '-i', matching_files['R'], '-i', matching_files['C'], @@ -661,7 +661,6 @@ def enqueue_output(pipe, queue): Utils.setup() -ffmpeg_path = Utils.get_ffmpeg_path() app = QApplication(sys.argv) app.setStyle('Breeze') diff --git a/Utils.py b/Utils.py index 0af0906..84d5d47 100644 --- a/Utils.py +++ b/Utils.py @@ -66,9 +66,9 @@ def get_version(ffmpeg_path): version = version_line.split()[2] version_numbers = tuple(map(int, (version.split('-')[0]).split('.'))) return version_numbers - except Exception as e: - print(e) - return None + except FileNotFoundError: + print(f"FFmpeg executable not found at path: {ffmpeg_path}") + return None installed_ffmpeg_path = 'ffmpeg' diff --git a/resources/Smelt.spec b/resources/Smelt.spec index d0f3fe3..1b898ca 100644 --- a/resources/Smelt.spec +++ b/resources/Smelt.spec @@ -62,13 +62,13 @@ if is_linux: a.datas, [], name='Smelt', - debug=all, + debug=False, bootloader_ignore_signals=False, strip=False, upx=True, upx_exclude=[], runtime_tmpdir=None, - console=True, + console=False, disable_windowed_traceback=False, argv_emulation=False, target_arch=None,