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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [b4e595711c]

Overview
Comment:Ensure streamedit picks up all changes, and populates fields even if absent in original row{}
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b4e595711c6816557ccd706fde19efce8488525f
User & Date: mario on 2016-11-07 14:35:31
Other Links: manifest | tags
Context
2016-11-07
14:36
Update feature plugin cross references check-in: 6734c46cfb user: mario tags: trunk
14:35
Ensure streamedit picks up all changes, and populates fields even if absent in original row{} check-in: b4e595711c user: mario tags: trunk
2016-11-06
20:48
Update HTML manual check-in: 09c09235d8 user: mario tags: trunk
Changes

Modified channels/streamedit.py from [39c59ec982] to [f03b7a7cb1].

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
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



-
+


















+
+
+
+








+
+
+
+
-
+







# api: streamtuner2
# title: Stream entry editor
# description: Allows to inspect and modify station/stream entries.
# version: 0.5
# version: 0.6
# type: feature
# category: ui
# config: -
# priority: core
# 
# Editing dialog for stream entries. Available in
# the context and main menu. Most useful for
# changing bookmarks, or even creating new ones.
#

from uikit import *
import channels
from config import *
from copy import copy


# aux win: stream data editing dialog
class streamedit (AuxiliaryWindow):

    fields = [
        "favicon", "format", "genre", "homepage", "playing", "title", "url", "extra"
    ]

    # show stream data editing dialog
    def open(self, mw):
        self.main.configwin.load_config(self.main.row(), "streamedit_")
        self.win_streamedit.show_all()

    # copy widget contents to stream
    def save(self, w):
        row = self.main.row()
        for k in self.fields:
            if not k in row:
                row[k] = ""
        self.main.configwin.save_config(self.main.row(), "streamedit_")
        self.main.configwin.save_config(row, "streamedit_")
        self.main.channel().save()
        self.cancel(w)

    # add a new list entry, update window
    def new(self, w):
        s = self.main.channel().stations()
        s.append({"title":"new", "url":"", "format":"audio/mpeg", "genre":"", "listeners":1});