mirror of
https://github.com/csd4ni3l/music-player.git
synced 2026-01-01 12:13:42 +01:00
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:
@@ -39,8 +39,7 @@ class FFmpegMissing(arcade.gui.UIView):
|
||||
"--accept-source-agreements", "--accept-package-agreements"
|
||||
], check=True)
|
||||
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))
|
||||
msgbox.on_action = lambda: sys.exit()
|
||||
sys.exit()
|
||||
return
|
||||
|
||||
except subprocess.CalledProcessError as e:
|
||||
|
||||
@@ -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])
|
||||
else:
|
||||
self.next_lyrics_label.text = '\n'.join(list(self.parsed_lyrics.values())[0:10])
|
||||
self.next_lyrics_label.fit_content()
|
||||
|
||||
if self.should_reload:
|
||||
self.should_reload = False
|
||||
|
||||
2
run.py
2
run.py
@@ -97,10 +97,12 @@ arcade.set_background_color(menu_background_color)
|
||||
print_debug_info()
|
||||
|
||||
if not pyglet.media.codecs.have_ffmpeg():
|
||||
logging.debug("FFmpeg is missing, opening FFmpeg popup...")
|
||||
from menus.ffmpeg_missing import FFmpegMissing
|
||||
menu = FFmpegMissing()
|
||||
|
||||
elif not os.path.exists(get_fpcalc_path()):
|
||||
logging.debug("fpcalc is missing, opening fpcalc popup...")
|
||||
from menus.fpcalc_missing import FpcalcMissing
|
||||
menu = FpcalcMissing()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user