Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ ⎇ branch:  streamtuner2


Check-in [89269a097c]

Overview
Comment:Prevent crash on absent url:/title: field
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 89269a097c8562f3d71f39e1babbf44a07b09d79
User & Date: mario on 2016-12-24 20:16:31
Other Links: manifest | tags
Context
2016-12-24
20:18
Make record-stop button a distributed plugin. check-in: 096b121dee user: mario tags: trunk
20:16
Prevent crash on absent url:/title: field check-in: 89269a097c user: mario tags: trunk
20:11
Extra buttons sorted by icon name. -- Rocus check-in: dc1a3bfef9 user: mario tags: trunk
Changes

Modified channels/ui_cht.py from [d3d33c0fb0] to [97881ba0e4].

1
2
3
4

5
6
7
8
9
10
11
1
2
3

4
5
6
7
8
9
10
11



-
+







# encoding: utf-8
# title: Channel toolbar link
# description: Shows current channel and a link to online service in toolbar.
# version: 1.0
# version: 1.1
# depends: streamtuner2 >= 2.1.9
# type: feature
# category: ui
#
# Reintroduces the channel/service link in the toolbar,
# just like in streamtuner1.

20
21
22
23
24
25
26
27
28


29
30
31
20
21
22
23
24
25
26


27
28
29
30
31







-
-
+
+



    # Hook toolbar label
    def __init__(self, parent):
        self.label = parent.toolbar_link
        parent.hooks["switch"].append(self.switchy)

    # Update link label
    def switchy(self, meta, *x, **y):
        title = meta.get("title")
        url = meta.get("url")
        title = meta.get("title", meta.get("id", ("")))
        url = meta.get("url", "")
        domain = re.sub("^.+?//|/.+$", "", url)
        self.label.set_markup("<big><b>{}</b></big>\n<a href='{}'>{}</a>".format(title, url, domain))