Index: channels/radiotray.py ================================================================== --- channels/radiotray.py +++ channels/radiotray.py @@ -1,10 +1,10 @@ # encoding: utf-8 # api: streamtuner2 # title: RadioTray hook # description: Allows to bookmark stations to RadioTray/NG -# version: 0.8 +# version: 0.9 # type: feature # category: bookmarks # depends: deb:python-dbus, deb:streamtuner2, deb:python-xdg # config: # { name: radiotray_map, type: select, value: "group", select: 'root|group|category|asis|channel|play', description: 'Map genres to default RadioTray groups, or just "root".' } @@ -24,11 +24,11 @@ # · "root" is just meant for the old Radiotray format. # · "group" tries to fit genres onto existing submenus. # · "category" maps just the channel category. # · "channel" instead creates `Shoutcast - Rock` entries. # · "asis" will transfer the literal station genre. -# · "play" is unused. +# · "play" for RT-NG to stream instantly (no bookmarking). # # With the old Radiotry this plugin will fall back to just # playUrl() until the addRadio remote call is added. # The patch for radiotray/DbusFacade.py would be: # + @@ -139,11 +139,14 @@ group = self.map_group(row.get("genre", self.parent.channel().current)) log.PROC("mapping genre '%s' to RT group '%s'" % (row["genre"], group)) # Radiotray-NG try: - self.radiotray_ng().add_radio(row["title"], row["url"], group) + if conf.radiotry_map == "play": + self.radiotray_ng().play_url(row["url"]) + else: + self.radiotray_ng().add_radio(row["title"], row["url"], group) except: try: cfg = self.radiotray_ng().get_config() self.save_rtng_json(cfg, row, group) self.radiotray_ng().reload_bookmarks()