auraenumerations.py 2.22 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
#  engine
#
#  Playout Daemon for autoradio project
#
#
#  Copyright (C) 2017-2018 Gottfried Gaisbauer <gottfried.gaisbauer@servus.at>
#
#  This file is part of engine.
#
#  engine is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  any later version.
#
#  engine is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with engine. If not, see <http://www.gnu.org/licenses/>.
#

from enum import Enum


class TerminalColors(Enum):
    HEADER = "\033[95m"

    RED = "\033[31m"
    GREEN = "\033[32m"
    ORANGE = "\033[33m"
    BLUE = "\033[34m"
    PINK = "\033[35m"
    CYAN = "\033[36m"

    WARNING = "\033[31m"
    FAIL = "\033[41m"

    BOLD = "\033[1m"
    UNDERLINE = "\033[4m"

    ENDC = "\033[0m"


class RedisChannel(Enum):
    STANDARD = "aura"

    DPE_REPLY = "delete_playlist_entry_reply"
    FNP_REPLY = "fetch_new_programme_reply"
    GAP_REPLY = "get_act_programme_reply"
    GCS_REPLY = "get_connection_status_reply"
54
    GNF_REPLY = "get_next_file_reply"
55
56
    IPE_REPLY = "insert_playlist_entry_reply"
    IP_REPLY  = "init_player_reply"
57
    TS_REPLY  = "track_service_reply"
58
59
60
61
62
63
64
    MPE_REPLY = "move_playlist_entry_reply"
    PMQ_REPLY = "print_message_queue_reply"
    RDB_REPLY = "recreate_database_reply"
    SNF_REPLY = "get_next_file_reply"


class ScheduleEntryType(Enum):
65
    # enumeration with names of liquidsoap inputs
66
67
    FILESYSTEM = "fs"
    STREAM  = "http"
68
69
70
71
    LIVE_0 = "aura_linein_0"
    LIVE_1 = "aura_linein_1"
    LIVE_2 = "aura_linein_2"
    LIVE_3 = "aura_linein_3"
72
73
74
75
76
    LIVE_4 = "aura_linein_4"


class FallbackType(Enum):
    SHOW = "show" # the first played when the show playlist fails
77
    TIMESLOT = "timeslot" # the second played when timeslot fallback fails
78
    STATION = "station" # the last played when everything else fails
79

80
81
82
83
84
85
86


class TimerType(Enum):
    SWITCH = "switch"
    FADEIN = "fadein"
    FADEOUT = "fadeout"