Index: channels/ui_cht.py
==================================================================
--- channels/ui_cht.py
+++ channels/ui_cht.py
@@ -1,9 +1,9 @@
# 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,
@@ -22,10 +22,10 @@
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("{}\n{}".format(title, url, domain))