Commit bc0ac0e4 authored by David Trattnig's avatar David Trattnig
Browse files

Utility to get playlist type by ID.

parent 499d7bd2
......@@ -21,7 +21,7 @@ import datetime
import time
from enum import Enum
from modules.base.enum import Channel, ChannelType
from modules.base.enum import Channel, ChannelType, PlaylistType
......@@ -67,6 +67,28 @@ class EngineUtil:
def get_playlist_type(id):
Converts an playlist type ID to the playlist type object.
id (String): playlist type ID
type (PlaylistType): The type
if id == 0:
return PlaylistType.DEFAULT
elif id == 1:
return PlaylistType.SHOW
elif id == 2:
return PlaylistType.TIMESLOT
return PlaylistType.STATION
def get_entries_string(entries):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment