PATCH: Thumbnails not stop generating after stream ends

This commit is contained in:
2025-02-17 19:07:25 +00:00
parent 7af9cb1eb7
commit 62d83aa4eb
3 changed files with 14 additions and 8 deletions

View File

@@ -109,12 +109,13 @@ def generate_thumbnail(stream_file: str, thumbnail_file: str, retry_time=5, retr
break
except subprocess.CalledProcessError as e:
attempts -= 1
print("FFmpeg failed with an error:")
print(e.stderr.decode()) # Print detailed error message
print(f"Retrying in {retry_time} seconds...")
print(f"No information available, retrying in {retry_time} seconds...")
sleep(retry_time)
continue
if attempts == 0:
print(f"Failed to generate thumbnail for {stream_file}, skipping...")
def get_stream_tags(user_id: int) -> Optional[List[str]]:
"""
Given a stream return tags associated with the user's stream