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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [96d271c529]:

To Artifact [296d8f3610]:


340
341
342
343
344
345
346

347
348
349
350
351
352
353
            return
        self.current = category
        do_save = False

        # get data from cache or download
        if force or not category in self.streams:
            log.PROC("load", "update_streams")

            self.status("Updating streams...")
            self.status(-0.1)
            if category == "empty":
                new_streams = self.empty_stub
            else:
                new_streams = self.update_streams(category)
  







>







340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
            return
        self.current = category
        do_save = False

        # get data from cache or download
        if force or not category in self.streams:
            log.PROC("load", "update_streams")
            self.progress(None)
            self.status("Updating streams...")
            self.status(-0.1)
            if category == "empty":
                new_streams = self.empty_stub
            else:
                new_streams = self.update_streams(category)
  
444
445
446
447
448
449
450














451
452
453
454
455
456
457
        new = [row.get("url","http://example.com/") for row in new]
        for row in old:
            if ("url" in row and (row.get("url") not in new)):
                row["deleted"] = 1
                diff.append(row)
        return diff
















        
    # Display .current category, once notebook/channel tab is first opened
    def first_show(self):

        # Already processed
        if (self.shown == 55555):







>
>
>
>
>
>
>
>
>
>
>
>
>
>







445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
        new = [row.get("url","http://example.com/") for row in new]
        for row in old:
            if ("url" in row and (row.get("url") not in new)):
                row["deleted"] = 1
                diff.append(row)
        return diff

    # sets updating progress bar for .update_streams or .reload_categores
    def progress(self, max, i=None):
        if not max:
            self.status()
            self.status(1.0)
            self.progress_state = 1
            return
        if isinstance(max, (list, dict)):
            max = len(max)
        if not i:
            i = self.progress_state
        self.status( float(int(i)) / (float(int(max)) + 1.5) )
        self.progress_state = self.progress_state + 1
    progress_state = 1

        
    # Display .current category, once notebook/channel tab is first opened
    def first_show(self):

        # Already processed
        if (self.shown == 55555):