Index: action.py ================================================================== --- action.py +++ action.py @@ -39,11 +39,11 @@ class action: # streamlink formats lt = {"asx":"video/x-ms-asf", "pls":"audio/x-scpls", "m3u":"audio/x-mpegurl", "xspf":"application/xspf+xml", "href":"url/http", "ram":"audio/x-pn-realaudio", "smil":"application/smil"} # media formats - mf = {"mp3":"audio/mp3", "ogg":"audio/ogg", "aac":"audio/aac"} + mf = {"mp3":"audio/mpeg", "ogg":"audio/ogg", "aac":"audio/aac"} # web @staticmethod def browser(url): @@ -61,16 +61,16 @@ return "%r" % str(s) # calls player for stream url and format @staticmethod - def play(url, audioformat="audio/mp3", listformat="text/x-href"): + def play(url, audioformat="audio/mpeg", listformat="text/x-href"): if (url): url = action.url(url, listformat) if (audioformat): - if audioformat == "audio/mpeg": - audioformat = "audio/mp3" # internally we use the more user-friendly moniker + if audioformat == "audio/mp3": + audioformat = "audio/mpeg" cmd = conf.play.get(audioformat, conf.play.get("*/*", "vlc %u")) __print__( dbg.PROC,"play", url, cmd ) try: action.run( action.interpol(cmd, url) ) except: @@ -86,11 +86,11 @@ os.system(cmd + " &") # streamripper @staticmethod - def record(url, audioformat="audio/mp3", listformat="text/x-href", append="", row={}): + def record(url, audioformat="audio/mpeg", listformat="text/x-href", append="", row={}): __print__( dbg.PROC, "record", url ) cmd = conf.record.get(audioformat, conf.record.get("*/*", None)) try: action.run( action.interpol(cmd, url, row) + append ) except: pass @@ -209,11 +209,11 @@ return action.pls(pls) elif (re.search("\.asx", pls)): #video/x-ms-asf return re.findall("12 13 - + 200 20 True True @@ -1239,11 +1239,12 @@ True False - audio/mp3 + audio/mpeg 1 2 Index: st2.py ================================================================== --- st2.py +++ st2.py @@ -312,11 +312,11 @@ # streamripper def on_record_clicked(self, widget): row = self.row() - action.record(row.get("url"), "audio/mp3", "url/direct", row=row) + action.record(row.get("url"), "audio/mpeg", "url/direct", row=row) # browse stream def on_homepage_stream_clicked(self, widget): url = self.selected("homepage") @@ -723,11 +723,11 @@ # add a new list entry, update window def new(self, w): s = main.channel().stations() - s.append({"title":"new", "url":"", "format":"audio/mp3", "genre":"", "listeners":1}); + s.append({"title":"new", "url":"", "format":"audio/mpeg", "genre":"", "listeners":1}); main.channel().switch() # update display main.channel().gtk_list.get_selection().select_path(str(len(s)-1)); # set cursor to last row self.open(w) @@ -768,11 +768,11 @@ for key,val in config.items(): # map non-alphanumeric chars from config{} to underscores in according gtk widget names id = re.sub("[^\w]", "_", key) w = main.get_widget(prefix + id) __print__(dbg.CONF, "config", ("save" if save else "load"), prefix+id, w, val) - # recurse into dictionaries, transform: conf.play.audio/mp3 => conf.play_audio_mp3 + # recurse into dictionaries, transform: conf.play.audio/mpeg => conf.play_audio_mpeg if (type(val) == dict): self.apply(val, prefix + id + "_", save) # load or set gtk.Entry text field elif (w and save and type(w)==gtk.Entry): config[key] = w.get_text()