Index: channels/exportcat.py ================================================================== --- channels/exportcat.py +++ channels/exportcat.py @@ -5,11 +5,11 @@ # version: -0.1 # type: feature # category: file # priority: optional # config: -# { name: export_format, value: pls, type: select, select: "pls|xspf|jspf", description: Export format. } +# { name: export_format, value: pls, type: select, select: "pls|xspf|m3u|jspf|smil|asx|json", description: Export format. } # hooks: config_save # # Use "Extensions > Export all" in the desired channel and category, # to export all station entries at once. Currently just export PLS, # which in turn references other .pls file). Luckily most players @@ -47,15 +47,13 @@ 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("\.(m3u8?|pls|xspf|jspf|json|smil|asx)$", fn.lower()) + 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 - if dest == "m3u8": - dest = "m3u" action.save_playlist(source="asis", multiply=False).file(rows=streams, fn=fn, dest=dest) pass Index: help/exportcat.page ================================================================== --- help/exportcat.page +++ help/exportcat.page @@ -19,9 +19,10 @@
Configuration option

You can set the default export format in the settings dialog F12.

-

Currently it only supports .PLS playlist exports however.

+

It supports all common export formats now, with .PLS being the + default.

Index: st2.py ================================================================== --- st2.py +++ st2.py @@ -3,11 +3,11 @@ # encoding: UTF-8 # api: python # type: application # title: streamtuner2 # description: Directory browser for internet radio, audio and video streams -# version: 2.1.5 +# version: 2.1.6 # state: beta # author: Mario Salzer # license: Public Domain # url: http://freshcode.club/projects/streamtuner2 # config: @@ -230,11 +230,11 @@ # Notebook tab has been clicked (receives numeric page_num), but *NOT* yet changed (visually). def channel_switch(self, notebook, page, page_num=0, *args): self.current_channel = notebook.get_menu_label_text(notebook.get_nth_page(page_num)) - __print__(dbg.UI, "main.channel_switch():", "set current_channel :=", self.current_channel) + __print__(dbg.UI, "main.channel_switch() :=", self.current_channel) self.update_title() # if first selected, load current category self.channel().first_show() # Invoked from the menu instead, uses module name instead of numeric tab id