mirror of
https://github.com/evilhero/mylar
synced 2024-12-24 08:42:37 +00:00
FIX:(#1559) Added option to config.ini(cmtag_volume) for enabling/disabling volume tag when metatagging with CT. By default, it is set to enable
This commit is contained in:
parent
b0458c6e09
commit
c24e5db131
2 changed files with 15 additions and 8 deletions
|
@ -350,6 +350,7 @@ CT_TAG_CBL = 1
|
|||
CT_CBZ_OVERWRITE = 0
|
||||
UNRAR_CMD = None
|
||||
CT_SETTINGSPATH = None
|
||||
CMTAG_VOLUME = 1
|
||||
CMTAG_START_YEAR_AS_VOLUME = False
|
||||
|
||||
UPCOMING_SNATCHED = 1
|
||||
|
@ -491,7 +492,7 @@ def initialize():
|
|||
ENABLE_TORZNAB, TORZNAB_NAME, TORZNAB_HOST, TORZNAB_APIKEY, TORZNAB_CATEGORY, TORZNAB_VERIFY, EXPERIMENTAL, ALTEXPERIMENTAL, \
|
||||
USE_RTORRENT, RTORRENT_HOST, RTORRENT_AUTHENTICATION, RTORRENT_RPC_URL, RTORRENT_SSL, RTORRENT_VERIFY, RTORRENT_CA_BUNDLE, RTORRENT_USERNAME, RTORRENT_PASSWORD, RTORRENT_STARTONLOAD, RTORRENT_LABEL, RTORRENT_DIRECTORY, \
|
||||
USE_UTORRENT, UTORRENT_HOST, UTORRENT_USERNAME, UTORRENT_PASSWORD, UTORRENT_LABEL, USE_TRANSMISSION, TRANSMISSION_HOST, TRANSMISSION_USERNAME, TRANSMISSION_PASSWORD, TRANSMISSION_DIRECTORY, USE_DELUGE, DELUGE_HOST, DELUGE_USERNAME, DELUGE_PASSWORD, DELUGE_LABEL, \
|
||||
ENABLE_META, CMTAGGER_PATH, CBR2CBZ_ONLY, CT_TAG_CR, CT_TAG_CBL, CT_CBZ_OVERWRITE, UNRAR_CMD, CT_SETTINGSPATH, CMTAG_START_YEAR_AS_VOLUME, UPDATE_ENDED, INDIE_PUB, BIGGIE_PUB, IGNORE_HAVETOTAL, SNATCHED_HAVETOTAL, PROVIDER_ORDER, TMP_PROV, \
|
||||
ENABLE_META, CMTAGGER_PATH, CBR2CBZ_ONLY, CT_TAG_CR, CT_TAG_CBL, CT_CBZ_OVERWRITE, UNRAR_CMD, CT_SETTINGSPATH, CMTAG_VOLUME, CMTAG_START_YEAR_AS_VOLUME, UPDATE_ENDED, INDIE_PUB, BIGGIE_PUB, IGNORE_HAVETOTAL, SNATCHED_HAVETOTAL, PROVIDER_ORDER, TMP_PROV, \
|
||||
dbUpdateScheduler, searchScheduler, RSSScheduler, WeeklyScheduler, VersionScheduler, FolderMonitorScheduler, \
|
||||
ALLOW_PACKS, ENABLE_TORRENTS, TORRENT_DOWNLOADER, MINSEEDS, USE_WATCHDIR, 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_TPSE, TPSE_PROXY, TPSE_VERIFY, ENABLE_32P, SEARCH_32P, MODE_32P, KEYS_32P, RSSFEED_32P, USERNAME_32P, PASSWORD_32P, AUTHKEY_32P, PASSKEY_32P, FEEDINFO_32P, VERIFY_32P, SNATCHEDTORRENT_NOTIFY, \
|
||||
|
@ -718,6 +719,7 @@ def initialize():
|
|||
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))
|
||||
UNRAR_CMD = check_setting_str(CFG, 'General', 'unrar_cmd', '')
|
||||
CMTAG_VOLUME = bool(check_setting_int(CFG, 'General', 'cmtag_volume', 1))
|
||||
CMTAG_START_YEAR_AS_VOLUME = bool(check_setting_int(CFG, 'General', 'cmtag_start_year_as_volume', 0))
|
||||
|
||||
UPCOMING_SNATCHED = bool(check_setting_int(CFG, 'General', 'upcoming_snatched', 1))
|
||||
|
@ -1494,6 +1496,7 @@ def config_write():
|
|||
new_config['General']['ct_tag_cbl'] = int(CT_TAG_CBL)
|
||||
new_config['General']['ct_cbz_overwrite'] = int(CT_CBZ_OVERWRITE)
|
||||
new_config['General']['unrar_cmd'] = UNRAR_CMD
|
||||
new_config['General']['cmtag_volume'] = int(CMTAG_VOLUME)
|
||||
new_config['General']['cmtag_start_year_as_volume'] = int(CMTAG_START_YEAR_AS_VOLUME)
|
||||
new_config['General']['update_ended'] = int(UPDATE_ENDED)
|
||||
new_config['General']['indie_pub'] = INDIE_PUB
|
||||
|
|
|
@ -78,15 +78,19 @@ def run(dirName, nzbName=None, issueid=None, comversion=None, manual=None, filen
|
|||
else:
|
||||
cbr2cbzoptions = ["-e"]
|
||||
|
||||
if mylar.CMTAG_START_YEAR_AS_VOLUME:
|
||||
comversion = 'V' + str(comversion)
|
||||
tagoptions = ["-s"]
|
||||
if mylar.CMTAG_VOLUME:
|
||||
if mylar.CMTAG_START_YEAR_AS_VOLUME:
|
||||
comversion = 'V' + str(comversion)
|
||||
else:
|
||||
if any([comversion is None, comversion == '', comversion == 'None']):
|
||||
comversion = '1'
|
||||
comversion = re.sub('[^0-9]', '', comversion).strip()
|
||||
cvers = 'volume=' + str(comversion)
|
||||
else:
|
||||
if any([comversion is None, comversion == '', comversion == 'None']):
|
||||
comversion = '1'
|
||||
comversion = re.sub('[^0-9]', '', comversion).strip()
|
||||
cvers = "volume="
|
||||
|
||||
cvers = 'volume=' + str(comversion)
|
||||
tagoptions = ["-s", "-m", cvers] #"--verbose"
|
||||
tagoptions.extend(["-m", cvers])
|
||||
|
||||
try:
|
||||
ctversion = subprocess.check_output([sys.executable, comictagger_cmd, "--version"], stderr=subprocess.STDOUT)
|
||||
|
|
Loading…
Reference in a new issue