42
43
44
45
46
47
48
49
50
51
52
53
54
55 | uikit.add_menu([parent.extensions, parent.extensions_context], "Export all stations", self.savewindow)
# Fetch streams from category, show "Save as" dialog, then convert URLs and export as playlist file
def savewindow(self, *w):
cn = self.parent.channel()
source = cn.listformat
streams = cn.streams[cn.current]
fn = uikit.save_file("Export category", None, "stationlist." + conf.export_format)
__print__(dbg.PROC, "Exporting category to", fn)
if fn:
dest = re.findall("\.(m3u|pls|xspf|jspf|json|smil|wpl)8?$", fn)[0]
action.save_playlist(source="asis", multiply=False).store(rows=streams, fn=fn, dest=dest)
pass
|
|
|
< | 42
43
44
45
46
47
48
49
50
51
52
53
54
| uikit.add_menu([parent.extensions, parent.extensions_context], "Export all stations", self.savewindow)
# Fetch streams from category, show "Save as" dialog, then convert URLs and export as playlist file
def savewindow(self, *w):
cn = self.parent.channel()
source = cn.listformat
streams = cn.streams[cn.current]
fn = uikit.save_file("Export category", None, "%s.%s.%s" % (cn.module, cn.current, conf.export_format))
__print__(dbg.PROC, "Exporting category to", fn)
if fn:
dest = re.findall("\.(m3u|pls|xspf|jspf|json|smil|wpl)8?$", fn)[0]
action.save_playlist(source="asis", multiply=False).file(rows=streams, fn=fn, dest=dest)
pass
|