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

⌈⌋ ⎇ branch:  streamtuner2


Changes To write a plugin

Changes to "write a plugin" between 2015-04-14 10:09:30 and 2015-04-14 10:11:46

1

2
3
4
5
6
7
8

1
2
3
4
5
6
7
8
-
+







Wrting a new plugin is often trivial.
Writing a new plugin is often trivial.
Just create a new `channels/name.py` following this structure:

    # title: MyPlugin
    # description: my radio list
    # url: http://www.mymusicstation.com/
    # version: 0.1
    # type: channel
86
87
88
89
90
91
92
93
94


95
96

97
98
99

100
101
102
103
104
105
106
86
87
88
89
90
91
92


93
94
95

96
97
98

99
100
101
102
103
104
105
106







-
-
+
+

-
+


-
+








You can access your <kbd>config:</kbd> options per the global `conf.*` dict. Take care to prefer unambigious names like `conf.myplugin_pagesize` etc.

### Attributes

There are a couple of other attributes.

 - **has_search** = False
   This flag documents if live server searches are available. If it's supported, then the `update_streams()` method will can called with `cat=None` and `search="Find me maybe"` set instead; and it's then responsible to do some searching.
 - **has_search** `= False`  
   This flag documents if live server searches are available. If it's supported, then the `update_streams()` method may be called with `cat=None` and `search="Find me maybe"` instead; and it's then responsible to do some searching.

 - **audioformat** = "audio/mpeg"  
 - **audioformat** `= "audio/mpeg"`  
   Sets the default audio stream type for this channel. (Note that each individual stream entry may carry its own `format` attribute, jsut in case.)

 - **listformat** = "pls"  
 - **listformat** `= "pls"`  
   Declares the channel service playlist type. Can be either "pls" or "m3u" or "xspf" if the server is super modern. It's also possible to use "href" here, if 
you can't be sure of audio or playlist format types. And "srv" if the provider has a clean list of direct streaming URLs only.

 - **default** = "Pop"  
   Is obsolete. Used to specify the first shown category. (That was a workaround for initial crude Gtk handling.)

 - **titles =** `dict(listeners=False)`