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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [3bc568c0e4]

Overview
Comment:Register extension menu entries twice (main menu, and stream context submenu), to avert Gtk warning.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3bc568c0e4652ddcedcde8587075f5b3b3ccfa1b
User & Date: mario on 2015-04-01 15:40:57
Other Links: manifest | tags
Context
2015-04-01
15:42
More PixbufLoader workarounds for Gtk3, and get_data() casting for Python 3. check-in: f5d46dca11 user: mario tags: trunk
15:40
Register extension menu entries twice (main menu, and stream context submenu), to avert Gtk warning. check-in: 3bc568c0e4 user: mario tags: trunk
15:39
Add new packaging scheme: `bin` becomes /usr/bin/ stub, while `.zip.py` is used as __main__ handler for PYZ archive. check-in: 233327230c user: mario tags: trunk
Changes

Modified channels/myoggradio.py from [013f2545e5] to [ac171b964b].

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72


# open source radio sharing stie
class myoggradio(ChannelPlugin):

    # settings
    title ="MOR"
    module = "myoggradio"
    api = "http://www.myoggradio.org/"
    listformat = "url/direct"
    
    # hide unused columns
    titles = dict(playing=False, listeners=False, bitrate=False)
    
    # category map
    categories = ['common', 'personal']
    default = 'common'
    current = 'common'
    
    # netrc instance
    netrc = None
    
    
    
    # prepare GUI
    def __init__(self, parent):
        ChannelPlugin.__init__(self, parent)
        if parent:
            uikit.add_menu(parent.extensions, "Share in MyOggRadio", self.share)



    # this is simple, there are no categories
    def update_categories(self):
        pass








|




















|







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72


# open source radio sharing stie
class myoggradio(ChannelPlugin):

    # settings
    title ="MOR"
    #module = "myoggradio"
    api = "http://www.myoggradio.org/"
    listformat = "url/direct"
    
    # hide unused columns
    titles = dict(playing=False, listeners=False, bitrate=False)
    
    # category map
    categories = ['common', 'personal']
    default = 'common'
    current = 'common'
    
    # netrc instance
    netrc = None
    
    
    
    # prepare GUI
    def __init__(self, parent):
        ChannelPlugin.__init__(self, parent)
        if parent:
            uikit.add_menu([parent.extensions, parent.extensions_context], "Share in MyOggRadio", self.share)



    # this is simple, there are no categories
    def update_categories(self):
        pass

Modified channels/radiotray.py from [9e37f7f352] to [f93c102d40].

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
        # create category
        self.bm.add_category("radiotray", plugin=self);
        self.bm.streams["radiotray"] = self.update_streams(cat="radiotray")
        self.bm.reload_if_current(self.module)

        # add context menu
        if parent:
            uikit.add_menu(parent.extensions, "Keep in RadioTray", self.share)
        

    # load RadioTray bookmarks
    def update_streams(self, cat):
        r = []
        try:
            for group in ElementTree.parse(self.rt_xml).findall(".//group"):







|







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
        # create category
        self.bm.add_category("radiotray", plugin=self);
        self.bm.streams["radiotray"] = self.update_streams(cat="radiotray")
        self.bm.reload_if_current(self.module)

        # add context menu
        if parent:
            uikit.add_menu([parent.extensions, parent.extensions_context], "Keep in RadioTray", self.share)
        

    # load RadioTray bookmarks
    def update_streams(self, cat):
        r = []
        try:
            for group in ElementTree.parse(self.rt_xml).findall(".//group"):

Modified channels/timer.py from [185461bc28] to [6a77dbcb84].

55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
      if parent:
          
        # keep reference to main window
        self.parent = parent
        self.bookmarks = parent.bookmarks
        
        # add menu
        uikit.add_menu(self.parent.extensions, "Add timer for station", self.edit_timer)
        
        # target channel
        if not self.bookmarks.streams.get("timer"):
            self.bookmarks.streams["timer"] = [{"title":"--- timer events ---"}]
        self.bookmarks.add_category("timer")
        self.streams = self.bookmarks.streams["timer"]
        







|







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
      if parent:
          
        # keep reference to main window
        self.parent = parent
        self.bookmarks = parent.bookmarks
        
        # add menu
        uikit.add_menu([parent.extensions, parent.extensions_context], "Add timer for station", self.edit_timer)
        
        # target channel
        if not self.bookmarks.streams.get("timer"):
            self.bookmarks.streams["timer"] = [{"title":"--- timer events ---"}]
        self.bookmarks.add_category("timer")
        self.streams = self.bookmarks.streams["timer"]