diff --git a/modules/core/liquidsoap/playerclient.py b/modules/core/liquidsoap/playerclient.py index 35d54cf1eb0d2254df4e7a4eea578ddd8c438892..e2f5325bc3ff8b1fcb8df454eceee376eb063534 100644 --- a/modules/core/liquidsoap/playerclient.py +++ b/modules/core/liquidsoap/playerclient.py @@ -116,10 +116,10 @@ class LiquidSoapPlayerClient(LiquidSoapClient): # - # Playlist + # Queues # - def playlist_push(self, channel, uri): + def queue_push(self, channel, uri): """ Pushes the passed file URI to the `equeue` playlist channel. @@ -131,7 +131,7 @@ class LiquidSoapPlayerClient(LiquidSoapClient): return self.message - def playlist_seek(self, channel, duration): + def queue_seek(self, channel, duration): """ Forward the playing `equeue` track/playlist of the given channel. @@ -146,7 +146,7 @@ class LiquidSoapPlayerClient(LiquidSoapClient): return self.message - def playlist_clear(self, channel): + def queue_clear(self, channel): """ Clears all `equeue` playlist entries of the given channel. @@ -157,19 +157,36 @@ class LiquidSoapPlayerClient(LiquidSoapClient): Returns: Liquidsoap server response """ - if channel == Channel.FILESYSTEM_A.value: - self.command(channel, 'clear') - elif channel == Channel.FILESYSTEM_B.value: - self.command(channel, 'clear') + self.command(channel, 'clear') + return self.message + + + # + # Playlist + # + + def playlist_uri_set(self, channel, uri): + """ + Sets the URI of a playlist source. + + Args: + channel (String): Liquidsoap Source ID + uri (String): URI to the playlist file + + Returns: + Liquidsoap server response + """ + if channel == Channel.SCHEDULED_FALLBACK.value: + self.command(channel, 'uri', uri) else: return "Invalid filesystem channel '%s'" % channel return self.message - def playlist_uri(self, channel, uri): + def playlist_uri_clear(self, channel): """ - Sets the URI of a playlist source. + Clears the URI of a playlist source. Args: channel (String): Liquidsoap Source ID @@ -179,7 +196,7 @@ class LiquidSoapPlayerClient(LiquidSoapClient): Liquidsoap server response """ if channel == Channel.SCHEDULED_FALLBACK.value: - self.command(channel, 'uri', uri) + self.command(channel, 'clear') else: return "Invalid filesystem channel '%s'" % channel