0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 21:53:54 +01:00

play 5 seconds before

This commit is contained in:
2025-08-15 11:36:38 +02:00
parent 59598a1eb1
commit 955a756e6e

View File

@@ -224,6 +224,9 @@ def play_audio_with_resume(track_path, resume_seconds=0):
"""Play audio file, optionally resuming from a specific position"""
cmd = ['ffplay', '-nodisp', '-hide_banner', '-autoexit', '-loglevel', 'quiet']
resume_seconds -= 5
resume_seconds = max(0, resume_seconds)
if resume_seconds > 0:
cmd.extend(['-ss', str(resume_seconds)])