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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [088a836b02]

Overview
Comment:Change main fpm/xpm pack: line to select channel modules individually, use default prefix path /usr/share/streamtuner2 and absolute paths alternatively. Remove dirble module from default channels/__init__: packaging list.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 088a836b026387c0bda197f4191b7dd71a654079
User & Date: mario on 2015-02-06 18:10:02
Other Links: manifest | tags
Context
2015-02-06
18:10
Logo updated to match new banner. check-in: 011d099eaf user: mario tags: trunk
18:10
Change main fpm/xpm pack: line to select channel modules individually, use default prefix path /usr/share/streamtuner2 and absolute paths alternatively. Remove dirble module from default channels/__init__: packaging list. check-in: 088a836b02 user: mario tags: trunk
2014-12-12
16:49
Fix manpage and .desktop file according to Debian consistency patches. check-in: 36da89b5fd user: mario tags: trunk
Changes

Modified _pack from [d130507f70] to [4e0bc371a8].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# package up st2
# → now using fpm

#-- meta data
NAME=streamtuner2
VERSION=$(version --get:plugin st2.py --write:python st2.py)

#-- bundle
#fpm -s src -t deb -p "$NAME-$VERSION.deb" --prefix=/usr --deb-compression xz --deb-sign include-once -f st2.py
#fpm -s src -t rpm -p "$NAME-$VERSION.rpm" --prefix=/usr --rpm-compression xz -f st2.py
#fpm -s src -t exe -p "$NAME-$VERSION.exe" --prefix=c:/usr/ --exe-autoextract -f st2.py
fpm -s src -t tar -p "$NAME-$VERSION.bin.tar.xz" --prefix=/usr/local --verbose -f st2.py
exit

#dpkg-deb -I streamtuner2*deb
#dpkg-deb -c streamtuner2*deb


cd ..








|
|
|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# package up st2
# → now using fpm

#-- meta data
NAME=streamtuner2
VERSION=$(version --get:plugin st2.py --write:python st2.py)

#-- bundle
fpm -s src -t deb -p "$NAME-$VERSION.deb" --prefix=/usr/share/streamtuner2 --deb-compression xz -f st2.py
#fpm -s src -t rpm -p "$NAME-$VERSION.rpm" --prefix=/usr/share/streamtuner2 --rpm-compression xz -f st2.py
#fpm -s src -t exe -p "$NAME-$VERSION.exe" --prefix=c:/usr/share/streamtuner2 --exe-autoextract -f st2.py
#fpm -s src -t tar -p "$NAME-$VERSION.bin.tar.xz" --prefix=/usr/local/share/streamtuner2 --verbose -f st2.py
exit

#dpkg-deb -I streamtuner2*deb
#dpkg-deb -c streamtuner2*deb


cd ..

Modified channels/__init__.py from [1d725c2e92] to [f76574b70e].

1
2
3
4
5
6
7
8
9
10
11



12
13
14
15
16
17
18
19
20
#
# encoding: UTF-8
# api: streamtuner2
# title: Plugin handling
# description: Channels and feature plugins reside in channels/
# api: python
# type: R
# category: core
# priority: core
#
#



#
#
#
#


from channels._generic import *

# Only reexport plugin classes









|
|
>
>
>
|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#
# encoding: UTF-8
# api: streamtuner2
# title: Plugin handling
# description: Channels and feature plugins reside in channels/
# api: python
# type: R
# category: core
# priority: core
# pack:
#   file.py, _generic.py, global_key.py, history.py, icast.py,
#   internet_radio.py, itunes.py, jamendo.py, links.py, live365.py,
#   modarchive.py, musicgoal.py, myoggradio.py, punkcast.py, shoutcast.py,
#   surfmusik.py, timer.py, xiph.py, youtube.py, *.png
# obsolete:
#   dirble.py 
#
#


from channels._generic import *

# Only reexport plugin classes

Modified st2.py from [5d4406f73d] to [099fb4d0ad].

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
#!/usr/bin/env python
# encoding: UTF-8
# api: python
# type: application
# title: streamtuner2
# description: Directory browser for internet radio / audio streams
# depends: pygtk | pygi, threading, pyquery, kronos, requests
# version: 2.1.3
# author: mario salzer
# license: public domain
# url: http://freshcode.club/projects/streamtuner2
# config: <env name="http_proxy" value="" description="proxy for HTTP access" />  <env name="XDG_CONFIG_HOME" description="relocates user .config subdirectory" />
# category: multimedia

# 













#
#
# Streamtuner2 is a GUI browser for internet radio directories. Various
# providers can be added, and streaming stations are usually grouped into
# music genres or categories. It starts external audio players for stream
# playing and streamripper for recording broadcasts.
#
# It's an independent rewrite of streamtuner1 in a scripting language. So
# it can be more easily extended and fixed. The use of PyQuery for HTML
# parsing makes this simpler and more robust.
#
# Stream lists are stored in JSON cache files.
#
#
#


""" project status """
#
# The application runs mostly stable. The GUI interfaces are workable.
# It's supposed to run on Gtk2 and Gtk3. Python3 support is still WIP.
# There haven't been any optimizations regarding memory usage and
# performance. The current internal API is vastly undocumented.






|
|





>
|
>
>
>
>
>
>
>
>
>
>
>
>
>








|
|

|
<
<
<
|







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
#!/usr/bin/env python
# encoding: UTF-8
# api: python
# type: application
# title: streamtuner2
# description: Directory browser for internet radio / audio streams
# depends: pygtk | pygi, threading, pyquery, python-lxml, requests
# version: 2.1.3-3
# author: mario salzer
# license: public domain
# url: http://freshcode.club/projects/streamtuner2
# config: <env name="http_proxy" value="" description="proxy for HTTP access" />  <env name="XDG_CONFIG_HOME" description="relocates user .config subdirectory" />
# category: multimedia
# id: streamtuner2
# pack:
#   gtk*.xml,
#   *.py,
#   st2.py=/usr/bin/streamtuner2,
#   channels/__init__.py,
#   bundle,
#   streamtuner2.desktop=/usr/share/applications/,
#   README=/usr/share/doc/streamtuner2/,
#   help/streamtuner2.1=/usr/share/man/man1/,
#   help=/usr/share/doc/streamtuner2/,
#   streamtuner2.png,
#   logo.png=/usr/share/pixmaps/streamtuner2.png,
# epoch:
# architecture: all
#
#
# Streamtuner2 is a GUI browser for internet radio directories. Various
# providers can be added, and streaming stations are usually grouped into
# music genres or categories. It starts external audio players for stream
# playing and streamripper for recording broadcasts.
#
# It's an independent rewrite of streamtuner1 in a scripting language. So
# it can be more easily extended and fixed. The mix of JSON APIs, regex
# or PyQuery extraction simplifies processing many sources.
#
# Primarily radio stations are displayed, some channels however are music



# collections. Commercial and sign-up services are not the target purpose.

""" project status """
#
# The application runs mostly stable. The GUI interfaces are workable.
# It's supposed to run on Gtk2 and Gtk3. Python3 support is still WIP.
# There haven't been any optimizations regarding memory usage and
# performance. The current internal API is vastly undocumented.
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#   - MEDIUM: little integrity checking for .pls / .m3u references and files
#   - minimal XML/SGML entity decoding (-> faulty data)
#   - MEDIUM: if system json module is not available, pseudo-json uses eval()
#     to read the config data -> limited risk, since it's only local files
#   - HIGH RISK: no verification of downloaded favicon image files (ico/png),
#     as they are passed to gtk.gdk.Pixbuf (OTOH data pre-filtered by Google)
#   - MEDIUM: audio players / decoders are easily affected by buffer overflows
#     from corrupt mp3/stream data, and streamtuner2 executes them
#      - but since that's the purpose -> no workaround
#



# standard modules
import sys
import os, os.path
import re







|
<
<







65
66
67
68
69
70
71
72


73
74
75
76
77
78
79
#   - MEDIUM: little integrity checking for .pls / .m3u references and files
#   - minimal XML/SGML entity decoding (-> faulty data)
#   - MEDIUM: if system json module is not available, pseudo-json uses eval()
#     to read the config data -> limited risk, since it's only local files
#   - HIGH RISK: no verification of downloaded favicon image files (ico/png),
#     as they are passed to gtk.gdk.Pixbuf (OTOH data pre-filtered by Google)
#   - MEDIUM: audio players / decoders are easily affected by buffer overflows
#     from corrupt mp3/stream data, and streamtuner2 just passes them on





# standard modules
import sys
import os, os.path
import re
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import ahttp
import action  # needs workaround... (action.main=main)
import channels
from channels import *
import favicon


__version__ = "2.1.3"


# this represents the main window
# and also contains most application behaviour
main = None
class StreamTunerTwo(gtk.Builder):








|







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import ahttp
import action  # needs workaround... (action.main=main)
import channels
from channels import *
import favicon


__version__ = "2.1.3-3"


# this represents the main window
# and also contains most application behaviour
main = None
class StreamTunerTwo(gtk.Builder):