1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 | # encoding: UTF-8
# api: streamtuner2
# title: bookmarks
# description: For collecting favourites. And provides some feature/category plugins.
# type: channel
# version: 1.5
# category: channel
# priority: core
# config: { name: like_my_bookmarks, type: boolean, value: 0, description: "I like my bookmarks" }
#
# Favourite lists.
#
# This module lists static content from ~/.config/streamtuner2/bookmarks.json.
# Any bookmarked station will appear with a star ★ icon in other channels.
#
# Some feature extensions inject custom subcategories here. For example the
# "search" feature adds its own result list here, as does the "timer" plugin.
#
#
from config import *
from mygtk import mygtk
from channels import *
# The bookmarks tab is a core feature and built into the GtkBuilder
# layout. Which is why it derives from GenericChannel, and requires
# less setup. |
|
|
|
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 | # encoding: UTF-8
# api: streamtuner2
# title: Bookmarks
# description: For collecting favourites. And provides some feature/category plugins.
# type: channel
# version: 1.5
# category: builtin
# priority: core
# config: { name: like_my_bookmarks, type: boolean, value: 0, description: "I like my bookmarks" }
#
# Favourite lists.
#
# This module lists static content from ~/.config/streamtuner2/bookmarks.json.
# Any bookmarked station will appear with a star ★ icon in other channels.
#
# Some feature extensions inject custom subcategories here. For example the
# "search" feature adds its own result list here, as does the "timer" plugin.
#
#
from config import *
from uikit import uikit
from channels import *
# The bookmarks tab is a core feature and built into the GtkBuilder
# layout. Which is why it derives from GenericChannel, and requires
# less setup. |
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127 |
# simplified gtk TreeStore display logic (just one category for the moment, always rebuilt)
def load(self, category, force=False):
__print__(dbg.UI, category, self.streams.keys())
self.streams[category] = self.update_streams(category)
#self.liststore[category] = \
mygtk.columns(self.gtk_list, self.datamap, self.prepare(self.streams[category]))
# add a categories[]/streams{} subcategory, update treeview
def add_category(self, cat, plugin=None):
if cat not in self.categories: # add category if missing
self.categories.append(cat)
self.display_categories() |
|
| 113
114
115
116
117
118
119
120
121
122
123
124
125
126
127 |
# simplified gtk TreeStore display logic (just one category for the moment, always rebuilt)
def load(self, category, force=False):
__print__(dbg.UI, category, self.streams.keys())
self.streams[category] = self.update_streams(category)
#self.liststore[category] = \
uikit.columns(self.gtk_list, self.datamap, self.prepare(self.streams[category]))
# add a categories[]/streams{} subcategory, update treeview
def add_category(self, cat, plugin=None):
if cat not in self.categories: # add category if missing
self.categories.append(cat)
self.display_categories() |