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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [2a43aea838]

Overview
Comment:Snap build option introduced (probably not going to be used for regular distribution, as the resulting package is exorbitantly large)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 2a43aea83821b221f97111689e889ca6eccff508
User & Date: mario on 2020-05-17 07:44:38
Other Links: manifest | tags
Context
2020-05-17
07:45
Don't enable MyOggRadio channel per default for now. check-in: 993efbd303 user: mario tags: trunk
07:44
Snap build option introduced (probably not going to be used for regular distribution, as the resulting package is exorbitantly large) check-in: 2a43aea838 user: mario tags: trunk
07:43
Fetch mode option removed for filtermusic check-in: a895f59ca5 user: mario tags: trunk
Changes

Modified Makefile from [c2ba8c4a3c] to [405d1cf202].

59
60
61
62
63
64
65






66
67
68
69
70
71
72
	$(PACK) -u packfile -s src -t zip --zip-shebang "/usr/bin/env python"	\
		-f -p "$(NAME)-$(VERSION).pyz" --prefix=./  .zip.py st2.py
src:
	cd .. && pax -wvJf streamtuner2/streamtuner2-$(VERSION).src.txz \
		streamtuner2/*.{py,png,desktop} streamtuner2/channels/*.{py,png} \
		streamtuner2/{bundle/,contrib/,help/,gtk3.xml.gz,NEWS,READ,PACK,PKG,CRED,Make,bin,.zip}*







# test .deb contents
check:
	dpkg-deb -c streamtuner2*deb
	dpkg-deb -I streamtuner2*deb
	rpm -qpil *rpm
	
upload:







>
>
>
>
>
>







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
	$(PACK) -u packfile -s src -t zip --zip-shebang "/usr/bin/env python"	\
		-f -p "$(NAME)-$(VERSION).pyz" --prefix=./  .zip.py st2.py
src:
	cd .. && pax -wvJf streamtuner2/streamtuner2-$(VERSION).src.txz \
		streamtuner2/*.{py,png,desktop} streamtuner2/channels/*.{py,png} \
		streamtuner2/{bundle/,contrib/,help/,gtk3.xml.gz,NEWS,READ,PACK,PKG,CRED,Make,bin,.zip}*

snap:	pyz
	cp streamtuner2-*.pyz streamtuner2.pyz
	zip snapcraft.zip streamtuner2.pyz
	version read ./st2.py write:_raw_ dev/snapcraft.yaml
	snapcraft 

# test .deb contents
check:
	dpkg-deb -c streamtuner2*deb
	dpkg-deb -I streamtuner2*deb
	rpm -qpil *rpm
	
upload:

Added dev/snapcraft.yaml version [131ff637c3].











































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Terrible idea. Snap isn't very fit to harbour python desktop apps.
# Bloats up the whole package to 65MB (from 450K). The pyz→zip roundtrip
# is also fairly redundant.

name: streamtuner2
version: 2.2.1+2020-05
summary: Directory browser for internet radio, audio and video streams
description: |
 Streamtuner2 is a GUI for browsing internet radio directories,
 music collections, and video services - grouped by genres or
 categories. It runs your preferred audio player or streamripper
 for recording.
 |
 This SNAP package is just for testing. The DEB or PYZ are significantly
 smaller and faster to install.
icon: ./icon.png
grade: stable
base: core18
confinement: strict

parts:

  # pull in python2 + libs
  python:
    plugin: python
    python-version: python2
    python-packages: [requests,pyquery,lxml,six,urllib3,pillow]
    after: [desktop-gtk2]
    stage-packages:
      - python-gtk2

  # use prepared pyz in zip
  st2:
    plugin: dump
    source: snapcraft.zip
    source-type: zip

  # https://forum.snapcraft.io/t/gtk2-applications/13508
  #
  # This part installs the `desktop-launch` script which initialises desktop
  # features such as fonts, themes and the XDG environment. It also installs
  # the GTK2 runtime libraries.
  #
  # It is copied straight from the snapcraft desktop helpers project. Please
  # periodically check the source for updates and copy the changes.
  #    https://github.com/ubuntu/snapcraft-desktop-helpers/blob/master/snapcraft.yaml
  #
  desktop-gtk2:
    source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
    source-subdir: gtk
    plugin: make
    make-parameters: ["FLAVOR=gtk2"]
    build-packages:
      - build-essential
      - libgtk2.0-dev
    stage-packages:
      - libxkbcommon0  # XKB_CONFIG_ROOT
      - ttf-ubuntu-font-family
      - dmz-cursor-theme
      - light-themes
      - adwaita-icon-theme
      - gnome-themes-standard
      - shared-mime-info
      - libgtk2.0-0
      - libgdk-pixbuf2.0-0
      - libglib2.0-bin
      - libgtk2.0-bin
      - unity-gtk2-module
      - locales-all
      - libappindicator1
      - xdg-user-dirs
      - ibus-gtk
      - libibus-1.0-5

apps:
  pyz:
    command: desktop-launch $SNAP/streamtuner2.pyz
    plugs:
    - x11
    - home
    - network
    - desktop # needed for a lot of gtk3 and glib interaction with the host system
    - desktop-legacy # needed for accessibility tools IIRC

plugs:
  gtk-2-engines:
    interface: content
    target: $SNAP/lib/gtk-2.0
    default-provider: gtk2-common-themes
  gtk-2-themes:
    interface: content
    target: $SNAP/data-dir/themes
    default-provider: gtk-common-themes
  icon-themes:
    interface: content
    target: $SNAP/data-dir/icons
    default-provider: gtk-common-themes
  sound-themes:
    interface: content
    target: $SNAP/data-dir/sounds
    default-provider: gtk-common-themes

Modified st2.py from [841128bca6] to [9801108f7e].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python
# encoding: UTF-8
# api: python
# type: application
# title: streamtuner2
# description: Directory browser for internet radio, audio and video streams
# version: 2.2.1
# state: stable
# author: Mario Salzer <mario@include-once.org>
# license: Public Domain
# url: http://freshcode.club/projects/streamtuner2
# config:  
#   { type: env, name: HTTP_PROXY, description: proxy for HTTP access }
#   { type: env, name: XDG_CONFIG_HOME, description: relocates user .config subdirectory }






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env python
# encoding: UTF-8
# api: python
# type: application
# title: streamtuner2
# description: Directory browser for internet radio, audio and video streams
# version: 2.2.1+2020-05
# state: stable
# author: Mario Salzer <mario@include-once.org>
# license: Public Domain
# url: http://freshcode.club/projects/streamtuner2
# config:  
#   { type: env, name: HTTP_PROXY, description: proxy for HTTP access }
#   { type: env, name: XDG_CONFIG_HOME, description: relocates user .config subdirectory }
252
253
254
255
256
257
258

259
260
261
262
263
264
265
        log.UI("main.channel_switch() :=", self.current_channel)
        # update window title, call plugin (e.g. channel link in toolbar)
        if conf.window_title:
            uikit.do(self.update_title)
        # if first selected, load current category
        # (run in thread, to make it look speedy on first startup)
        self.thread(self.channel().first_show)


    # Invoked from the menu instead, uses module name instead of numeric tab id
    def channel_switch_by_name(self, name):
        self.notebook_channels.set_current_page(self.channel_names.index(name))

    # Mirror selected channel tab into main window title
    def update_title(self, *x, **y):







>







252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
        log.UI("main.channel_switch() :=", self.current_channel)
        # update window title, call plugin (e.g. channel link in toolbar)
        if conf.window_title:
            uikit.do(self.update_title)
        # if first selected, load current category
        # (run in thread, to make it look speedy on first startup)
        self.thread(self.channel().first_show)
        log.UI("channel_switch done.")

    # Invoked from the menu instead, uses module name instead of numeric tab id
    def channel_switch_by_name(self, name):
        self.notebook_channels.set_current_page(self.channel_names.index(name))

    # Mirror selected channel tab into main window title
    def update_title(self, *x, **y):