updated to update the playlis correctly

This commit is contained in:
2025-06-24 15:40:59 +03:00
parent c57bb7fe6d
commit 52328a81af
5 changed files with 3 additions and 1 deletions

4
app.py
View File

@@ -74,6 +74,8 @@ def add_image_to_playlist(file, filename, duration, target_type, target_id):
for player in group.players:
new_content = Content(file_name=filename, duration=duration, player_id=player.id)
db.session.add(new_content)
# Increment playlist version for each player in the group
player.playlist_version += 1
# Increment playlist version for the group
group.playlist_version += 1
elif target_type == 'player':
@@ -159,7 +161,7 @@ def convert_video(input_file, output_folder):
"-c:v", "libx264", # Video codec: H.264
"-preset", "fast", # Encoding speed/quality tradeoff
"-crf", "23", # Constant Rate Factor (quality, lower is better)
"-vf", "scale=-1:720", # Scale video to 720p (preserve aspect ratio)
"-vf", "scale=-1:1080", # Scale video to 720p (preserve aspect ratio)
"-r", "30", # Frame rate: 30 FPS
"-c:a", "aac", # Audio codec: AAC
"-b:a", "128k", # Audio bitrate

Binary file not shown.

BIN
static/uploads/123.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB