@@ -48,10 +48,11 @@ # settings from last session last = self.load("settings") if (last): self.update(last) + self.migrate() # store defaults in file else: self.save("settings") self.firstrun = 1 @@ -58,11 +59,11 @@ # some defaults def defaults(self): self.browser = "sensible-browser" self.play = { - "audio/mp3": "audacious ", # %u for url to .pls, %g for downloaded .m3u + "audio/mpeg": "audacious ", # %u for url to .pls, %g for downloaded .m3u "audio/ogg": "audacious ", "audio/aac": "amarok -l ", "audio/x-pn-realaudio": "vlc --one-instance", "audio/*": "totem ", "*/*": "vlc --one-instance %srv", @@ -178,10 +179,17 @@ self[key].update(value) else: self[key] = value # descends into sub-dicts instead of wiping them with subkeys + # update old setting names + def migrate(self): + # 2.1.1 + if "audio/mp3" in self.play: + self.play["audio/mpeg"] = self.play["audio/mp3"] + del self.play["audio/mp3"] + # check for existing filename in directory list def find_in_dirs(self, dirs, file): for d in dirs: if os.path.exists(d+"/"+file):