|
|
@ -27,7 +27,9 @@ class Audio(Bureau):
|
|
|
|
only supports line-out signals on the default DAC.
|
|
|
|
only supports line-out signals on the default DAC.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
shortcode, _ = data.split(".")
|
|
|
|
|
|
|
|
self.log.debug("looking up shortcode " + shortcode)
|
|
|
|
url = self.urldb.get(shortcode)
|
|
|
|
url = self.urldb.get(shortcode)
|
|
|
|
|
|
|
|
self.log.debug(" playing url " + url)
|
|
|
|
|
|
|
|
|
|
|
|
subprocess.call(["mocp", "-c"])
|
|
|
|
subprocess.call(["mocp", "-c"])
|
|
|
|
subprocess.call(["mocp", "-a", url])
|
|
|
|
subprocess.call(["mocp", "-a", url])
|
|
|
@ -67,6 +69,7 @@ class Audio(Bureau):
|
|
|
|
Prints the currently playing song or stream on the small printer.
|
|
|
|
Prints the currently playing song or stream on the small printer.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
out = subprocess.check_output(["mocp", "-i"])
|
|
|
|
out = subprocess.check_output(["mocp", "-i"])
|
|
|
|
|
|
|
|
self.log.debug("info output:" + out)
|
|
|
|
self.print_small(out)
|
|
|
|
self.print_small(out)
|
|
|
|
|
|
|
|
|
|
|
|
def save_url(self, url):
|
|
|
|
def save_url(self, url):
|
|
|
|