Add edit_on_player_enabled feature for playlist content
- Added edit_on_player_enabled column to playlist_content table - Updated playlist model to track edit enablement per content item - Added UI checkbox on upload media page to enable/disable editing - Added toggle column on manage playlist page for existing content - Updated API endpoint to return edit_on_player_enabled flag to players - Fixed docker-entrypoint.sh to use production config - Supports PDF, Images, and PPTX content types
This commit is contained in:
@@ -11,7 +11,8 @@ playlist_content = db.Table('playlist_content',
|
||||
db.Column('content_id', db.Integer, db.ForeignKey('content.id', ondelete='CASCADE'), primary_key=True),
|
||||
db.Column('position', db.Integer, default=0),
|
||||
db.Column('duration', db.Integer, default=10),
|
||||
db.Column('muted', db.Boolean, default=True)
|
||||
db.Column('muted', db.Boolean, default=True),
|
||||
db.Column('edit_on_player_enabled', db.Boolean, default=False)
|
||||
)
|
||||
|
||||
|
||||
@@ -78,7 +79,8 @@ class Playlist(db.Model):
|
||||
stmt = select(playlist_content.c.content_id,
|
||||
playlist_content.c.position,
|
||||
playlist_content.c.duration,
|
||||
playlist_content.c.muted).where(
|
||||
playlist_content.c.muted,
|
||||
playlist_content.c.edit_on_player_enabled).where(
|
||||
playlist_content.c.playlist_id == self.id
|
||||
).order_by(playlist_content.c.position)
|
||||
|
||||
@@ -91,6 +93,7 @@ class Playlist(db.Model):
|
||||
content._playlist_position = row.position
|
||||
content._playlist_duration = row.duration
|
||||
content._playlist_muted = row.muted if len(row) > 3 else True
|
||||
content._playlist_edit_on_player_enabled = row.edit_on_player_enabled if len(row) > 4 else False
|
||||
ordered_content.append(content)
|
||||
|
||||
return ordered_content
|
||||
|
||||
Reference in New Issue
Block a user