def put(self, imdb_id): """Save the settings for a movie.""" input_json = cherrypy.request.json if all(k in input_json for k in ('wanted_languages', 'refine', 'hearing_impaired', 'utf8_encoding')): wanted_languages = input_json['wanted_languages'] refine = get_boolean(input_json['refine']) hearing_impaired = get_boolean(input_json['hearing_impaired']) utf8_encoding = get_boolean(input_json['utf8_encoding']) # Update settings db = MovieSettingsDb() movie_settings = db.get_movie_settings(imdb_id) movie_settings.wanted_languages = wanted_languages movie_settings.refine = refine movie_settings.hearing_impaired = hearing_impaired movie_settings.utf8_encoding = utf8_encoding db.update_movie_settings(movie_settings) # Delete wanted items for the movie so the new settings will be used in the next disk scan WantedItemsDb().delete_wanted_items_for_movie(imdb_id) # Send notification send_websocket_notification('Settings will be applied on next disk scan.') return self._no_content() return self._bad_request('Missing data')
def put(self, imdb_id): """Save the settings for a movie.""" input_json = cherrypy.request.json if all(k in input_json for k in ('wanted_languages', 'refine', 'hearing_impaired', 'utf8_encoding')): wanted_languages = input_json['wanted_languages'] refine = get_boolean(input_json['refine']) hearing_impaired = get_boolean(input_json['hearing_impaired']) utf8_encoding = get_boolean(input_json['utf8_encoding']) # Update settings db = MovieSettingsDb() movie_settings = db.get_movie_settings(imdb_id) movie_settings.wanted_languages = wanted_languages movie_settings.refine = refine movie_settings.hearing_impaired = hearing_impaired movie_settings.utf8_encoding = utf8_encoding db.update_movie_settings(movie_settings) # Delete wanted items for the movie so the new settings will be used in the next disk scan WantedItemsDb().delete_wanted_items_for_movie(imdb_id) # Send notification send_websocket_notification( 'Settings will be applied on next disk scan.') return self._no_content() return self._bad_request('Missing data')
def test_get_boolean(): assert get_boolean('1') assert get_boolean('yes') assert get_boolean('true') assert get_boolean('on') assert not get_boolean('0') assert not get_boolean('no') assert not get_boolean('false') assert not get_boolean('off') with pytest.raises(ValueError): get_boolean('test')
def save(self, postprocess, postprocessindividual, postprocessutf8encoding, showpostprocesscmd, showpostprocesscmdargs, moviepostprocesscmd, moviepostprocesscmdargs): # Set postprocessing variables autosubliminal.POSTPROCESS = get_boolean(postprocess) autosubliminal.POSTPROCESSINDIVIDUAL = get_boolean(postprocessindividual) autosubliminal.POSTPROCESSUTF8ENCODING = get_boolean(postprocessutf8encoding) autosubliminal.SHOWPOSTPROCESSCMD = showpostprocesscmd autosubliminal.SHOWPOSTPROCESSCMDARGS = showpostprocesscmdargs autosubliminal.MOVIEPOSTPROCESSCMD = moviepostprocesscmd autosubliminal.MOVIEPOSTPROCESSCMDARGS = moviepostprocesscmdargs # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, logfile, loglevel, lognum, logsize, loghttpaccess, logexternallibs, logdetailedformat, logreversed, loglevelconsole): # Set logfile variables autosubliminal.LOGFILE = logfile autosubliminal.LOGLEVEL = int(loglevel) autosubliminal.LOGNUM = int(lognum) autosubliminal.LOGSIZE = int(logsize) autosubliminal.LOGHTTPACCESS = get_boolean(loghttpaccess) autosubliminal.LOGEXTERNALLIBS = get_boolean(logexternallibs) autosubliminal.LOGDETAILEDFORMAT = get_boolean(logdetailedformat) autosubliminal.LOGREVERSED = get_boolean(logreversed) autosubliminal.LOGLEVELCONSOLE = int(loglevelconsole) # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, logfile, loglevel, lognum, logsize, loghttpaccess, logexternallibs, logdetailedformat, logreversed, loglevelconsole): # Set logfile variables autosubliminal.LOGFILE = logfile autosubliminal.LOGLEVEL = int(loglevel) autosubliminal.LOGNUM = int(lognum) autosubliminal.LOGSIZE = int(logsize) autosubliminal.LOGHTTPACCESS = get_boolean(loghttpaccess) autosubliminal.LOGEXTERNALLIBS = get_boolean(logexternallibs) autosubliminal.LOGDETAILEDFORMAT = get_boolean(logdetailedformat) autosubliminal.LOGREVERSED = get_boolean(logreversed) autosubliminal.LOGLEVELCONSOLE = int(loglevelconsole) # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, postprocess, postprocessindividual, postprocessutf8encoding, showpostprocesscmd, showpostprocesscmdargs, moviepostprocesscmd, moviepostprocesscmdargs): # Set postprocessing variables autosubliminal.POSTPROCESS = get_boolean(postprocess) autosubliminal.POSTPROCESSINDIVIDUAL = get_boolean( postprocessindividual) autosubliminal.POSTPROCESSUTF8ENCODING = get_boolean( postprocessutf8encoding) autosubliminal.SHOWPOSTPROCESSCMD = showpostprocesscmd autosubliminal.SHOWPOSTPROCESSCMDARGS = showpostprocesscmdargs autosubliminal.MOVIEPOSTPROCESSCMD = moviepostprocesscmd autosubliminal.MOVIEPOSTPROCESSCMDARGS = moviepostprocesscmdargs # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, videopaths, defaultlanguage, defaultlanguagesuffix, additionallanguages, manualsearchwithscoring, scandiskinterval, checksubinterval, checksubdeadline, checksubdelta, checkversioninterval, checkversionautoupdate, scanembeddedsubs, scanhardcodedsubs, skiphiddendirs, detectinvalidsublanguage, detectedlanguageprobability, minvideofilesize, maxdbresults, timestampformat): # Set general variables autosubliminal.VIDEOPATHS = videopaths.split('\r\n') autosubliminal.DEFAULTLANGUAGE = defaultlanguage autosubliminal.DEFAULTLANGUAGESUFFIX = get_boolean( defaultlanguagesuffix) autosubliminal.ADDITIONALLANGUAGES = additionallanguages.split(',') autosubliminal.MANUALSEARCHWITHSCORING = get_boolean( manualsearchwithscoring) autosubliminal.SCANDISKINTERVAL = int(scandiskinterval) autosubliminal.CHECKSUBINTERVAL = int(checksubinterval) autosubliminal.CHECKSUBDEADLINE = int(checksubdeadline) autosubliminal.CHECKSUBDELTA = int(checksubdelta) autosubliminal.CHECKVERSIONINTERVAL = int(checkversioninterval) autosubliminal.CHECKVERSIONAUTOUPDATE = get_boolean( checkversionautoupdate) autosubliminal.SCANEMBEDDEDSUBS = get_boolean(scanembeddedsubs) autosubliminal.SCANHARDCODEDSUBS = get_boolean(scanhardcodedsubs) autosubliminal.SKIPHIDDENDIRS = get_boolean(skiphiddendirs) autosubliminal.DETECTINVALIDSUBLANGUAGE = get_boolean( detectinvalidsublanguage) autosubliminal.DETECTEDLANGUAGEPROBABILITY = float( detectedlanguageprobability) autosubliminal.MINVIDEOFILESIZE = int(minvideofilesize) autosubliminal.MAXDBRESULTS = int(maxdbresults) autosubliminal.TIMESTAMPFORMAT = timestampformat # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, videopaths, defaultlanguage, defaultlanguagesuffix, additionallanguages, manualsearchwithscoring, scandiskinterval, checksubinterval, checksubdeadline, checksubdelta, checkversioninterval, checkversionautoupdate, scanembeddedsubs, scanhardcodedsubs, skiphiddendirs, detectinvalidsublanguage, detectedlanguageprobability, minvideofilesize, maxdbresults, timestampformat): # Set general variables autosubliminal.VIDEOPATHS = videopaths.split('\r\n') autosubliminal.DEFAULTLANGUAGE = defaultlanguage autosubliminal.DEFAULTLANGUAGESUFFIX = get_boolean(defaultlanguagesuffix) autosubliminal.ADDITIONALLANGUAGES = additionallanguages.split(',') autosubliminal.MANUALSEARCHWITHSCORING = get_boolean(manualsearchwithscoring) autosubliminal.SCANDISKINTERVAL = int(scandiskinterval) autosubliminal.CHECKSUBINTERVAL = int(checksubinterval) autosubliminal.CHECKSUBDEADLINE = int(checksubdeadline) autosubliminal.CHECKSUBDELTA = int(checksubdelta) autosubliminal.CHECKVERSIONINTERVAL = int(checkversioninterval) autosubliminal.CHECKVERSIONAUTOUPDATE = get_boolean(checkversionautoupdate) autosubliminal.SCANEMBEDDEDSUBS = get_boolean(scanembeddedsubs) autosubliminal.SCANHARDCODEDSUBS = get_boolean(scanhardcodedsubs) autosubliminal.SKIPHIDDENDIRS = get_boolean(skiphiddendirs) autosubliminal.DETECTINVALIDSUBLANGUAGE = get_boolean(detectinvalidsublanguage) autosubliminal.DETECTEDLANGUAGEPROBABILITY = float(detectedlanguageprobability) autosubliminal.MINVIDEOFILESIZE = int(minvideofilesize) autosubliminal.MAXDBRESULTS = int(maxdbresults) autosubliminal.TIMESTAMPFORMAT = timestampformat # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, webserverip, webserverport, webroot, username, password, launchbrowser): # Set webserver variables autosubliminal.WEBSERVERIP = webserverip autosubliminal.WEBSERVERPORT = int(webserverport) autosubliminal.WEBROOT = webroot autosubliminal.USERNAME = username autosubliminal.PASSWORD = password autosubliminal.LAUNCHBROWSER = get_boolean(launchbrowser) # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, notify, notifymail, mailsrv, mailfromaddr, mailtoaddr, mailusername, mailpassword, mailsubject, mailencryption, mailauth, notifytwitter, twitterkey, twittersecret, notifypushalot, pushalotapi, notifypushover, pushoverkey, pushoverapi, pushoverdevices, notifygrowl, growlhost, growlport, growlpass, growlpriority, notifyprowl, prowlapi, prowlpriority, notifypushbullet, pushbulletapi, notifytelegram, telegrambotapi, telegramchatid): # Set notify variables autosubliminal.NOTIFY = get_boolean(notify) autosubliminal.NOTIFYMAIL = get_boolean(notifymail) autosubliminal.MAILSRV = mailsrv autosubliminal.MAILFROMADDR = mailfromaddr autosubliminal.MAILTOADDR = mailtoaddr autosubliminal.MAILUSERNAME = mailusername autosubliminal.MAILPASSWORD = mailpassword autosubliminal.MAILSUBJECT = mailsubject autosubliminal.MAILENCRYPTION = mailencryption autosubliminal.MAILAUTH = mailauth autosubliminal.NOTIFYTWITTER = get_boolean(notifytwitter) autosubliminal.TWITTERKEY = twitterkey autosubliminal.TWITTERSECRET = twittersecret autosubliminal.NOTIFYPUSHALOT = get_boolean(notifypushalot) autosubliminal.PUSHALOTAPI = pushalotapi autosubliminal.NOTIFYPUSHOVER = get_boolean(notifypushover) autosubliminal.PUSHOVERKEY = pushoverkey autosubliminal.PUSHOVERAPI = pushoverapi autosubliminal.PUSHOVERDEVICES = pushoverdevices autosubliminal.NOTIFYGROWL = get_boolean(notifygrowl) autosubliminal.GROWLHOST = growlhost autosubliminal.GROWLPORT = int(growlport) autosubliminal.GROWLPASS = growlpass autosubliminal.GROWLPRIORITY = int(growlpriority) autosubliminal.NOTIFYPROWL = get_boolean(notifyprowl) autosubliminal.PROWLAPI = prowlapi autosubliminal.PROWLPRIORITY = int(prowlpriority) autosubliminal.NOTIFYPUSHBULLET = get_boolean(notifypushbullet) autosubliminal.PUSHBULLETAPI = pushbulletapi autosubliminal.NOTIFYTELEGRAM = get_boolean(notifytelegram) autosubliminal.TELEGRAMBOTAPI = telegrambotapi autosubliminal.TELEGRAMCHATID = telegramchatid # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, webserverip, webserverport, webroot, username, password, launchbrowser): # Set webserver variables autosubliminal.WEBSERVERIP = webserverip autosubliminal.WEBSERVERPORT = int(webserverport) autosubliminal.WEBROOT = webroot autosubliminal.USERNAME = username autosubliminal.PASSWORD = password autosubliminal.LAUNCHBROWSER = get_boolean(launchbrowser) # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, notify, notifymail, mailsrv, mailfromaddr, mailtoaddr, mailusername, mailpassword, mailsubject, mailencryption, mailauth, notifytwitter, twitterkey, twittersecret, notifypushalot, pushalotapi, notifypushover, pushoverkey, pushoverapi, pushoverdevices, notifygrowl, growlhost, growlport, growlpass, growlpriority, notifyprowl, prowlapi, prowlpriority, notifypushbullet, pushbulletapi, notifytelegram, telegrambotapi, telegramchatid): # Set notify variables autosubliminal.NOTIFY = get_boolean(notify) autosubliminal.NOTIFYMAIL = get_boolean(notifymail) autosubliminal.MAILSRV = mailsrv autosubliminal.MAILFROMADDR = mailfromaddr autosubliminal.MAILTOADDR = mailtoaddr autosubliminal.MAILUSERNAME = mailusername autosubliminal.MAILPASSWORD = mailpassword autosubliminal.MAILSUBJECT = mailsubject autosubliminal.MAILENCRYPTION = mailencryption autosubliminal.MAILAUTH = mailauth autosubliminal.NOTIFYTWITTER = get_boolean(notifytwitter) autosubliminal.TWITTERKEY = twitterkey autosubliminal.TWITTERSECRET = twittersecret autosubliminal.NOTIFYPUSHALOT = get_boolean(notifypushalot) autosubliminal.PUSHALOTAPI = pushalotapi autosubliminal.NOTIFYPUSHOVER = get_boolean(notifypushover) autosubliminal.PUSHOVERKEY = pushoverkey autosubliminal.PUSHOVERAPI = pushoverapi autosubliminal.PUSHOVERDEVICES = pushoverdevices autosubliminal.NOTIFYGROWL = get_boolean(notifygrowl) autosubliminal.GROWLHOST = growlhost autosubliminal.GROWLPORT = int(growlport) autosubliminal.GROWLPASS = growlpass autosubliminal.GROWLPRIORITY = int(growlpriority) autosubliminal.NOTIFYPROWL = get_boolean(notifyprowl) autosubliminal.PROWLAPI = prowlapi autosubliminal.PROWLPRIORITY = int(prowlpriority) autosubliminal.NOTIFYPUSHBULLET = get_boolean(notifypushbullet) autosubliminal.PUSHBULLETAPI = pushbulletapi autosubliminal.NOTIFYTELEGRAM = get_boolean(notifytelegram) autosubliminal.TELEGRAMBOTAPI = telegrambotapi autosubliminal.TELEGRAMCHATID = telegramchatid # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, librarymode, librarypaths, scanlibraryinterval): # Set library variables autosubliminal.LIBRARYMODE = get_boolean(librarymode) autosubliminal.LIBRARYPATHS = librarypaths.split('\r\n') autosubliminal.SCANLIBRARYINTERVAL = int(scanlibraryinterval) # Activate/deactivate scheduler if autosubliminal.LIBRARYMODE: autosubliminal.SCANLIBRARY.activate() else: autosubliminal.SCANLIBRARY.deactivate() # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, librarymode, librarypaths, scanlibraryinterval): # Set library variables autosubliminal.LIBRARYMODE = get_boolean(librarymode) autosubliminal.LIBRARYPATHS = librarypaths.split('\r\n') autosubliminal.SCANLIBRARYINTERVAL = int(scanlibraryinterval) # Activate/deactivate scheduler if autosubliminal.LIBRARYMODE: autosubliminal.SCANLIBRARY.activate() else: autosubliminal.SCANLIBRARY.deactivate() # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, subtitleutf8encoding, manualrefinevideo, refinevideo, preferhearingimpaired, addic7edusername, addic7edpassword, opensubtitlesusername, opensubtitlespassword, showmmsdefault=None, showmmssource=None, showmmsquality=None, showmmscodec=None, showmmsreleasegroup=None, moviemmsdefault=None, moviemmssource=None, moviemmsquality=None, moviemmscodec=None, moviemmsreleasegroup=None, subliminalproviders=None): # Set subliminal variables # Match options and showminmatchscore autosubliminal.SHOWMATCHSOURCE = False autosubliminal.SHOWMATCHQUALITY = False autosubliminal.SHOWMATCHCODEC = False autosubliminal.SHOWMATCHRELEASEGROUP = False autosubliminal.SHOWMINMATCHSCORE = 0 # If not checked, the value will be default None, if checked, it will contain a value if showmmsdefault: # showmmsdefault is the minimal default score for a show (not editable, so no flag is needed) autosubliminal.SHOWMINMATCHSCORE += autosubliminal.SHOWMINMATCHSCOREDEFAULT if showmmssource: autosubliminal.SHOWMINMATCHSCORE += 7 autosubliminal.SHOWMATCHSOURCE = True if showmmsquality: autosubliminal.SHOWMINMATCHSCORE += 2 autosubliminal.SHOWMATCHQUALITY = True if showmmscodec: autosubliminal.SHOWMINMATCHSCORE += 2 autosubliminal.SHOWMATCHCODEC = True if showmmsreleasegroup: autosubliminal.SHOWMINMATCHSCORE += 15 autosubliminal.SHOWMATCHRELEASEGROUP = True # Match options and movieminmatchscore autosubliminal.MOVIEMATCHSOURCE = False autosubliminal.MOVIEMATCHQUALITY = False autosubliminal.MOVIEMATCHCODEC = False autosubliminal.MOVIEMATCHRELEASEGROUP = False autosubliminal.MOVIEMINMATCHSCORE = 0 # If not checked, the value will be default None, if checked, it will contain a value if moviemmsdefault: # moviemmsdefault is the minimal default score for a movie (not editable, so no flag is needed) autosubliminal.MOVIEMINMATCHSCORE += autosubliminal.MOVIEMINMATCHSCOREDEFAULT if moviemmssource: autosubliminal.MOVIEMINMATCHSCORE += 7 autosubliminal.MOVIEMATCHSOURCE = True if moviemmsquality: autosubliminal.MOVIEMINMATCHSCORE += 2 autosubliminal.MOVIEMATCHQUALITY = True if moviemmscodec: autosubliminal.MOVIEMINMATCHSCORE += 2 autosubliminal.MOVIEMATCHCODEC = True if moviemmsreleasegroup: autosubliminal.MOVIEMINMATCHSCORE += 15 autosubliminal.MOVIEMATCHRELEASEGROUP = True # Subliminal providers if isinstance(subliminalproviders, list): autosubliminal.SUBLIMINALPROVIDERS = subliminalproviders else: autosubliminal.SUBLIMINALPROVIDERS = [ subliminalproviders ] if subliminalproviders else [] # Subtitle utf8 encoding autosubliminal.SUBTITLEUTF8ENCODING = get_boolean( subtitleutf8encoding) # Refine video autosubliminal.MANUALREFINEVIDEO = get_boolean(manualrefinevideo) autosubliminal.REFINEVIDEO = get_boolean(refinevideo) # Hearing impaired autosubliminal.PREFERHEARINGIMPAIRED = get_boolean( preferhearingimpaired) # Addic7ed provider autosubliminal.ADDIC7EDUSERNAME = addic7edusername autosubliminal.ADDIC7EDPASSWORD = addic7edpassword # OpenSubtitles provider autosubliminal.OPENSUBTITLESUSERNAME = opensubtitlesusername autosubliminal.OPENSUBTITLESPASSWORD = opensubtitlespassword # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)
def save(self, subtitleutf8encoding, manualrefinevideo, refinevideo, preferhearingimpaired, addic7edusername, addic7edpassword, opensubtitlesusername, opensubtitlespassword, showmmsdefault=None, showmmssource=None, showmmsquality=None, showmmscodec=None, showmmsreleasegroup=None, moviemmsdefault=None, moviemmssource=None, moviemmsquality=None, moviemmscodec=None, moviemmsreleasegroup=None, subliminalproviders=None): # Set subliminal variables # Match options and showminmatchscore autosubliminal.SHOWMATCHSOURCE = False autosubliminal.SHOWMATCHQUALITY = False autosubliminal.SHOWMATCHCODEC = False autosubliminal.SHOWMATCHRELEASEGROUP = False autosubliminal.SHOWMINMATCHSCORE = 0 # If not checked, the value will be default None, if checked, it will contain a value if showmmsdefault: # showmmsdefault is the minimal default score for a show (not editable, so no flag is needed) autosubliminal.SHOWMINMATCHSCORE += autosubliminal.SHOWMINMATCHSCOREDEFAULT if showmmssource: autosubliminal.SHOWMINMATCHSCORE += 7 autosubliminal.SHOWMATCHSOURCE = True if showmmsquality: autosubliminal.SHOWMINMATCHSCORE += 2 autosubliminal.SHOWMATCHQUALITY = True if showmmscodec: autosubliminal.SHOWMINMATCHSCORE += 2 autosubliminal.SHOWMATCHCODEC = True if showmmsreleasegroup: autosubliminal.SHOWMINMATCHSCORE += 15 autosubliminal.SHOWMATCHRELEASEGROUP = True # Match options and movieminmatchscore autosubliminal.MOVIEMATCHSOURCE = False autosubliminal.MOVIEMATCHQUALITY = False autosubliminal.MOVIEMATCHCODEC = False autosubliminal.MOVIEMATCHRELEASEGROUP = False autosubliminal.MOVIEMINMATCHSCORE = 0 # If not checked, the value will be default None, if checked, it will contain a value if moviemmsdefault: # moviemmsdefault is the minimal default score for a movie (not editable, so no flag is needed) autosubliminal.MOVIEMINMATCHSCORE += autosubliminal.MOVIEMINMATCHSCOREDEFAULT if moviemmssource: autosubliminal.MOVIEMINMATCHSCORE += 7 autosubliminal.MOVIEMATCHSOURCE = True if moviemmsquality: autosubliminal.MOVIEMINMATCHSCORE += 2 autosubliminal.MOVIEMATCHQUALITY = True if moviemmscodec: autosubliminal.MOVIEMINMATCHSCORE += 2 autosubliminal.MOVIEMATCHCODEC = True if moviemmsreleasegroup: autosubliminal.MOVIEMINMATCHSCORE += 15 autosubliminal.MOVIEMATCHRELEASEGROUP = True # Subliminal providers if isinstance(subliminalproviders, list): autosubliminal.SUBLIMINALPROVIDERS = subliminalproviders else: autosubliminal.SUBLIMINALPROVIDERS = [subliminalproviders] if subliminalproviders else [] # Subtitle utf8 encoding autosubliminal.SUBTITLEUTF8ENCODING = get_boolean(subtitleutf8encoding) # Refine video autosubliminal.MANUALREFINEVIDEO = get_boolean(manualrefinevideo) autosubliminal.REFINEVIDEO = get_boolean(refinevideo) # Hearing impaired autosubliminal.PREFERHEARINGIMPAIRED = get_boolean(preferhearingimpaired) # Addic7ed provider autosubliminal.ADDIC7EDUSERNAME = addic7edusername autosubliminal.ADDIC7EDPASSWORD = addic7edpassword # OpenSubtitles provider autosubliminal.OPENSUBTITLESUSERNAME = opensubtitlesusername autosubliminal.OPENSUBTITLESPASSWORD = opensubtitlespassword # Now save to the configfile and restart if needed return Config.save_and_restart_if_needed(self.section)