@@ -252,10 +252,19 @@ self.play["audio/mpeg"] = self.play["audio/mp3"] del self.play["audio/mp3"] if self.tmp == "/tmp": self.tmp = "/tmp/streamtuner2" + + # Shortcut to `state.json` loading (currently selected categories etc.) + def state(self, module=None, d={}): + if not d: + d.update(conf.load("state")) + if module: + return d.get(module, {}) + return d + # check for existing filename in directory list def find_in_dirs(self, dirs, file): for d in dirs: if os.path.exists(d+"/"+file):