mirror of
https://github.com/evilhero/mylar
synced 2024-12-23 16:22:45 +00:00
IMP:(#133) CVinfo option added in Configuration/Advanced Options
This commit is contained in:
parent
f30d507ab9
commit
25c83bdab4
4 changed files with 23 additions and 7 deletions
|
@ -354,9 +354,6 @@
|
|||
<td>
|
||||
<fieldset>
|
||||
<legend>Post-Processing</legend>
|
||||
<div class="row checkbox left clearfix">
|
||||
<input type="checkbox" name="rename_files" value="1" ${config['rename_files']} /><label>Rename files </label>
|
||||
</div>
|
||||
<div class="row checkbox left clearfix">
|
||||
<input type="checkbox" name="enable_pre_scripts" value="1" ${config['enable_pre_scripts']} /><label>Use Extra Script BEFORE Post-Processing</label>
|
||||
</div>
|
||||
|
@ -385,6 +382,9 @@
|
|||
<td>
|
||||
<fieldset>
|
||||
<legend>Renaming options</legend>
|
||||
<div class="row checkbox left clearfix">
|
||||
<input type="checkbox" name="rename_files" value="1" ${config['rename_files']} /><label>Rename files </label>
|
||||
</div>
|
||||
<div>
|
||||
<label>*Folder Format is used only when adding new comics*</label>
|
||||
</div>
|
||||
|
@ -423,7 +423,7 @@
|
|||
</div>
|
||||
<div class="row checkbox">
|
||||
<input id="zero_level" type="checkbox" onclick="initConfigCheckbox($(this));" name="zero_level" value="1" ${config['zero_level']} /><label>Zero level Suppression</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Format</label>
|
||||
<select name="zero_level_n">
|
||||
|
@ -455,6 +455,8 @@
|
|||
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="autowant_upcoming" value="1" ${config['autowant_upcoming']} /><label>Automatically Mark Upcoming Issues as Wanted</label>
|
||||
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="autowant_all" value="1" ${config['autowant_all']} /><label>Automatically Mark All Issues as Wanted</label>
|
||||
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="comic_cover_local" value="1" ${config['comic_cover_local']} /><label>Place cover.jpg into Comic Directory for each comic</label>
|
||||
<input type="checkbox" style="vertical-align: middle; margin: 3px; margin-top: -1px;" name="cvinfo" value="1" ${config['cvinfo']} /><label>Write cvinfo into each comic directory</label>
|
||||
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
|
|
|
@ -116,6 +116,7 @@ AUTOWANT_ALL = False
|
|||
COMIC_COVER_LOCAL = False
|
||||
ADD_TO_CSV = True
|
||||
SKIPPED2WANTED = False
|
||||
CVINFO = False
|
||||
|
||||
SAB_HOST = None
|
||||
SAB_USERNAME = None
|
||||
|
@ -216,7 +217,7 @@ def initialize():
|
|||
NZBSU, NZBSU_APIKEY, DOGNZB, DOGNZB_APIKEY, NZBX,\
|
||||
NEWZNAB, NEWZNAB_HOST, NEWZNAB_APIKEY, NEWZNAB_ENABLED, EXTRA_NEWZNABS,\
|
||||
RAW, RAW_PROVIDER, RAW_USERNAME, RAW_PASSWORD, RAW_GROUPS, EXPERIMENTAL, \
|
||||
PREFERRED_QUALITY, MOVE_FILES, RENAME_FILES, LOWERCASE_FILENAMES, USE_MINSIZE, MINSIZE, USE_MAXSIZE, MAXSIZE, CORRECT_METADATA, FOLDER_FORMAT, FILE_FORMAT, REPLACE_CHAR, REPLACE_SPACES, ADD_TO_CSV, \
|
||||
PREFERRED_QUALITY, MOVE_FILES, RENAME_FILES, LOWERCASE_FILENAMES, USE_MINSIZE, MINSIZE, USE_MAXSIZE, MAXSIZE, CORRECT_METADATA, FOLDER_FORMAT, FILE_FORMAT, REPLACE_CHAR, REPLACE_SPACES, ADD_TO_CSV, CVINFO, \
|
||||
COMIC_LOCATION, QUAL_ALTVERS, QUAL_SCANNER, QUAL_TYPE, QUAL_QUALITY, ENABLE_EXTRA_SCRIPTS, EXTRA_SCRIPTS, ENABLE_PRE_SCRIPTS, PRE_SCRIPTS
|
||||
|
||||
if __INITIALIZED__:
|
||||
|
@ -284,7 +285,7 @@ def initialize():
|
|||
USE_MAXSIZE = bool(check_setting_int(CFG, 'General', 'use_maxsize', 0))
|
||||
MAXSIZE = check_setting_str(CFG, 'General', 'maxsize', '')
|
||||
ADD_TO_CSV = bool(check_setting_int(CFG, 'General', 'add_to_csv', 1))
|
||||
|
||||
CVINFO = bool(check_setting_int(CFG, 'General', 'cvinfo', 0))
|
||||
ENABLE_EXTRA_SCRIPTS = bool(check_setting_int(CFG, 'General', 'enable_extra_scripts', 0))
|
||||
EXTRA_SCRIPTS = check_setting_str(CFG, 'General', 'extra_scripts', '')
|
||||
|
||||
|
@ -531,6 +532,7 @@ def config_write():
|
|||
new_config['General']['use_maxsize'] = int(USE_MAXSIZE)
|
||||
new_config['General']['maxsize'] = MAXSIZE
|
||||
new_config['General']['add_to_csv'] = int(ADD_TO_CSV)
|
||||
new_config['General']['cvinfo'] = int(CVINFO)
|
||||
new_config['General']['enable_extra_scripts'] = int(ENABLE_EXTRA_SCRIPTS)
|
||||
new_config['General']['extra_scripts'] = EXTRA_SCRIPTS
|
||||
new_config['General']['enable_pre_scripts'] = int(ENABLE_PRE_SCRIPTS)
|
||||
|
|
|
@ -363,6 +363,11 @@ def addComictoDB(comicid,mismatch=None,pullupd=None):
|
|||
}
|
||||
|
||||
myDB.upsert("comics", newValueStat, controlValueStat)
|
||||
|
||||
if mylar.CVINFO:
|
||||
if not os.path.exists(comlocation + "/cvinfo"):
|
||||
with open(comlocation + "/cvinfo","w") as text_file:
|
||||
text_file.write("http://www.comicvine.com/" + str(comic['ComicName']).replace(" ", "-") + "/49-" + str(comicid))
|
||||
|
||||
logger.info(u"Updating complete for: " + comic['ComicName'])
|
||||
|
||||
|
@ -657,6 +662,11 @@ def GCDimport(gcomicid, pullupd=None):
|
|||
|
||||
myDB.upsert("comics", newValueStat, controlValueStat)
|
||||
|
||||
if mylar.CVINFO:
|
||||
if not os.path.exists(comlocation + "/cvinfo"):
|
||||
with open(comlocation + "/cvinfo","w") as text_file:
|
||||
text_file.write("http://www.comicvine.com/" + str(comic['ComicName']).replace(" ", "-") + "/49-" + str(comicid))
|
||||
|
||||
logger.info(u"Updating complete for: " + ComicName)
|
||||
|
||||
if pullupd is None:
|
||||
|
|
|
@ -620,6 +620,7 @@ class WebInterface(object):
|
|||
"zero_level" : helpers.checked(mylar.ZERO_LEVEL),
|
||||
"zero_level_n" : mylar.ZERO_LEVEL_N,
|
||||
"add_to_csv" : helpers.checked(mylar.ADD_TO_CSV),
|
||||
"cvinfo" : helpers.checked(mylar.CVINFO),
|
||||
"lowercase_filenames" : helpers.checked(mylar.LOWERCASE_FILENAMES),
|
||||
"enable_extra_scripts" : helpers.checked(mylar.ENABLE_EXTRA_SCRIPTS),
|
||||
"extra_scripts" : mylar.EXTRA_SCRIPTS,
|
||||
|
@ -718,7 +719,7 @@ class WebInterface(object):
|
|||
sab_host=None, sab_username=None, sab_apikey=None, sab_password=None, sab_category=None, sab_priority=None, log_dir=None, blackhole=0, blackhole_dir=None,
|
||||
usenet_retention=None, nzbsu=0, nzbsu_apikey=None, dognzb=0, dognzb_apikey=None, nzbx=0, newznab=0, newznab_host=None, newznab_apikey=None, newznab_enabled=0,
|
||||
raw=0, raw_provider=None, raw_username=None, raw_password=None, raw_groups=None, experimental=0,
|
||||
preferred_quality=0, move_files=0, rename_files=0, add_to_csv=1, lowercase_filenames=0, folder_format=None, file_format=None, enable_extra_scripts=0, extra_scripts=None, enable_pre_scripts=0, pre_scripts=None,
|
||||
preferred_quality=0, move_files=0, rename_files=0, add_to_csv=1, cvinfo=0, lowercase_filenames=0, folder_format=None, file_format=None, enable_extra_scripts=0, extra_scripts=None, enable_pre_scripts=0, pre_scripts=None,
|
||||
destination_dir=None, replace_spaces=0, replace_char=None, use_minsize=0, minsize=None, use_maxsize=0, maxsize=None, autowant_all=0, autowant_upcoming=0, comic_cover_local=0, zero_level=0, zero_level_n=None, interface=None, **kwargs):
|
||||
mylar.HTTP_HOST = http_host
|
||||
mylar.HTTP_PORT = http_port
|
||||
|
@ -762,6 +763,7 @@ class WebInterface(object):
|
|||
mylar.ZERO_LEVEL = zero_level
|
||||
mylar.ZERO_LEVEL_N = zero_level_n
|
||||
mylar.ADD_TO_CSV = add_to_csv
|
||||
mylar.CVINFO = cvinfo
|
||||
mylar.LOWERCASE_FILENAMES = lowercase_filenames
|
||||
mylar.USE_MINSIZE = use_minsize
|
||||
mylar.MINSIZE = minsize
|
||||
|
|
Loading…
Reference in a new issue