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

⌈⌋ ⎇ branch:  streamtuner2


Check-in [fd963a3d9b]

Overview
Comment:Add .url exporting (shallow Windows variant of .desktop files).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fd963a3d9bacac92a2f4a24e7b6f09335b207b63
User & Date: mario on 2015-04-24 19:22:43
Other Links: manifest | tags
Context
2015-04-24
21:53
Fallback for Gtk3 using set_text() now. Fix "href" vs "raw" format probing. check-in: 9f0bce8535 user: mario tags: trunk
19:22
Add .url exporting (shallow Windows variant of .desktop files). check-in: fd963a3d9b user: mario tags: trunk
19:21
Use generic `audio/mod-zip` for all MOD Archive urls. check-in: fed23f23f7 user: mario tags: trunk
Changes

Modified action.py from [c19df7fb22] to [d35e0e213b].

330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
        if e: return e[0]
        else: pass


    # Probe MIME type and content per regex
    def probe_fmt(self):
        for probe,rx in playlist_content_map:
            if re.search(rx, self.src, re.X|re.S):
                return listfmt(probe)
        return None

    # Return just URL list from extracted playlist
    def urls(self, fmt):
        return [row["url"] for row in self.rows(fmt)]
        







|







330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
        if e: return e[0]
        else: pass


    # Probe MIME type and content per regex
    def probe_fmt(self):
        for probe,rx in playlist_content_map:
            if re.search(rx, self.src, re.X|re.M|re.S):
                return listfmt(probe)
        return None

    # Return just URL list from extracted playlist
    def urls(self, fmt):
        return [row["url"] for row in self.rows(fmt)]
        
628
629
630
631
632
633
634
635
636




637
638
639
640
641
642
643
            if row.get("url"):
                txt += """\t\t<{} src="{}"/>\n""".format(row.get("format", "audio").split("/")[0], row["url"])
        txt += """\t</seq>\n</body>\n</smil>\n"""
        return txt

    # .DESKTOP links
    def desktop(self, rows):
        row = rows[0]
        return "[Desktop Entry]\nVersion=1.0\nIcon=media-playback-start\nType=Link\nName={title}\nComment={playing}\nURL={url}\n".format(**row)







# Generate filename for temporary .pls/m3u, with unique id
def tmp_fn(row, ext="pls"):
    # use original url for generating a hash sum
    stream_url_hash = abs(hash(str(row)))







<
|
>
>
>
>







628
629
630
631
632
633
634

635
636
637
638
639
640
641
642
643
644
645
646
            if row.get("url"):
                txt += """\t\t<{} src="{}"/>\n""".format(row.get("format", "audio").split("/")[0], row["url"])
        txt += """\t</seq>\n</body>\n</smil>\n"""
        return txt

    # .DESKTOP links
    def desktop(self, rows):

        return "[Desktop Entry]\nVersion=1.0\nIcon=media-playback-start\nType=Link\nName={title}\nComment={playing}\nURL={url}\n".format(**rows[0])

    # .URL shortcuts
    def url(self, rows):
        return "[InternetShortcut]\nURL={url}\n".format(**rows[0])



# Generate filename for temporary .pls/m3u, with unique id
def tmp_fn(row, ext="pls"):
    # use original url for generating a hash sum
    stream_url_hash = abs(hash(str(row)))

Modified gtk3.xml.gz from [41b9cff9ce] to [6d8c078f9d].

cannot compute difference between binary files