コード例 #1
0
ファイル: cfg.py プロジェクト: methos2016/sabnzbd
    global email_endjob, email_full, email_rss
    if value == '' and (email_endjob() or email_full() or email_rss()):
        return T('Server address required'), None
    else:
        return None, value


if sabnzbd.WIN32:
    DEF_FOLDER_MAX = 128
else:
    DEF_FOLDER_MAX = 256

##############################################################################
# Configuration instances
##############################################################################
quick_check = OptionBool('misc', 'quick_check', True)
sfv_check = OptionBool('misc', 'sfv_check', True)
quick_check_ext_ignore = OptionList('misc', 'quick_check_ext_ignore',
                                    ['nfo', 'sfv', 'srr'])

email_server = OptionStr('misc', 'email_server', validation=validate_server)
email_to = OptionList('misc', 'email_to', validation=validate_email)
email_from = OptionStr('misc', 'email_from', validation=validate_email)
email_account = OptionStr('misc', 'email_account')
email_pwd = OptionPassword('misc', 'email_pwd')
email_endjob = OptionNumber('misc', 'email_endjob', 0, 0, 2)
email_full = OptionBool('misc', 'email_full', False)
email_dir = OptionDir('misc', 'email_dir', create=True)
email_rss = OptionBool('misc', 'email_rss', False)

version_check = OptionNumber('misc', 'check_new_rel', 1)
コード例 #2
0
def validate_server(value):
    """ Check if server non-empty"""
    global email_endjob, email_full, email_rss
    if value == "" and (email_endjob() or email_full() or email_rss()):
        return T("Server address required"), None
    else:
        return None, value


##############################################################################
# Special settings
##############################################################################
pre_script = OptionStr("misc", "pre_script", "None")
queue_complete = OptionStr("misc", "queue_complete")
queue_complete_pers = OptionBool("misc", "queue_complete_pers", False)
bandwidth_perc = OptionNumber("misc", "bandwidth_perc", 0, 0, 100)
refresh_rate = OptionNumber("misc", "refresh_rate", 0)
log_level = OptionNumber("logging", "log_level", 1, -1, 2)
log_size = OptionStr("logging", "max_log_size", "5242880")
log_backups = OptionNumber("logging", "log_backups", 5, 1, 1024)
queue_limit = OptionNumber("misc", "queue_limit", 20, 0)

configlock = OptionBool("misc", "config_lock", 0)

##############################################################################
# One time trackers
##############################################################################
sched_converted = OptionBool("misc", "sched_converted", False)
notified_new_skin = OptionNumber("misc", "notified_new_skin", 0)
direct_unpack_tested = OptionBool("misc", "direct_unpack_tested", False)
コード例 #3
0
ファイル: cfg.py プロジェクト: maxired/sabnzbd
    global email_endjob, email_full, email_rss
    if value == '' and (email_endjob() or email_full() or email_rss()):
        return T('Server address required'), None
    else:
        return None, value

#------------------------------------------------------------------------------
if sabnzbd.WIN32:
    DEF_FOLDER_MAX = 128
else:
    DEF_FOLDER_MAX = 256

#------------------------------------------------------------------------------
# Configuration instances
#
quick_check = OptionBool('misc', 'quick_check', True)
fail_on_crc = OptionBool('misc', 'fail_on_crc', True)
send_group = OptionBool('misc', 'send_group', False)
sfv_check = OptionBool('misc', 'sfv_check', True)

email_server  = OptionStr('misc', 'email_server', validation=validate_server)
email_to      = OptionList('misc', 'email_to', validation=validate_email)
email_from    = OptionStr('misc', 'email_from', validation=validate_email)
email_account = OptionStr('misc', 'email_account')
email_pwd     = OptionPassword('misc', 'email_pwd')
email_endjob  = OptionNumber('misc', 'email_endjob', 0, 0, 2)
email_full    = OptionBool('misc', 'email_full', False)
email_dir     = OptionDir('misc', 'email_dir', create=True)
email_rss     = OptionBool('misc', 'email_rss', False)

version_check = OptionNumber('misc', 'check_new_rel', 1)
コード例 #4
0
    global email_endjob, email_full, email_rss
    if value == '' and (email_endjob() or email_full() or email_rss()):
        return T('Server address required'), None
    else:
        return None, value

#------------------------------------------------------------------------------
if sabnzbd.WIN32:
    DEF_FOLDER_MAX = 128
else:
    DEF_FOLDER_MAX = 256

#------------------------------------------------------------------------------
# Configuration instances
#
quick_check = OptionBool('misc', 'quick_check', True)
fail_on_crc = OptionBool('misc', 'fail_on_crc', False)
send_group = OptionBool('misc', 'send_group', False)
sfv_check = OptionBool('misc', 'sfv_check', True)

email_server  = OptionStr('misc', 'email_server', validation=validate_server)
email_to      = OptionList('misc', 'email_to', validation=validate_email)
email_from    = OptionStr('misc', 'email_from', validation=validate_email)
email_account = OptionStr('misc', 'email_account')
email_pwd     = OptionPassword('misc', 'email_pwd')
email_endjob  = OptionNumber('misc', 'email_endjob', 0, 0, 2)
email_full    = OptionBool('misc', 'email_full', False)
email_dir     = OptionDir('misc', 'email_dir', create=True)
email_rss     = OptionBool('misc', 'email_rss', False)

version_check = OptionBool('misc', 'check_new_rel', True)