0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 13:52:00 +01:00
This commit is contained in:
Kuba
2025-11-01 18:03:06 +01:00
parent d5c9c9e5c3
commit 5f16b29011
3 changed files with 3 additions and 3 deletions

View File

@@ -29,7 +29,7 @@ class PlayerModule:
pass
def imc_data(self, source: 'PlayerModule | ActiveModifier | PlaylistAdvisor', data: object, broadcast: bool) -> object:
return None
def progess(self, index: int, track: Track, elapsed: float, total: float):
def progress(self, index: int, track: Track, elapsed: float, total: float):
pass
class PlaylistModifierModule:
"""

View File

@@ -8,6 +8,6 @@ def format_time(seconds):
return f"{hours:02d}:{minutes:02d}:{secs:02d}"
class Module(PlayerModule):
def progess(self, index: int, track: Track, elapsed: float, total: float):
def progress(self, index: int, track: Track, elapsed: float, total: float):
if track.official:
print(f"{os.path.basename(track.path)}: {format_time(elapsed)} / {format_time(total)}", end="\r", flush=True)

View File

@@ -216,7 +216,7 @@ def play_playlist(playlist_path):
start = time.time()
total_uptime = time.time() - loop_start
for module in simple_modules: module.progess(song_i, track, total_uptime, pr.duration)
for module in simple_modules: module.progress(song_i, track, total_uptime, pr.duration)
elapsed = time.time() - start
remaining_until_end = end_time - time.time()