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

⌈⌋ ⎇ branch:  streamtuner2


Diff

Differences From Artifact [af2a92a118]:

To Artifact [f74a30909e]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# encoding: UTF-8
# api: streamtuner2
# title: Drag and Drop (experimental)
# description: Copy streams/stations from and to other applications.
# depends: uikit
# version: 0.5
# type: feature
# config:
#   { name: dnd_format, type: select, value: xspf, select: "pls|m3u|xspf|jspf|asx|smil|desktop", description: "Default temporary file format for copying a station." }
# category: io
# priority: default
# support: experimental
#
# Implements Gtk/X11 drag and drop support for station lists.
# Should allow to export either just stream URLs, or complete
# PLS, XSPF collections.








|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# encoding: UTF-8
# api: streamtuner2
# title: Drag and Drop (experimental)
# description: Copy streams/stations from and to other applications.
# depends: uikit
# version: 0.5
# type: feature
# config:
#   { name: dnd_format, type: select, value: xspf, select: "pls|m3u|xspf|jspf|asx|smil|desktop|srv", description: "Default temporary file format for copying a station." }
# category: io
# priority: default
# support: experimental
#
# Implements Gtk/X11 drag and drop support for station lists.
# Should allow to export either just stream URLs, or complete
# PLS, XSPF collections.
200
201
202
203
204
205
206



207
208
209
210
211
212
213
        elif info >= 10:
            urls = action.convert_playlist(r["url"], r["listformat"], "srv", False, r)
            #buf = 'uris', urls
            buf = 'text', urls[0]
        # Text sources are assumed to understand the literal URL or expect a description block
        elif info >= 5:
            buf = 'text', "{url}\n# Title: {title}\n# Homepage: {homepage}\n\n".format(**r)



        # Create temporary PLS file, because "text/uri-list" is widely misunderstood and just implemented for file:// IRLs
        else:
            title = re.sub("[^\w-]+", "_", r["title"]).strip()
            tmpfn = "{}/{}.{}".format(conf.tmp, title, conf.dnd_format)
            log.DND("tmpfn", tmpfn)
            cnv.file(rows=[r], dest=conf.dnd_format, fn=tmpfn)
            if info == 4:







>
>
>







200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
        elif info >= 10:
            urls = action.convert_playlist(r["url"], r["listformat"], "srv", False, r)
            #buf = 'uris', urls
            buf = 'text', urls[0]
        # Text sources are assumed to understand the literal URL or expect a description block
        elif info >= 5:
            buf = 'text', "{url}\n# Title: {title}\n# Homepage: {homepage}\n\n".format(**r)
        # Direct URL as text/uri-list
        elif conf.dnd_format == "srv":
            buf = 'uris', [self.row.get("url")]
        # Create temporary PLS file, because "text/uri-list" is widely misunderstood and just implemented for file:// IRLs
        else:
            title = re.sub("[^\w-]+", "_", r["title"]).strip()
            tmpfn = "{}/{}.{}".format(conf.tmp, title, conf.dnd_format)
            log.DND("tmpfn", tmpfn)
            cnv.file(rows=[r], dest=conf.dnd_format, fn=tmpfn)
            if info == 4: