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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [833ae6e3d8]:

To Artifact [7768280a8d]:

  • Executable file st2.py — part of check-in [aac4fcacbf] at 2015-05-09 21:40:07 on branch trunk — Implement favicon live updating. Play event and download_all now pass the treestore, with row index, and pix_entry number (column index in liststore). Favicon module checks for downloaded images twice now, and updates PixBuf in ListStore. (Works for both single station view, and download_all.) (user: mario, size: 20962) [annotate] [blame] [check-ins using]

258
259
260
261
262
263
264
265



266
267

268
269
270
271
272
273
274
258
259
260
261
262
263
264

265
266
267
268

269
270
271
272
273
274
275
276







-
+
+
+

-
+







        return self.row().get(name)


            
    # Play button
    def on_play_clicked(self, widget, event=None, *args):
        self.status("Starting player...")
        row = self.channel().play()
        channel = self.channel()
        pixstore = [channel._ls, channel._pix_entry, channel.rowno()]
        row = channel.play()
        self.status("")
        [callback(row) for callback in self.hooks["play"]]
        [callback(row, pixstore=pixstore) for callback in self.hooks["play"]]

    # Recording: invoke streamripper for current stream URL
    def on_record_clicked(self, widget):
        self.status("Recording station...")
        row = self.channel().record()
        [callback(row) for callback in self.hooks["record"]]

319
320
321
322
323
324
325
326
327


328
329
330
331
332
333
334
321
322
323
324
325
326
327


328
329
330
331
332
333
334
335
336







-
-
+
+








    # Reload category tree
    def update_categories(self, widget):
        Thread(target=self.channel().reload_categories).start()

    # Menu invocation: refresh favicons for all stations in current streams category
    def update_favicons(self, widget):
        entries = self.channel().stations()
        favicon.download_all(entries)
        ch = self.channel()
        favicon.download_all(entries=ch.stations(), pixstore=[ch._ls, ch._pix_entry, None])

    # Save stream to file (.m3u)
    def save_as(self, widget):
        row = self.row()
        default_fn = row["title"] + ".m3u"
        fn = uikit.save_file("Save Stream", None, default_fn, [(".m3u","*m3u"),(".pls","*pls"),(".xspf","*xspf"),(".jspf","*jspf"),(".smil","*smil"),(".asx","*asx"),("all files","*")])
        if fn: