示例#1
0
  # 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" ]
            }
示例#2
0
 def savePreferences(self):
     log(INFO)
     preferences.save("preferences.json")
示例#3
0
 def savePreferences(self):
     log(INFO)
     preferences.save(os.path.join(basedir, "preferences.json"))
示例#4
0
	def edit_preferences(self, window, data = None):
		dialog = dialogs.PreferencesDialog(self.window)
		dialog.run()
		dialog.destroy()
		preferences.save()
示例#5
0
 def edit_preferences(self, window, data=None):
     dialog = dialogs.PreferencesDialog(self.window)
     dialog.run()
     dialog.destroy()
     preferences.save()