refactor(main): improve app structure and UI

This commit is contained in:
game-loader
2025-06-20 15:01:39 +08:00
parent b33ad5e876
commit 427eca08d0
6 changed files with 514 additions and 1370 deletions

View File

@@ -8,7 +8,7 @@ if PYGAME_AVAILABLE:
import pygame
if MOVIEPY_AVAILABLE:
from moviepy.editor import VideoFileClip
from moviepy import VideoFileClip
class AudioPlayer:
"""A class to handle audio extraction and playback for the video."""
@@ -37,7 +37,7 @@ class AudioPlayer:
temp_audio = tempfile.mktemp(suffix='.wav')
video_clip = VideoFileClip(video_path)
if video_clip.audio is not None:
video_clip.audio.write_audiofile(temp_audio, verbose=False, logger=None)
video_clip.audio.write_audiofile(temp_audio, logger=None)
video_clip.close()
return temp_audio
else: