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

⌈⌋ branch:  streamtuner2


Check-in [87a6d5ac96]

Overview
Comment:Fix add_default=False logic.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:87a6d5ac96a5e86c8c6a5517ef53799464b92762
User & Date: mario on 2016-10-28 23:08:57
Other Links: manifest | tags
Context
2016-10-28
23:12
Enable `list`/`array`/`table` config schemes in addition to `dict`. Currently unused, just added because it's little more code. No custom value="x,x,x|y,y,y" parser yet. Not for `dict` either, as it's only used by specbuttons with a predefined list. check-in: 50c68197c7 user: mario tags: trunk
23:08
Fix add_default=False logic. check-in: 87a6d5ac96 user: mario tags: trunk
18:14
Rename to "Spec buttons", use new {type:dict} config descriptor. check-in: e0aba9dd4e user: mario tags: trunk
Changes

Modified action.py from [fa6ea02044] to [8584cbcec7].

197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
    row = copy.copy(row)

    # Inject other meta fields (%title, %genre, %playing, %format, etc.)
    rx_keys = "[\$\%](" + "|".join(row.keys()) + ")\\b"
    cmd = re.sub(rx_keys, lambda m: "%r" % str(row.get(m.group(1))), cmd)

    # Add default %pls if cmd has no %url placeholder
    if not add_default and cmd.find("%") < 0:
        cmd = cmd + " %pls"
        # "pls" as default requires no conversion for most channels, and seems broadly supported by players

    # Playlist type placeholders (%pls, %m3u, %xspf, etc.)
    for dest, rx in placeholder_map.items():
        if re.search(rx, cmd, re.X):
            # no conversion







|







197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
    row = copy.copy(row)

    # Inject other meta fields (%title, %genre, %playing, %format, etc.)
    rx_keys = "[\$\%](" + "|".join(row.keys()) + ")\\b"
    cmd = re.sub(rx_keys, lambda m: "%r" % str(row.get(m.group(1))), cmd)

    # Add default %pls if cmd has no %url placeholder
    if add_default and cmd.find("%") < 0:
        cmd = cmd + " %pls"
        # "pls" as default requires no conversion for most channels, and seems broadly supported by players

    # Playlist type placeholders (%pls, %m3u, %xspf, etc.)
    for dest, rx in placeholder_map.items():
        if re.search(rx, cmd, re.X):
            # no conversion