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-27 21:35:03 and 2015-04-27 21:38:02

92
93
94
95
96
97
98
99

100
101
102

103
104
105
106
107
108
109
110
111
112
113
114

115
116
117
118
92
93
94
95
96
97
98

99
100
101

102




103
104
105
106
107
108
109

110
111
112
113
114







-
+


-
+
-
-
-
-







-
+





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 may be called with `cat=None` and `search="Find me maybe"` instead; and it's then responsible to do some searching.

 - **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.)
   Sets the default audio stream type for this channel. (Note that each individual stream entry may carry its own `format` attribute, just in case.)

 - **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 
   Declares the channel service playlist type. Can be either "pls" or "m3u" or "xspf" if the server is super modern. Most directories provide `http://myradiolist.com/listen-12345.pls` URLs, so should use `"pls"` here.  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 MP3/Ogg streaming URLs only.
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)`  
   This defines which station column titles to show. There are title=, genre= which you commonly have. And there is playing= or bitrate= and homepage= which you can omit by setting it to `=False`. Alternatively just rename them with `playing="Artist/Album name`.

 - **datamap** = `[...]`  
   If you want some complexity, such as elaborate column title renaming, extra pixmaps/favicons, or using custom row fields/attributes - then this can all be accomplished with a Gtk TreeView *datamap*. No, you don't want to do that.

 - Other internal fields are listed in `channels/_generic.py`
 - Other internal fields are listed in `channels/__init__.py`

### Installation

To have a new plugin picked up, you need to copy/symlink the file into `/usr/share/streamtuner2/channels/`. It's imported from the `channels` module group automatically. Which allows relocatability, and later even local plugins. (Which is commonly unneeded featuritis though. So not yet implemented.)