mirror of
https://github.com/csd4ni3l/music-player.git
synced 2026-01-01 04:03: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"
|
"--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:
|
||||||
|
|||||||
@@ -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
2
run.py
@@ -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()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user