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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [078c13d130]

Overview
Comment:Moved plugin structure documentation into wiki.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 078c13d13068675a5a6fb4c5ab27bea0e22ba09b
User & Date: mario on 2015-03-25 16:32:32
Other Links: manifest | tags
Context
2015-03-25
21:53
Document historic release dates. check-in: bbf9fe4a5d user: mario tags: trunk
16:32
Moved plugin structure documentation into wiki. check-in: 078c13d130 user: mario tags: trunk
15:06
Update README on required packages. check-in: 4f7ef94cda user: mario tags: trunk
Changes

Deleted help/extending.page version [c8f3444160].

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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<page	xmlns="http://projectmallard.org/1.0/"
	type="guide"
	id="extending">

<info>
	<link type="guide" xref="index#advanced"/>
        <desc>Writing your own channel plugins.</desc>
</info>

	<title>Extension Howto</title>

	<p>Streamtuner2 is written in Python, a rather easy programming language. And it's also rather simple
	to write a new channel plugin.</p>

	<p>The basic layout of every channel plugin is as follows:</p>

	<code type="text/python">

from channels import *

class myplugin (ChannelPlugin):

    title = "MyNewChannel"
    module = "myplugin"
    homepage = "http://www.mymusicstation.com/"
    categories = []



    def update_categories(self):
    
        self.categories = []



    def update_streams(self, cat, force=0):

        entries = []

        # ...
        # get it from somewhere
        # ...        

        return entries
        
	</code>

	<p>There are some self-explanatory description fields, and two important methods. Sometimes you
        don't need categories even. The update_streams() function often downloads a website, parses it
	with regular expressions or PyQuery / DOM methods, and packs into into a result list.</p>	

	<p>Here entries is a list of dictionaries, with standardized entry names like "title" and "playing"
	for the description, and "homepage" for a browsable link, and most importantly "url" for the
	actual streaming link. Often you want to add a "genre" and "format" and "bitrate" info. But this depends
	on your plugins data source, really.</p>
	
	
</page>
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<