# Reset paths to defaults preferences.setValue("jsit", "torrentDirectory", "intorrents") preferences.setValue("downloads", "basedir", "downloads") preferences.setValue("downloads", "completedDirectory", "completed") # Remove label options preferences.setValue("autoDownload", "skipLabels", []) preferences.setValue("autoDownload", "checkAutoDownloadPieces", False) preferences.setValue("autoDownload", "deleteSkippedAndStopped", False) preferences.setValue("autoDownload", "trackers", []) preferences.setValue("downloads", "setCompletedLabel", None) preferences.setValue("downloads", "unpackArchives", False) print "Updating defaults.json..." preferences.save("defaults.json") # Add some demo options preferences.setValue("autoDownload", "types", { "Movies" : { "completedDirectory": "completed/Movies", "matchLabels": [ "Movies" ], "matchNames": [] }, "JohnSteward" : { "completedDirectory": "completed/JohnSteward", "matchLabels": [], "matchNames": [ "The\.Daily\.Show" ] }
def savePreferences(self): log(INFO) preferences.save("preferences.json")
def savePreferences(self): log(INFO) preferences.save(os.path.join(basedir, "preferences.json"))
def edit_preferences(self, window, data = None): dialog = dialogs.PreferencesDialog(self.window) dialog.run() dialog.destroy() preferences.save()
def edit_preferences(self, window, data=None): dialog = dialogs.PreferencesDialog(self.window) dialog.run() dialog.destroy() preferences.save()