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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [5dbf6dbb13]:

To Artifact [a922a58f51]:


65
66
67
68
69
70
71

72
73
74
75
76
77
78


# standard modules
import sys
import os, os.path
import re
from collections import namedtuple


# threading or processing module
try:
    from processing import Process as Thread
except:
    from threading import Thread
    Thread.stop = lambda self: None







>







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79


# standard modules
import sys
import os, os.path
import re
from collections import namedtuple
from copy import copy

# threading or processing module
try:
    from processing import Process as Thread
except:
    from threading import Thread
    Thread.stop = lambda self: None
622
623
624
625
626
627
628

629
630
631
632
633
634
635
                    # categories
                    for cat in cn.streams.keys():
                        # stations
                        for row in cn.streams[cat]:
                            # assemble text fields to compare
                            text = " ".join([row.get(f, " ") for f in fields])
                            if text.lower().find(self.q) >= 0:

                                row["genre"] = c + " " + row.get("genre", "")
                                entries.append(row)
            self.show_results(entries)

        # display "search" in "bookmarks"
        def show_results(self, entries):
            main.status(1.0)







>







623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
                    # categories
                    for cat in cn.streams.keys():
                        # stations
                        for row in cn.streams[cat]:
                            # assemble text fields to compare
                            text = " ".join([row.get(f, " ") for f in fields])
                            if text.lower().find(self.q) >= 0:
                                row = copy(row)
                                row["genre"] = c + " " + row.get("genre", "")
                                entries.append(row)
            self.show_results(entries)

        # display "search" in "bookmarks"
        def show_results(self, entries):
            main.status(1.0)
1045
1046
1047
1048
1049
1050
1051

1052
1053
1054
1055
1056
1057
1058
            return self.currentcat()
            
            
        # update bookmarks from freshly loaded streams data
        def heuristic_update(self, updated_channel, updated_category):

            if not conf.heuristic_bookmark_update: return

            save = 0
            fav = self.streams["favourite"]
        
            # First we'll generate a list of current bookmark stream urls, and then
            # remove all but those from the currently UPDATED_channel + category.
            # This step is most likely redundant, but prevents accidently re-rewriting
            # stations that are in two channels (=duplicates with different PLS urls).







>







1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
            return self.currentcat()
            
            
        # update bookmarks from freshly loaded streams data
        def heuristic_update(self, updated_channel, updated_category):

            if not conf.heuristic_bookmark_update: return
            __print__(dbg.ERR, "heuristic bookmark update")
            save = 0
            fav = self.streams["favourite"]
        
            # First we'll generate a list of current bookmark stream urls, and then
            # remove all but those from the currently UPDATED_channel + category.
            # This step is most likely redundant, but prevents accidently re-rewriting
            # stations that are in two channels (=duplicates with different PLS urls).