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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [84114ae636]

Overview
Comment:Fix action.browser() to use only row{}, not pass url= argument. Native JAMJSON extractor now tests for ["tracks"] or uses plain ["results"] list.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 84114ae636045a19dc789bf82025361e04c5047a
User & Date: mario on 2015-05-26 00:40:54
Other Links: manifest | tags
Context
2015-05-26
00:41
Update for new action.play() signature, scale down banner images. check-in: 3717a70b32 user: mario tags: trunk
00:40
Fix action.browser() to use only row{}, not pass url= argument. Native JAMJSON extractor now tests for ["tracks"] or uses plain ["results"] list. check-in: 84114ae636 user: mario tags: trunk
2015-05-24
17:46
Fix simplified regex to stop before }}} for URL extraction. check-in: b728f45203 user: mario tags: trunk
Changes

Modified action.py from [2fb5f0a4d6] to [385cdf85d8].

144
145
146
147
148
149
150
151

152
153
154
155
156
157
158
144
145
146
147
148
149
150

151
152
153
154
155
156
157
158







-
+







    else:
        cmd = mime_app(audioformat, assoc)
        cmd = interpol(cmd, source, row)
        run(cmd)

# Start web browser
def browser(url):
    run_fmt_url({}, "url/http", "srv", url, conf.play)
    run_fmt_url({"url": url, "homepage": url}, "url/http", "srv", conf.play)

# Calls player for stream url and format
def play(row={}, audioformat="audio/mpeg", source="pls"):
    run_fmt_url(row, audioformat, source, conf.play)

# Call streamripper / youtube-dl / wget
def record(row={}, audioformat="audio/mpeg", source="href"):
512
513
514
515
516
517
518

519
520

521
522
523
524
525
526
527
512
513
514
515
516
517
518
519
520

521
522
523
524
525
526
527
528







+

-
+







                rows[num][field] = value.strip()
        return [rows[str(i)] for i in sorted(map(int, rows.keys()))]


    # Jamendo JAMJAMJSON playlists
    def jamj(self):
        rows = []
        print self.src
        for result in json.loads(self.src)["results"]:
            for track in result["tracks"]:
            for track in result.get("tracks") or [result]:
                rows.append(dict(
                    title = track["name"],
                    url = track["audio"],
                    playing = track.get("artist_name"),
                    img = track.get("image"),
                ))
        return rows