def change_USE_TRAKT(use_trakt):
 use_trakt = checkbox_to_value(use_trakt)
 if (sickbeard.USE_TRAKT == use_trakt):
  return
 sickbeard.USE_TRAKT = use_trakt
 if sickbeard.USE_TRAKT:
  if (not sickbeard.traktCheckerScheduler.enable):
   logger.log(u'Starting TRAKTCHECKER thread', logger.INFO)
   sickbeard.traktCheckerScheduler.silent = False
   sickbeard.traktCheckerScheduler.enable = True
  else:
   logger.log(u'Unable to start TRAKTCHECKER thread. Already running', logger.INFO)
 else:
  sickbeard.traktCheckerScheduler.enable = False
  sickbeard.traktCheckerScheduler.silent = True
  logger.log(u'Stopping TRAKTCHECKER thread', logger.INFO)

def change_USE_TRAKT ( use_trakt ) : use_trakt = checkbox_to_value ( use_trakt ) if ( sickbeard . USE_TRAKT == use_trakt ) : return sickbeard . USE_TRAKT = use_trakt if sickbeard . USE_TRAKT : if ( not sickbeard . traktCheckerScheduler . enable ) : logger . log ( u'Starting TRAKTCHECKER thread' , logger . INFO ) sickbeard . traktCheckerScheduler . silent = False sickbeard . traktCheckerScheduler . enable = True else : logger . log ( u'Unable to start TRAKTCHECKER thread. Already running' , logger . INFO ) else : sickbeard . traktCheckerScheduler . enable = False sickbeard . traktCheckerScheduler . silent = True logger . log ( u'Stopping TRAKTCHECKER thread' , logger . INFO )
enable/disable trakt thread todo: make this return true/false on success/failure .