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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [f5b2e2a1e9]

Overview
Comment:Fix verbose/extra merging, `-d` option for directory.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: f5b2e2a1e9587117802e20709f8984d161b47008
User & Date: mario on 2017-02-21 22:06:47
Other Links: manifest | tags
Context
2017-02-21
23:21
Rename `_add` to `_pack`. Support opt= parameter to allow said `pack_*` function to operate on option flags (e.g. `category:` to target widget). check-in: 417fcfdbd5 user: mario tags: trunk
22:06
Fix verbose/extra merging, `-d` option for directory. check-in: f5b2e2a1e9 user: mario tags: trunk
2017-02-20
19:55
Fix manual wording check-in: ced8e30a02 user: mario tags: trunk
Changes

Modified contrib/recordflags.py from [1b8c47acbe] to [f5a34b10ec].

1
2
3
4
5

6
7
8
9
10
11
12
1
2
3
4

5
6
7
8
9
10
11
12




-
+







# encoding: utf-8
# api: streamtuner2
# title: Recording options
# description: Allows to set streamripper/fIcy options before recording
# version: 0.8
# version: 0.8.1
# depends: streamtuner2 > 2.2.0
# conflicts: continuous_record
# priority: optional
# config:
#    { name: recordflags_auto, type: bool, value: 1, description: Apply options automatically once saved. }
#    { name: recordflags_row, type: select, value: record_flags, select: "record_flags|extras", description: Station field for saved options. }
#    { name: recordflags_dir, type: str, value: "", description: Default output directory. }
62
63
64
65
66
67
68
69

70
71
72
73
74
75
76
62
63
64
65
66
67
68

69
70
71
72
73
74
75
76







-
+







            "category": "recording",
            "version": "1.64.6",
            "description": "Standard radio/stream recording tool",
            "doc": "streamripper is the standard tool for recording and extracting songs from internet radio stations. It does have a plethora of options, some of which are available here:",
            "config": [
                #{ "name": "A",	"arg": "-A",	"type": "bool",	"description": "<b>-A</b> Don't split individual tracks/MP3s", "value": False },
                { "name": "Aa",	"arg": "-A -a",	"type": "str",	"description": "<b>-a</b> Single MP3 output filename. (Instead of splitting by song.)", "value": "" },
                { "name": "dir", "arg": "-d",	"type": "str",	"description": "<b>-s</b> Destination directory", "value": "" },
                { "name": "dir", "arg": "-d",	"type": "str",	"description": "<b>-d</b> Destination directory", "value": "" },
                { "name": "D",	"arg": "-D",	"type": "str",	"description": "<b>-D</b> Filename pattern", "value": "" },
                { "name": "s",	"arg": "-s",	"type": "bool",	"description": "<b>-s</b> No subdirectories for each stream", "value": False },
                { "name": "o",	"arg": "-o",	"type": "select",	"description": "<b>-o</b> Incomplete track overwriting", "select": "|always|never|larger|version", "value": "" },
                { "name": "t",	"arg": "-t",	"type": "bool",	"description": "<b>-t</b> Never overwrite incomplete tracks", "value": False, "category": "extra" },
                { "name": "T",	"arg": "-T",	"type": "bool",	"description": "<b>-T</b> Truncate duplicated incompletes", "value": False, "category": "extra" },
                { "name": "l",	"arg": "-l",	"type": "int",	"description": "<b>-l</b> Seconds to record", "value": 0, "max": 7*24*3600 },
                { "name": "M",	"arg": "-M",	"type": "int",	"description": "<b>-M</b> Max megabytes to record", "value": 512 },
263
264
265
266
267
268
269
270


271
272
273
274
275
276
277
263
264
265
266
267
268
269

270
271
272
273
274
275
276
277
278







-
+
+







        self.add_plg(group, self.filter_options(self.flag_meta[group]), self.add_flag, self.cfg_widget_pfx)
        # set values
        self.load_config(self.configdict_from_args(row), self.cfg_widget_pfx, widgets=self.widgets)

    # clean up options according to each {category:} and `recordflags_extra`
    def filter_options(self, meta):
        meta = copy.copy(meta)
        filter = ["basic", conf.recordflags_extra, None, {"verbose":["extra"]}.get(conf.recordflags_extra)]
        filter = ["basic", conf.recordflags_extra, None, {"verbose":"extra"}.get(conf.recordflags_extra)]
        log.CONF(filter)
        meta["config"] = [desc for desc in meta["config"] if desc.get("category") in filter]
        return meta

    # Put config widgets into recordoptions_cfg vbox
    def add_flag(self, id=None, w=None, label=None, color=None, image=None, align=5):
        self.parent.recordoptions_cfg.pack_start(uikit.wrap(self.widgets, id, w, label, color, image, align, label_markup=1, label_size=250))