Fix next lyrics label taking up space and making UI unuable sometimes, add debugging for fpcalc and ffmpeg missing, fix ffmpeg missing displaying wrong popup.

This commit is contained in:
csd4ni3l
2025-07-21 15:10:52 +02:00
parent 4d1357e876
commit e5a6fa4a2e
3 changed files with 4 additions and 2 deletions

View File

@@ -39,8 +39,7 @@ class FFmpegMissing(arcade.gui.UIView):
"--accept-source-agreements", "--accept-package-agreements" "--accept-source-agreements", "--accept-package-agreements"
], check=True) ], check=True)
logging.debug("FFmpeg installed via winget.") logging.debug("FFmpeg installed via winget.")
msgbox = self.add_widget(arcade.gui.UIMessageBox(message_text="You are on a Linux or Darwin based OS. You need to install FFmpeg, and libavcodec shared libraries from your package manager so it is in PATH.", width=self.window.width / 2, height=self.window.height / 2)) sys.exit()
msgbox.on_action = lambda: sys.exit()
return return
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError as e:

View File

@@ -464,6 +464,7 @@ class Main(arcade.gui.UIView):
self.next_lyrics_label.text = '\n'.join([self.parsed_lyrics[next_lyrics_time] for next_lyrics_time in next_lyrics_times]) self.next_lyrics_label.text = '\n'.join([self.parsed_lyrics[next_lyrics_time] for next_lyrics_time in next_lyrics_times])
else: else:
self.next_lyrics_label.text = '\n'.join(list(self.parsed_lyrics.values())[0:10]) self.next_lyrics_label.text = '\n'.join(list(self.parsed_lyrics.values())[0:10])
self.next_lyrics_label.fit_content()
if self.should_reload: if self.should_reload:
self.should_reload = False self.should_reload = False

2
run.py
View File

@@ -97,10 +97,12 @@ arcade.set_background_color(menu_background_color)
print_debug_info() print_debug_info()
if not pyglet.media.codecs.have_ffmpeg(): if not pyglet.media.codecs.have_ffmpeg():
logging.debug("FFmpeg is missing, opening FFmpeg popup...")
from menus.ffmpeg_missing import FFmpegMissing from menus.ffmpeg_missing import FFmpegMissing
menu = FFmpegMissing() menu = FFmpegMissing()
elif not os.path.exists(get_fpcalc_path()): elif not os.path.exists(get_fpcalc_path()):
logging.debug("fpcalc is missing, opening fpcalc popup...")
from menus.fpcalc_missing import FpcalcMissing from menus.fpcalc_missing import FpcalcMissing
menu = FpcalcMissing() menu = FpcalcMissing()