Index: channels/exportcat.py ================================================================== --- channels/exportcat.py +++ channels/exportcat.py @@ -1,10 +1,10 @@ # encoding: UTF-8 # api: streamtuner2 # title: Export Category # description: Exports a complete channel category (all stations into one file). -# version: 0.2 +# version: 0.3 # type: feature # category: file # priority: optional # -disabled-config: # { name: export_format, value: xspf, type: select, select: "pls|xspf|m3u|jspf|smil|asx|json", description: Default export format. } @@ -48,11 +48,12 @@ # 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, "xspf")) + category = re.sub(r"[^\w&-+]+", "_", cn.current) + fn = uikit.save_file("Export category", None, "%s.%s.%s" % (cn.module, category, "xspf")) log.PROC("Exporting category to", fn) if fn: dest = re.findall("\.(m3u|pls|xspf|jspf|json|smil|asx|desktop|url)8?$", fn.lower()) if dest: dest = dest[0]