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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [effbfc31f1]

Overview
Comment:Support config option boolean aliases (1, true, yes, on).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: effbfc31f18c57df8de451efc152bf18aabc1acb
User & Date: mario on 2015-05-22 22:00:36
Other Links: manifest | tags
Context
2015-05-22
22:01
Catch http/json result errors earlier. Break on absent "after" id. check-in: 8dfd60898f user: mario tags: trunk
22:00
Support config option boolean aliases (1, true, yes, on). check-in: effbfc31f1 user: mario tags: trunk
22:00
Use gtk-info/-error/-no for placeholder entries. check-in: 55408c97f8 user: mario tags: trunk
Changes

Modified pluginconf.py from [2b0d85b26d] to [8696565c66].

477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
    for opt in meta.get("config", []):
        if "name" in opt and "value" in opt:
            if opt["name"] not in conf_options:
                # typemap "bool" and "int" here
                if opt["type"] in ("bool", "boolean"):
                    val = bool(opt["value"])
                elif opt["type"] in ("int", "integer", "numeric"):
                    val = int(opt["value"])
                else:
                    val = str(opt["value"])
                conf_options[opt["name"]] = val

    # Initial plugin activation status
    if module and module not in conf_plugins:
        conf_plugins[module] = meta.get("priority") in (
            "core", "builtin", "always", "default", "standard"
        )









|











477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
    for opt in meta.get("config", []):
        if "name" in opt and "value" in opt:
            if opt["name"] not in conf_options:
                # typemap "bool" and "int" here
                if opt["type"] in ("bool", "boolean"):
                    val = bool(opt["value"])
                elif opt["type"] in ("int", "integer", "numeric"):
                    val = opt["value"].lower() in ("1", "true", "yes", "on")
                else:
                    val = str(opt["value"])
                conf_options[opt["name"]] = val

    # Initial plugin activation status
    if module and module not in conf_plugins:
        conf_plugins[module] = meta.get("priority") in (
            "core", "builtin", "always", "default", "standard"
        )