Index: st2.py
==================================================================
--- st2.py
+++ st2.py
@@ -107,10 +107,13 @@
widgets = {} # non-glade widgets (the manually instantiated ones)
channels = {} # channel modules
features = {} # non-channel plugins
working = [] # threads
add_signals = {} # channel gtk-handler signals
+ hooks = {
+ "play": [favicon.download_playing], # observers queue here
+ }
# status variables
channel_names = ["bookmarks"] # order of channel notebook tabs
current_channel = "bookmarks" # currently selected channel name (as index in self.channels{})
@@ -128,11 +131,11 @@
self.extensionsCTM.set_submenu(self.extensions) # duplicates Station>Extension menu into stream context menu
# initialize channels
self.channels = {
"bookmarks": bookmarks(parent=self), # this the remaining built-in channel
- "shoutcast": None,#shoutcast(parent=self),
+ #"shoutcast": None,#shoutcast(parent=self),
}
gui_startup(3/20.0)
self.load_plugin_channels() # append other channel modules / plugins
@@ -308,11 +311,11 @@
# play button
def on_play_clicked(self, widget, event=None, *args):
row = self.row()
if row:
self.channel().play(row)
- favicon.download_playing(row)
+ [hook(row) for hook in self.hooks["play"]]
# streamripper
def on_record_clicked(self, widget):
row = self.row()
@@ -848,11 +851,11 @@
for name,meta in channels.module_meta().items():
# add plugin load entry
if name:
cb = gtk.CheckButton(name)
- cb.child.set_markup("%s (%s) %s\n%s" % (meta["title"], meta["type"], meta.get("version", ""), meta["description"]))
+ cb.get_children()[0].set_markup("%s (%s) %s\n%s" % (meta["title"], meta["type"], meta.get("version", ""), meta["description"]))
self.add_( "config_plugins_"+name, cb )
# look up individual plugin options, if loaded
if self.channels.get(name) or self.features.get(name):
c = self.channels.get(name) or self.features.get(name)
@@ -958,14 +961,13 @@
#
class bookmarks(GenericChannel):
# desc
- api = "streamtuner2"
module = "bookmarks"
title = "bookmarks"
- version = 4/10
+ version = 0.4
base_url = "file:.config/streamtuner2/bookmarks.json"
listformat = "*/*"
# i like this