add view to controls stations

This commit is contained in:
bkfox
2016-07-29 18:44:39 +02:00
parent 5329e983a4
commit 9728acef81
8 changed files with 378 additions and 4 deletions

View File

@ -61,6 +61,12 @@ class StationController(plugins.StationController):
except:
self.current_source = None
def skip(self):
"""
Skip a given source. If no source, use master.
"""
self._send(self.station.id_, '.skip')
class SourceController(plugins.SourceController):
rid = None
@ -86,7 +92,7 @@ class SourceController(plugins.SourceController):
"""
Skip a given source. If no source, use master.
"""
self._send(self.source.slug, '.skip')
self._send(self.source.id_, '.skip')
def fetch(self):
data = self._send(self.source.id_, '.get', parse = True)

View File

@ -154,7 +154,8 @@ class StationController:
"""
Skip the current sound on the station
"""
pass
if self.current_source:
self.current_source.controller.skip()
class SourceController: