42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58 | 42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58 |
-
+
|
# 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)
log.PROC("Exporting category to", fn)
if fn:
dest = re.findall("\.(m3u8?|pls|xspf|jspf|json|smil|asx)8?$", fn.lower())
if dest:
dest = dest[0]
else:
self.parent.status("Unsupported export playlist type (file extension).")
return
action.save_playlist(source="asis", multiply=False).file(rows=streams, fn=fn, dest=dest)
pass |