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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [e98ac20fc6]

Overview
Comment:Shorten plugins with new init2() callback.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e98ac20fc689b7ed288b9e95e41ea9ae1b355377
User & Date: mario on 2016-11-07 14:37:12
Other Links: manifest | tags
Context
2016-11-07
16:28
Move reddit into distributed plugins, add some midi subreddits. check-in: 747bc65a0b user: mario tags: trunk
14:37
Shorten plugins with new init2() callback. check-in: e98ac20fc6 user: mario tags: trunk
14:36
Remove last remaining `newstation_cancel` signal reference check-in: 631ecdc077 user: mario tags: trunk
Changes

Modified channels/myoggradio.py from [7b06347ed0] to [459b01f587].

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
    
    # category map
    categories = ['common', 'personal']
    
    
    
    # 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)
            uikit.add_menu([parent.streammenu, parent.streamactions], "Share in MyOggRadio", self.share, insert=4)



    # this is simple, there are no categories







|
<







52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
    
    # category map
    categories = ['common', 'personal']
    
    
    
    # prepare GUI
    def init2(self, parent):

        if parent:
            #uikit.add_menu([parent.extensions, parent.extensions_context], "Share in MyOggRadio", self.share)
            uikit.add_menu([parent.streammenu, parent.streamactions], "Share in MyOggRadio", self.share, insert=4)



    # this is simple, there are no categories

Modified channels/radiobrowser.py from [0e7f4074c1] to [f73f375ada].

70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
    titles = dict(listeners="Votes+", bitrate="Votes-", playing="Country")
    base = "http://www.radio-browser.info/webservice/json/"
    categories = []
    pricat = ("topvote", "topclick")
    catmap = { "tags": "bytag", "countries": "bycountry", "languages": "bylanguage" }

    # hook menu
    def __init__(self, parent):
        ChannelPlugin.__init__(self, parent)
        if parent:
            uikit.add_menu([parent.streammenu, parent.streamactions], "Share in Radio-Browser", self.submit, insert=5)

    # votes, and tags, no countries or languages
    def update_categories(self):
        self.categories = list(self.pricat)
        for sub in [conf.radiobrowser_cat]:







|
<







70
71
72
73
74
75
76
77

78
79
80
81
82
83
84
    titles = dict(listeners="Votes+", bitrate="Votes-", playing="Country")
    base = "http://www.radio-browser.info/webservice/json/"
    categories = []
    pricat = ("topvote", "topclick")
    catmap = { "tags": "bytag", "countries": "bycountry", "languages": "bylanguage" }

    # hook menu
    def init2(self, parent):

        if parent:
            uikit.add_menu([parent.streammenu, parent.streamactions], "Share in Radio-Browser", self.submit, insert=5)

    # votes, and tags, no countries or languages
    def update_categories(self):
        self.categories = list(self.pricat)
        for sub in [conf.radiobrowser_cat]:

Modified channels/surfmusik.py from [42aa02e156] to [11fb0c16cd].

52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
       "EN": ("http://www.surfmusic.de/", "format/", "country/"),
    }
    categories = []
    titles = dict( genre="Genre", title="Station", playing="Location", bitrate=False, listeners=False )

    
    # Set channel title
    def __init__(self, parent=None):
        ChannelPlugin.__init__(self, parent)
        # title updating is a workaround, because the fixed .meta attribute are read first
        self.title = ("SurfMusik", "SurfMusic")[conf.get("surfmusik_lang", "EN") == "EN"]
        self.meta["title"] = self.title


    # just a static list for now
    def update_categories(self):







|
<







52
53
54
55
56
57
58
59

60
61
62
63
64
65
66
       "EN": ("http://www.surfmusic.de/", "format/", "country/"),
    }
    categories = []
    titles = dict( genre="Genre", title="Station", playing="Location", bitrate=False, listeners=False )

    
    # Set channel title
    def init2(self, parent=None):

        # title updating is a workaround, because the fixed .meta attribute are read first
        self.title = ("SurfMusik", "SurfMusic")[conf.get("surfmusik_lang", "EN") == "EN"]
        self.meta["title"] = self.title


    # just a static list for now
    def update_categories(self):