streamtuner2: Check-in [9564d3909a]
Internet radio browser GUI for music/video streams from various directory services.

⌈⌋ branch:  streamtuner2


Check-in [9564d3909a]

Overview
Comment:Fix binary file open mode (CRLF corruption on Windows)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:9564d3909a6235e7893b8c8c2cf7b6e446bd9da2
User & Date: mario on 2016-11-09 20:06:10
Other Links: manifest | tags
Context
2016-11-09
20:08
Fixed file open "rt" mode. check-in: 93908484c3 user: mario tags: trunk
20:06
Fix binary file open mode (CRLF corruption on Windows) check-in: 9564d3909a user: mario tags: trunk
15:15
Strip carriage return from plugin meta block, which causes field reading to fail on Windows. And use `empty_pixbuf` as fallback for uikit.pixbuf() in case the content isn't valid base64 still. check-in: 730e6dc9f1 user: mario tags: trunk
Changes

Modified contrib/radiosure.py from [c4096229db] to [5396599cac].

1
2
3
4
5
6
7
8
9
10
11
12
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# encoding: UTF-8
# api: streamtuner2
# title: RadioSure
# description: Huge radio station collection
# version: 0.3
# type: channel
# category: radio
# url: http://radiosure.com/
# config: -
# priority: extra
# png: 
#   iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEULDgpKTEmQko/19/S0inLcAAAAUklEQVQI12P4DwQMDvuBBIs92zcGHh2G
................................................................................
        pass

    # import station list
    def update_streams(self, cat, search=None):
        streams = []
        # refresh zip file
        if not os.path.isfile(self.tmp) or os.path.getmtime(self.tmp) < (time.time() - 24*3600):
            with open(self.tmp, "w") as f:
                f.write(ahttp.get(self.zip, binary=1))
        # get first file
        zip = zipfile.ZipFile(self.tmp)
        csv = zip.read(zip.namelist()[0])
        self.status("Updating streams from RadioSure CSV database")
        # fields = ["title", "playing", "genre", "country", "language", "url"]
        for e in re.findall("^([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+(?:\t[^\t]{3,})*)", csv, re.M):




|







 







|







1
2
3
4
5
6
7
8
9
10
11
12
..
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# encoding: UTF-8
# api: streamtuner2
# title: RadioSure
# description: Huge radio station collection
# version: 0.4
# type: channel
# category: radio
# url: http://radiosure.com/
# config: -
# priority: extra
# png: 
#   iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAgMAAABinRfyAAAADFBMVEULDgpKTEmQko/19/S0inLcAAAAUklEQVQI12P4DwQMDvuBBIs92zcGHh2G
................................................................................
        pass

    # import station list
    def update_streams(self, cat, search=None):
        streams = []
        # refresh zip file
        if not os.path.isfile(self.tmp) or os.path.getmtime(self.tmp) < (time.time() - 24*3600):
            with open(self.tmp, "wb") as f:
                f.write(ahttp.get(self.zip, binary=1))
        # get first file
        zip = zipfile.ZipFile(self.tmp)
        csv = zip.read(zip.namelist()[0])
        self.status("Updating streams from RadioSure CSV database")
        # fields = ["title", "playing", "genre", "country", "language", "url"]
        for e in re.findall("^([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+)\t([^\t]+(?:\t[^\t]{3,})*)", csv, re.M):