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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [2fb5f0a4d6]:

To Artifact [385cdf85d8]:


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)

# 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"):







|







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": 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
                rows[num][field] = value.strip()
        return [rows[str(i)] for i in sorted(map(int, rows.keys()))]


    # Jamendo JAMJAMJSON playlists
    def jamj(self):
        rows = []

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







>

|







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.get("tracks") or [result]:
                rows.append(dict(
                    title = track["name"],
                    url = track["audio"],
                    playing = track.get("artist_name"),
                    img = track.get("image"),
                ))
        return rows