mirror of
https://github.com/evilhero/mylar
synced 2025-03-09 13:24:53 +00:00
FIX: When configparser not installed, will now log error message at a WARNING log level - as well as being more verbose on the failure when first attempting to use ComicTagger, FIX: Changed default highlighted year in search results from 2014 to 2016, IMP: Added option for cbr-to-cbz conversion only (under Configuration/Post-Processing/MetaTagging), where will convert files to cbz without any metatagging
This commit is contained in:
parent
81f8a4b76d
commit
a412e672af
5 changed files with 53 additions and 36 deletions
|
@ -799,18 +799,23 @@
|
|||
</div>
|
||||
--->
|
||||
<div class="row checkbox left clearfix">
|
||||
<input type="checkbox" name="ct_tag_cr" value="1" ${config['ct_tag_cr']} /><label>Write ComicRack (cr) tags (ComicInfo.xml)</label>
|
||||
</div>
|
||||
<div class="row checkbox left clearfix">
|
||||
<input type="checkbox" name="ct_tag_cbl" value="1" ${config['ct_tag_cbl']} /><label>Write ComicBookLover (Cbl) tags (zip comment)</label>
|
||||
</div>
|
||||
<div class="row checkbox left clearfix">
|
||||
<input type="checkbox" name="ct_cbz_overwrite" value="1" ${config['ct_cbz_overwrite']} /><label>Overwrite existing cbz tags (if they exist)</label>
|
||||
<input id="cbr2cbz" type="checkbox" name="cbr2cbz_only" value="1" ${config['cbr2cbz_only']} /><label>Convert CBR to CBZ ONLY</label>
|
||||
</div>
|
||||
<div id="metataggingoptions">
|
||||
<div class="row checkbox left clearfix">
|
||||
<input type="checkbox" name="ct_tag_cr" value="1" ${config['ct_tag_cr']} /><label>Write ComicRack (cr) tags (ComicInfo.xml)</label>
|
||||
</div>
|
||||
<div class="row checkbox left clearfix">
|
||||
<input type="checkbox" name="ct_tag_cbl" value="1" ${config['ct_tag_cbl']} /><label>Write ComicBookLover (Cbl) tags (zip comment)</label>
|
||||
</div>
|
||||
<div class="row checkbox left clearfix">
|
||||
<input type="checkbox" name="ct_cbz_overwrite" value="1" ${config['ct_cbz_overwrite']} /><label>Overwrite existing cbz tags (if they exist)</label>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<small><center>If ComicVine API Key specified, will use with ComicTagger</center></small>
|
||||
<small><center>Writing each type of metadata will increase API count respectively</center></small>
|
||||
<div>
|
||||
<small><center>If ComicVine API Key specified, will use with ComicTagger</center></small>
|
||||
<small><center>Writing each type of metadata will increase API count respectively</center></small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -1087,26 +1092,6 @@
|
|||
|
||||
<%def name="javascriptIncludes()">
|
||||
<script>
|
||||
|
||||
hideServerDivs = function () {
|
||||
$("#customoptions").slideUp();
|
||||
$("#hpserveroptions").slideUp();
|
||||
};
|
||||
|
||||
handleNewSelection = function () {
|
||||
|
||||
hideServerDivs();
|
||||
|
||||
switch ($(this).val()) {
|
||||
case 'custom':
|
||||
$("#customoptions").slideDown();
|
||||
break;
|
||||
case 'mylar':
|
||||
$("#hpserveroptions").slideDown();
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
function initThisPage()
|
||||
|
||||
{
|
||||
|
@ -1131,6 +1116,26 @@
|
|||
}
|
||||
});
|
||||
|
||||
if ($("#cbr2cbz").is(":checked"))
|
||||
{
|
||||
$("#metataggingoptions").hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#metataggingoptions").show();
|
||||
}
|
||||
|
||||
$("#cbr2cbz").click(function(){
|
||||
if ($("#cbr2cbz").is(":checked"))
|
||||
{
|
||||
$("#metataggingoptions").slideUp();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#metataggingoptions").slideDown();
|
||||
}
|
||||
});
|
||||
|
||||
if ($("#prowl").is(":checked"))
|
||||
{
|
||||
$("#prowloptions").show();
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
%if searchresults:
|
||||
%for result in searchresults:
|
||||
<%
|
||||
if result['comicyear'] == '2014':
|
||||
if result['comicyear'] == '2016':
|
||||
grade = 'A'
|
||||
else:
|
||||
grade = 'Z'
|
||||
|
|
|
@ -316,6 +316,7 @@ BIGGIE_PUB = 55
|
|||
|
||||
ENABLE_META = 0
|
||||
CMTAGGER_PATH = None
|
||||
CBR2CBZ_ONLY = 0
|
||||
CT_TAG_CR = 1
|
||||
CT_TAG_CBL = 1
|
||||
CT_CBZ_OVERWRITE = 0
|
||||
|
@ -420,7 +421,7 @@ def initialize():
|
|||
NEWZNAB, NEWZNAB_NAME, NEWZNAB_HOST, NEWZNAB_APIKEY, NEWZNAB_UID, NEWZNAB_ENABLED, EXTRA_NEWZNABS, NEWZNAB_EXTRA, \
|
||||
ENABLE_TORZNAB, TORZNAB_NAME, TORZNAB_HOST, TORZNAB_APIKEY, TORZNAB_CATEGORY, \
|
||||
EXPERIMENTAL, ALTEXPERIMENTAL, \
|
||||
ENABLE_META, CMTAGGER_PATH, CT_TAG_CR, CT_TAG_CBL, CT_CBZ_OVERWRITE, UNRAR_CMD, CT_SETTINGSPATH, UPDATE_ENDED, INDIE_PUB, BIGGIE_PUB, IGNORE_HAVETOTAL, SNATCHED_HAVETOTAL, PROVIDER_ORDER, \
|
||||
ENABLE_META, CMTAGGER_PATH, CBR2CBZ_ONLY, CT_TAG_CR, CT_TAG_CBL, CT_CBZ_OVERWRITE, UNRAR_CMD, CT_SETTINGSPATH, UPDATE_ENDED, INDIE_PUB, BIGGIE_PUB, IGNORE_HAVETOTAL, SNATCHED_HAVETOTAL, PROVIDER_ORDER, \
|
||||
dbUpdateScheduler, searchScheduler, RSSScheduler, WeeklyScheduler, VersionScheduler, FolderMonitorScheduler, \
|
||||
ENABLE_TORRENTS, MINSEEDS, TORRENT_LOCAL, LOCAL_WATCHDIR, TORRENT_SEEDBOX, SEEDBOX_HOST, SEEDBOX_PORT, SEEDBOX_USER, SEEDBOX_PASS, SEEDBOX_WATCHDIR, \
|
||||
ENABLE_RSS, RSS_CHECKINTERVAL, RSS_LASTRUN, FAILED_DOWNLOAD_HANDLING, FAILED_AUTO, ENABLE_TORRENT_SEARCH, ENABLE_KAT, KAT_PROXY, ENABLE_32P, MODE_32P, KEYS_32P, RSSFEED_32P, USERNAME_32P, PASSWORD_32P, AUTHKEY_32P, PASSKEY_32P, FEEDINFO_32P, VERIFY_32P, SNATCHEDTORRENT_NOTIFY, \
|
||||
|
@ -614,6 +615,7 @@ def initialize():
|
|||
POST_PROCESSING_SCRIPT = check_setting_str(CFG, 'General', 'post_processing_script', '')
|
||||
FILE_OPTS = check_setting_str(CFG, 'General', 'file_opts', 'move')
|
||||
ENABLE_META = bool(check_setting_int(CFG, 'General', 'enable_meta', 0))
|
||||
CBR2CBZ_ONLY = bool(check_setting_int(CFG, 'General', 'cbr2cbz_only', 0))
|
||||
CT_TAG_CR = bool(check_setting_int(CFG, 'General', 'ct_tag_cr', 1))
|
||||
CT_TAG_CBL = bool(check_setting_int(CFG, 'General', 'ct_tag_cbl', 1))
|
||||
CT_CBZ_OVERWRITE = bool(check_setting_int(CFG, 'General', 'ct_cbz_overwrite', 0))
|
||||
|
@ -1303,6 +1305,7 @@ def config_write():
|
|||
new_config['General']['newcom_dir'] = NEWCOM_DIR
|
||||
new_config['General']['fftonewcom_dir'] = int(FFTONEWCOM_DIR)
|
||||
new_config['General']['enable_meta'] = int(ENABLE_META)
|
||||
new_config['General']['cbr2cbz_only'] = int(CBR2CBZ_ONLY)
|
||||
new_config['General']['ct_tag_cr'] = int(CT_TAG_CR)
|
||||
new_config['General']['ct_tag_cbl'] = int(CT_TAG_CBL)
|
||||
new_config['General']['ct_cbz_overwrite'] = int(CT_CBZ_OVERWRITE)
|
||||
|
|
|
@ -75,8 +75,8 @@ def run(dirName, nzbName=None, issueid=None, comversion=None, manual=None, filen
|
|||
try:
|
||||
import configparser
|
||||
except ImportError:
|
||||
logger.fdebug(module + ' configparser not found on system. Please install manually in order to write metadata')
|
||||
logger.fdebug(module + ' continuing with PostProcessing, but I am not using metadata.')
|
||||
logger.warn(module + ' configparser not found on system. Please install manually in order to write metadata')
|
||||
logger.warn(module + ' continuing with PostProcessing, but I am not using metadata.')
|
||||
return "fail"
|
||||
|
||||
|
||||
|
@ -140,7 +140,12 @@ def run(dirName, nzbName=None, issueid=None, comversion=None, manual=None, filen
|
|||
cvers = 'volume=' + str(comversion)
|
||||
tagoptions = ["-s", "-m", cvers] #"--verbose"
|
||||
|
||||
ctversion = subprocess.check_output([sys.executable, comictagger_cmd, "--version"])
|
||||
try:
|
||||
ctversion = subprocess.check_output([sys.executable, comictagger_cmd, "--version"], stderr=subprocess.STDOUT)
|
||||
except subprocess.CalledProcessError as e:
|
||||
logger.warn(module + '[WARNING] "command '{}' return with error (code {}): {}".format(e.cmd, e.returncode, e.output))
|
||||
logger.warn(module + '[WARNING] Make sure that you have configparser installed.')
|
||||
return "fail"
|
||||
|
||||
ctend = ctversion.find(':')
|
||||
ctcheck = re.sub("[^0-9]", "", ctversion[:ctend])
|
||||
|
@ -258,5 +263,7 @@ def run(dirName, nzbName=None, issueid=None, comversion=None, manual=None, filen
|
|||
logger.warn(module + '[COMIC-TAGGER] Unable to run comictagger with the options provided: ' + str(script_cmd))
|
||||
return "fail"
|
||||
|
||||
if mylar.CBR2CBZ_ONLY and initial_ctrun == False:
|
||||
break
|
||||
|
||||
return filepath
|
||||
|
|
|
@ -3481,6 +3481,7 @@ class WebInterface(object):
|
|||
"post_processing": helpers.checked(mylar.POST_PROCESSING),
|
||||
"file_opts": mylar.FILE_OPTS,
|
||||
"enable_meta": helpers.checked(mylar.ENABLE_META),
|
||||
"cbr2cbz_only": helpers.checked(mylar.CBR2CBZ_ONLY),
|
||||
"cmtagger_path": mylar.CMTAGGER_PATH,
|
||||
"ct_tag_cr": helpers.checked(mylar.CT_TAG_CR),
|
||||
"ct_tag_cbl": helpers.checked(mylar.CT_TAG_CBL),
|
||||
|
@ -3698,7 +3699,7 @@ class WebInterface(object):
|
|||
nzbget_host=None, nzbget_port=None, nzbget_username=None, nzbget_password=None, nzbget_category=None, nzbget_priority=None, nzbget_directory=None,
|
||||
usenet_retention=None, nzbsu=0, nzbsu_uid=None, nzbsu_apikey=None, dognzb=0, dognzb_apikey=None, omgwtfnzbs=0, omgwtfnzbs_username=None, omgwtfnzbs_apikey=None, newznab=0, newznab_host=None, newznab_name=None, newznab_apikey=None, newznab_uid=None, newznab_enabled=0,
|
||||
enable_torznab=0, torznab_name=None, torznab_host=None, torznab_apikey=None, torznab_category=None, experimental=0, check_folder=None, enable_check_folder=0,
|
||||
enable_meta=0, cmtagger_path=None, ct_tag_cr=0, ct_tag_cbl=0, ct_cbz_overwrite=0, unrar_cmd=None, enable_rss=0, rss_checkinterval=None, failed_download_handling=0, failed_auto=0, enable_torrent_search=0, enable_kat=0, enable_32p=0, mode_32p=0, rssfeed_32p=None, passkey_32p=None, username_32p=None, password_32p=None, snatchedtorrent_notify=0,
|
||||
enable_meta=0, cbr2cbz_only=0, cmtagger_path=None, ct_tag_cr=0, ct_tag_cbl=0, ct_cbz_overwrite=0, unrar_cmd=None, enable_rss=0, rss_checkinterval=None, failed_download_handling=0, failed_auto=0, enable_torrent_search=0, enable_kat=0, enable_32p=0, mode_32p=0, rssfeed_32p=None, passkey_32p=None, username_32p=None, password_32p=None, snatchedtorrent_notify=0,
|
||||
enable_torrents=0, minseeds=0, torrent_local=0, local_watchdir=None, torrent_seedbox=0, seedbox_watchdir=None, seedbox_user=None, seedbox_pass=None, seedbox_host=None, seedbox_port=None,
|
||||
prowl_enabled=0, prowl_onsnatch=0, prowl_keys=None, prowl_priority=None, nma_enabled=0, nma_apikey=None, nma_priority=0, nma_onsnatch=0, pushover_enabled=0, pushover_onsnatch=0, pushover_apikey=None, pushover_userkey=None, pushover_priority=None, boxcar_enabled=0, boxcar_onsnatch=0, boxcar_token=None,
|
||||
pushbullet_enabled=0, pushbullet_apikey=None, pushbullet_deviceid=None, pushbullet_onsnatch=0,
|
||||
|
@ -3838,6 +3839,7 @@ class WebInterface(object):
|
|||
mylar.FILE_OPTS = file_opts
|
||||
mylar.PRE_SCRIPTS = pre_scripts
|
||||
mylar.ENABLE_META = enable_meta
|
||||
mylar.CBR2CBZ_ONLY = cbr2cbz_only
|
||||
mylar.CMTAGGER_PATH = cmtagger_path
|
||||
mylar.CT_TAG_CR = ct_tag_cr
|
||||
mylar.CT_TAG_CBL = ct_tag_cbl
|
||||
|
|
Loading…
Add table
Reference in a new issue