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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [509c3b3a70]

Overview
Comment:Filter out duplicate streams by title
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 509c3b3a7069a86aee3bf46509e3eedb564b15f2
User & Date: mario on 2014-08-12 18:41:02
Other Links: manifest | tags
Context
2014-08-12
18:45
Allow use of custom Dirble API key. check-in: e5d39589b8 user: mario tags: trunk
18:41
Filter out duplicate streams by title check-in: 509c3b3a70 user: mario tags: trunk
16:42
IO/xiph/cache fixed (agian) to return JSON array only check-in: 706904e073 user: mario tags: trunk
Changes

Modified channels/xiph.py from [9c1513899d] to [7363e5b0c8].

103
104
105
106
107
108
109

110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
            l = []
            __print__( dbg.PROC, "processing api.dir.xiph.org JSON (via api.include-once.org cache)" )
            data = json.loads(data)
            for e in data:
                #__print__(dbg.DATA, e)
                bitrate = int(e["bitrate"])
                if conf.xiph_min_bitrate and bitrate and bitrate >= int(conf.xiph_min_bitrate):

                  l.append({
                    "title": e["stream_name"],
                    "url": e["listen_url"],
                    "format": e["type"],
                    "bitrate": bitrate,
                    "genre": e["genre"],
                    "playing": e["current_song"],
                    "listeners": 0,
                    "max": 0,
                    "homepage": (e["homepage"] if ("homepage" in e) else ""),
                  })
                
            # send back the list 
            return l











>
|
|
|
|
|
|
|
|
|
|
|







103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
            l = []
            __print__( dbg.PROC, "processing api.dir.xiph.org JSON (via api.include-once.org cache)" )
            data = json.loads(data)
            for e in data:
                #__print__(dbg.DATA, e)
                bitrate = int(e["bitrate"])
                if conf.xiph_min_bitrate and bitrate and bitrate >= int(conf.xiph_min_bitrate):
                    if not len(l) or l[-1]["title"] != e["stream_name"]:
                        l.append({
                          "title": e["stream_name"],
                          "url": e["listen_url"],
                          "format": e["type"],
                          "bitrate": bitrate,
                          "genre": e["genre"],
                          "playing": e["current_song"],
                          "listeners": 0,
                          "max": 0,
                          "homepage": (e["homepage"] if ("homepage" in e) else ""),
                        })
                
            # send back the list 
            return l