diff --git a/modules/core/engine.py b/modules/core/engine.py index 4f9e9f67b2f3b889035c36162df107b37ad8ad68..a946cf3e529099c291b181df50641e06994dc780 100644 --- a/modules/core/engine.py +++ b/modules/core/engine.py @@ -245,19 +245,19 @@ class SoundSystem(): is_ready = False # LIVE - if entry.type == ChannelType.LIVE: + if entry.get_type() == ChannelType.LIVE: entry.channel = "linein_" + entry.source.split("line://")[1] is_ready = True else: # Choose and save the input channel - entry.previous_channel, entry.channel = self.channel_swap(entry.type) + entry.previous_channel, entry.channel = self.channel_swap(entry.get_type()) # PLAYLIST - if entry.type == ChannelType.FILESYSTEM: + if entry.get_type() == ChannelType.FILESYSTEM: is_ready = self.playlist_push(entry.channel, entry.source) # STREAM - elif entry.type == ChannelType.HTTP or entry.type == ChannelType.HTTPS: + elif entry.get_type() == ChannelType.HTTP or entry.get_type() == ChannelType.HTTPS: is_ready = self.stream_load_entry(entry) if is_ready == True: @@ -286,11 +286,11 @@ class SoundSystem(): # Validate entry type for entry in entries: - if entry.type != ChannelType.FILESYSTEM: + if entry.get_type() != ChannelType.FILESYSTEM: raise InvalidChannelException # Determine channel - channel = self.channel_swap(entry.type) + channel = self.channel_swap(entry.get_type()) # Queue entries for entry in entries: @@ -336,7 +336,7 @@ class SoundSystem(): self.disable_transaction() # Update active channel and type - self.active_channel[entry.type] = entry.channel + self.active_channel[entry.get_type()] = entry.channel # Dear filesystem channels, please leave the room as you would like to find it! if entry.previous_channel and entry.previous_channel in ChannelType.FILESYSTEM.channels: diff --git a/modules/database/model.py b/modules/database/model.py index a3a9a31bbce880c36d889070b7fa570a159e5279..ca2504b3548f611cfcad9dbc1fb689c3cef656b7 100644 --- a/modules/database/model.py +++ b/modules/database/model.py @@ -247,7 +247,7 @@ class Schedule(DB.Model, AuraDatabaseModel): "show": { "name": self.show_name, - "type": self.type, + "type": self.get_type(), "host": self.show_hosts }, @@ -451,8 +451,7 @@ class PlaylistEntry(DB.Model, AuraDatabaseModel): def volume(self): return 100 # FIXME Make DB Column - @hybrid_property - def type(self): + def get_type(self): return EngineUtil.get_channel_type(self.uri)