### Description Having a global intro and outro playlist in settings is not very flexible for special programming. This adds an override intro/outro playlist per show. If it is not set, the global one is used. also it's ignored if there's no autloading at all. **I have updated the documentation to reflect these changes**: Yes ### Testing Notes **What I did:** Schedule 2 shows, one without defining custom lists, one with defining custom lists. one hour before the show starts it should be populated correctly. If you define a global list it shojuld be replaced with the per-show list. --------- Co-authored-by: Thomas Göttgens <tgoettgens@mail.com>
51 lines
1.2 KiB
Python
51 lines
1.2 KiB
Python
from rest_framework import serializers
|
|
|
|
from ..models import Show, ShowDays, ShowHost, ShowInstance, ShowRebroadcast
|
|
|
|
|
|
class ShowSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = Show
|
|
fields = [
|
|
"id",
|
|
"name",
|
|
"description",
|
|
"genre",
|
|
"url",
|
|
"image",
|
|
"foreground_color",
|
|
"background_color",
|
|
"live_enabled",
|
|
"linked",
|
|
"linkable",
|
|
"auto_playlist",
|
|
"auto_playlist_enabled",
|
|
"auto_playlist_repeat",
|
|
"intro_playlist",
|
|
"outro_playlist",
|
|
]
|
|
|
|
|
|
class ShowDaysSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = ShowDays
|
|
fields = "__all__"
|
|
|
|
|
|
class ShowHostSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = ShowHost
|
|
fields = "__all__"
|
|
|
|
|
|
class ShowInstanceSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = ShowInstance
|
|
fields = "__all__"
|
|
|
|
|
|
class ShowRebroadcastSerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = ShowRebroadcast
|
|
fields = "__all__"
|