updated to update the playlis correctly
This commit is contained in:
4
app.py
4
app.py
@@ -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
BIN
static/uploads/123.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 537 KiB |
BIN
static/uploads/20250605_09h44m12s_grim.png
Normal file
BIN
static/uploads/20250605_09h44m12s_grim.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 374 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.6 KiB |
Reference in New Issue
Block a user