Check-in [06514f3645]
Overview
Comment: | Add DBUS play_url() support with `play` option. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
06514f3645a74c2115bb1e5f4900060b |
User & Date: | mario on 2018-12-31 11:42:19 |
Other Links: | manifest | tags |
Context
2018-12-31
| ||
19:44 | 2.2.1 check-in: a9da736771 user: mario tags: trunk | |
11:42 | Add DBUS play_url() support with `play` option. check-in: 06514f3645 user: mario tags: trunk | |
11:33 | Release as 2.2.1 check-in: 2877d4a4bb user: mario tags: trunk, 2.2.1 | |
Changes
Modified channels/radiotray.py from [d06646c6dc] to [1d0d5fe309].
1 2 3 4 | # encoding: utf-8 # api: streamtuner2 # title: RadioTray hook # description: Allows to bookmark stations to RadioTray/NG | | | 1 2 3 4 5 6 7 8 9 10 11 12 | # encoding: utf-8 # api: streamtuner2 # title: RadioTray hook # description: Allows to bookmark stations to RadioTray/NG # 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".' } # url: http://radiotray.sourceforge.net/ # priority: extra |
︙ | ︙ | |||
22 23 24 25 26 27 28 | # # The mapping options: # · "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. | | | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | # # The mapping options: # · "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" 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: # + # + @dbus.service.method('net.sourceforge.radiotray') # + def addRadio(self, title, url, group="root"): |
︙ | ︙ | |||
137 138 139 140 141 142 143 | row = self.parent.row() if row: 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: | > > > | | 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | row = self.parent.row() if row: 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: 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() self.parent.status("Exported to Radiotray. You may need to use Preferences > Reload Bookmarks.") except Exception as e: |
︙ | ︙ |