mirror of https://github.com/evilhero/mylar
IMP: Added 'Force to TPB/GN' option for printed editions and 'Force to Print' option for TPB/GN's (this WILL impact how files are scanned in - so make sure you have files named appropriately), IMP: Added One-Shot as a Type, FIX: Fixed incorrect variable reference to seriesvolume during post-processing of TPB series, FIX: Fixed refresh to fire off every 5 minutes, FIX: When post-processing and metatagging a cbz file with rename files not enabled, would indicate the new filename as being a copy of the existing file (ie. (1).cbz) which would carry over to a final filename, IMP: Allow Mylar to populate the alias list on add/refresh of a series if the aliases don't already exist in the Alternate Series field for the series, FIX: Fixed a problem with single quotes in series titles when using experimental search,
IMP: When searching for a one-off series, will accept either issues with an issue number or those with no issue numbers as acceptable search results when searching, IMP: Updated search code to utilize the existing filename parser within Mylar when parsing the search results for more consistency
This commit is contained in:
parent
b89ec1ad2c
commit
0c9ed00a13
|
@ -214,13 +214,19 @@
|
|||
<br/>
|
||||
<div class="row checkbox right clearfix">
|
||||
<label>Forcibly Mark as Continuing</label>
|
||||
<input type="checkbox" style="vertical-align: bottom; margin: 3px; margin-top: -3px;" name="force_continuing" value="2" ${comicConfig['force_continuing']} />
|
||||
<input type="checkbox" style="vertical-align: bottom; margin: 3px; margin-top: -3px;" name="force_continuing" value="1" ${comicConfig['force_continuing']} />
|
||||
<a href="#" title="Will forcibly mark this series as 'Continuing' regardless of actual status"><img src="interfaces/default/images/info32.png" height="16" alt="" /></a>
|
||||
</div>
|
||||
<div class="row checkbox right clearfix">
|
||||
<label>Forcibly Mark series as TPB/GN</label>
|
||||
<input type="checkbox" style="vertical-align: bottom; margin: 3px; margin-top: -3px;" name="force_type" value="2" ${comicConfig['force_type']} />
|
||||
<a href="#" title="Will forcibly mark this series as TPB/GN in those instances where it assumes it's a normal issue-based series"><img src="interfaces/default/images/info32.png" height="16" alt="" /></a>
|
||||
%if comic['Type'] != 'TPB':
|
||||
<label>Forcibly Mark series as TPB/GN</label>
|
||||
<input type="checkbox" style="vertical-align: bottom; margin: 3px; margin-top: -3px;" name="force_type" value="1" ${comicConfig['force_type']} />
|
||||
<a href="#" title="Will forcibly mark this series as TPB/GN in those instances where it assumes it's a normal issue-based series"><img src="interfaces/default/images/info32.png" height="16" alt="" /></a>
|
||||
%else:
|
||||
<label>Forcibly Mark series as Print</label>
|
||||
<input type="checkbox" style="vertical-align: bottom; margin: 3px; margin-top: -3px;" name="force_type" value="2" ${comicConfig['force_type']} />
|
||||
<a href="#" title="Will forcibly mark this series as an Issue-Based series in those instances where it assumes it's a TPB/GN series"><img src="interfaces/default/images/info32.png" height="16" alt="" /></a>
|
||||
%endif
|
||||
</div>
|
||||
%if any([comic['ComicYear'] == '2099',comic['ComicYear'] == '0000', comic['ComicYear'] == '', comic['Corrected_SeriesYear']]):
|
||||
<div class="row">
|
||||
|
@ -383,7 +389,7 @@
|
|||
<td id="options">
|
||||
<a href="#" title="Manual Search" onclick="doAjaxCall('queueit?ComicID=${issue['ComicID']}&IssueID=${issue['IssueID']}&ComicIssue=${issue['Issue_Number']}&ComicYear=${issue['IssueDate']}&mode=want&manualsearch=True',$(this),'table')" data-success="Manually searching for ${comic['ComicName']} #${issue['Issue_Number']}"><img src="interfaces/default/images/search.png" height="25" width="25" /></a>
|
||||
<!--
|
||||
<a class="menu_link_edit" id="choose_specific_download" title="Choose Specific Download" href="javascript:void(0)" onclick="getAvailableDownloads('${issue['IssueID']}')"><i class="fa fa-search"></i><img src="interfaces/default/images/magnifier.png" height="25" width="25" class="highqual" /></a>
|
||||
<a class="menu_link_edit" id="choose_specific_download" title="Choose Specific Download" href="javascript:void(0)" onclick="getAvailableDownloads('${issue['IssueID']}')" data-success="Successfully started search for ${comic['ComicName']} ${issue['Issue_Number']}"><i class="fa fa-search"></i><img src="interfaces/default/images/magnifier.png" height="25" width="25" class="highqual" /></a>
|
||||
<div id="choose_specific_download_dialog" title="Choose a specific download for this issue" style="display:none" class="configtable">
|
||||
<table class="display" id="downloads_table">
|
||||
<thead>
|
||||
|
@ -717,7 +723,6 @@
|
|||
url: "IssueInfo",
|
||||
data: { filelocation: filelink, comicname: comicname, issue: issue, date: date, title: title },
|
||||
success: function(response) {
|
||||
var names = response
|
||||
$('#responsethis').html(response);
|
||||
},
|
||||
error: function(data)
|
||||
|
@ -815,13 +820,15 @@
|
|||
|
||||
function getAvailableDownloads(issueid) {
|
||||
ShowSpinner();
|
||||
$('#ajaxMsg').html("<div class='msg'><span class='ui-icon ui-icon-check'></span>Now searching...</div>");
|
||||
$('#ajaxMsg').addClass('success').fadeIn().delay(3000).fadeOut();
|
||||
$.getJSON("choose_specific_download", {issueid: issueid}, function(data) {
|
||||
loader.remove();
|
||||
feedback.fadeOut();
|
||||
search_results = data
|
||||
search_results = data;
|
||||
for( var i = 0, len = data.length; i < len; i++ ) {
|
||||
$('#downloads_table_body').append('<tr><td id="title"><a href="javascript:void(0)" onclick="downloadSpecificRelease('+i+')">'+data[i].nzbtitle+'</a></td><td id="provider">'+data[i].provider+'</td><td id="size">'+data[i].size+'</td><td id="kind">'+data[i].kind+'</td></tr>');
|
||||
}
|
||||
$('#downloads_table_body').append('<tr><td id="title"><a href="javascript:void(0)" onclick="downloadSpecificRelease('+i+');">'+data[i].nzbtitle+'</a></td><td id="provider">'+data[i].provider+'</td><td id="size">'+data[i].size+'</td><td id="kind">'+data[i].kind+'</td></tr>');
|
||||
}
|
||||
$('#downloads_table').dataTable({
|
||||
"aoColumns": [
|
||||
null,
|
||||
|
@ -836,6 +843,7 @@
|
|||
"bDestroy": true
|
||||
});
|
||||
$("#choose_specific_download_dialog").dialog({
|
||||
modal: true,
|
||||
width: "60%",
|
||||
maxHeight: 500
|
||||
});
|
||||
|
@ -844,17 +852,24 @@
|
|||
}
|
||||
|
||||
function downloadSpecificRelease(i){
|
||||
|
||||
name = search_results[i].nzbtitle
|
||||
prov = search_results[i].tmpprov
|
||||
nzbid = search_results[i].nzbid
|
||||
name = search_results[i].nzbtitle;
|
||||
prov = search_results[i].tmpprov;
|
||||
nzbid = search_results[i].nzbid;
|
||||
ShowSpinner();
|
||||
$.getJSON("download_specific_release", {nzbid: nzbid, provider: prov, name: name}, function(data) {
|
||||
loader.remove();
|
||||
feedback.fadeOut();
|
||||
refreshSubmenu();
|
||||
$("#choose_specific_download_dialog").dialog("close");
|
||||
});
|
||||
$.get("download_specific_release",
|
||||
{ nzbid: nzbid, provider: prov, name: name },
|
||||
function(data) {
|
||||
if (data.error != undefined) {
|
||||
alert(data.error);
|
||||
return;
|
||||
}
|
||||
$('#ajaxMsg').html("<div class='msg'><span class='ui-icon ui-icon-check'></span>Successfully downloaded "+name+"</div>");
|
||||
if ( data.indexOf("success") > -1){
|
||||
$("#choose_specific_download_dialog").dialog.close();
|
||||
}
|
||||
$('#ajaxMsg').addClass('success').fadeIn().delay(3000).fadeOut();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
function ShowSpinner() {
|
||||
|
|
|
@ -763,8 +763,13 @@
|
|||
<small class="heading"><span style="float: left; margin-right: .3em; margin-top: 4px;" class="ui-icon ui-icon-info"></span>Note: this is an experimental search - results may be better/worse.</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
<!--
|
||||
<fieldset>
|
||||
<div class="row checkbox left clearfix">
|
||||
<input type="checkbox" id="enable_ddl" name="enable_ddl" value=1 ${config['enable_ddl']} /><legend>Enable DDL (GetComics)</legend>
|
||||
</div>
|
||||
</fieldset>
|
||||
-->
|
||||
<fieldset>
|
||||
<div class="row checkbox left clearfix">
|
||||
<input id="enable_torrent_search" type="checkbox" onclick="initConfigCheckbox($(this));" name="enable_torrent_search" value=1 ${config['enable_torrent_search']} /><legend>Torrents</legned>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
|
||||
comictype = comic['Type']
|
||||
try:
|
||||
if any([comictype == 'None', comictype is None, comictype == 'Print']) and comic['Corrected_Type'] != 'TPB':
|
||||
if (any([comictype == 'None', comictype is None, comictype == 'Print']) and comic['Corrected_Type'] != 'TPB') or all([comic['Corrected_Type'] is not None, comic['Corrected_Type'] == 'Print']):
|
||||
comictype = None
|
||||
else:
|
||||
if comic['Corrected_Type'] is not None:
|
||||
|
|
|
@ -481,7 +481,7 @@ class PostProcessor(object):
|
|||
wv_comicpublisher = wv['ComicPublisher']
|
||||
wv_alternatesearch = wv['AlternateSearch']
|
||||
wv_comicid = wv['ComicID']
|
||||
if all([wv['Type'] != 'Print', wv['Type'] != 'Digital']) or wv['Corrected_Type'] == 'TPB':
|
||||
if (all([wv['Type'] != 'Print', wv['Type'] != 'Digital']) and wv['Corrected_Type'] != 'Print') or wv['Corrected_Type'] == 'TPB':
|
||||
wv_type = 'TPB'
|
||||
else:
|
||||
wv_type = None
|
||||
|
@ -554,15 +554,18 @@ class PostProcessor(object):
|
|||
continue
|
||||
else:
|
||||
if cs['WatchValues']['Type'] == 'TPB' and cs['WatchValues']['Total'] > 1:
|
||||
just_the_digits = re.sub('[^0-9]', '', watchmatch['seriesvolume']).strip()
|
||||
just_the_digits = re.sub('[^0-9]', '', watchmatch['series_volume']).strip()
|
||||
else:
|
||||
just_the_digits = watchmatch['justthedigits']
|
||||
temploc= just_the_digits.replace('_', ' ')
|
||||
temploc = re.sub('[\#\']', '', temploc)
|
||||
logger.fdebug('temploc: %s' % temploc)
|
||||
if just_the_digits is not None:
|
||||
temploc= just_the_digits.replace('_', ' ')
|
||||
temploc = re.sub('[\#\']', '', temploc)
|
||||
logger.fdebug('temploc: %s' % temploc)
|
||||
else:
|
||||
temploc = None
|
||||
datematch = "False"
|
||||
|
||||
if any(['annual' in temploc.lower(), 'special' in temploc.lower()]) and mylar.CONFIG.ANNUALS_ON is True:
|
||||
if temploc is not None and (any(['annual' in temploc.lower(), 'special' in temploc.lower()]) and mylar.CONFIG.ANNUALS_ON is True):
|
||||
biannchk = re.sub('-', '', temploc.lower()).strip()
|
||||
if 'biannual' in biannchk:
|
||||
logger.fdebug(module + ' Bi-Annual detected.')
|
||||
|
@ -577,8 +580,11 @@ class PostProcessor(object):
|
|||
issuechk = myDB.select("SELECT * from annuals WHERE ComicID=? AND Int_IssueNumber=?", [cs['ComicID'], fcdigit])
|
||||
else:
|
||||
annchk = "no"
|
||||
fcdigit = helpers.issuedigits(temploc)
|
||||
issuechk = myDB.select("SELECT * from issues WHERE ComicID=? AND Int_IssueNumber=?", [cs['ComicID'], fcdigit])
|
||||
if temploc is not None:
|
||||
fcdigit = helpers.issuedigits(temploc)
|
||||
issuechk = myDB.select("SELECT * from issues WHERE ComicID=? AND Int_IssueNumber=?", [cs['ComicID'], fcdigit])
|
||||
else:
|
||||
issuechk = myDB.select("SELECT * from issues WHERE ComicID=?", [cs['ComicID']])
|
||||
|
||||
if not issuechk:
|
||||
logger.fdebug('%s No corresponding issue #%s found for %s' % (module, temploc, cs['ComicID']))
|
||||
|
|
|
@ -344,7 +344,8 @@ def start():
|
|||
|
||||
# Start our scheduled background tasks
|
||||
if UPDATER_STATUS != 'Paused':
|
||||
SCHED.add_job(func=updater.dbUpdate, id='dbupdater', name='DB Updater', args=[None,None,True], trigger=IntervalTrigger(hours=5, minutes=5, timezone='UTC'))
|
||||
SCHED.add_job(func=updater.dbUpdate, id='dbupdater', name='DB Updater', args=[None,None,True], trigger=IntervalTrigger(hours=0, minutes=5, timezone='UTC'))
|
||||
logger.info('DB Updater sccheduled to fire every 5 minutes')
|
||||
|
||||
#let's do a run at the Wanted issues here (on startup) if enabled.
|
||||
if SEARCH_STATUS != 'Paused':
|
||||
|
|
|
@ -216,6 +216,15 @@ def run(dirName, nzbName=None, issueid=None, comversion=None, manual=None, filen
|
|||
tmpfilename = re.sub('\(Original deleted\)', '', tmpfilename).strip()
|
||||
tmpf = tmpfilename.decode('utf-8')
|
||||
filepath = os.path.join(comicpath, tmpf)
|
||||
if filename.lower() != tmpf.lower() and tmpf.endswith('(1).cbz'):
|
||||
logger.fdebug('New filename [%s] is named incorrectly due to duplication during metatagging - Making sure it\'s named correctly [%s].' % (tmpf, filename))
|
||||
tmpfilename = filename
|
||||
filepath_new = os.path.join(comicpath, tmpfilename)
|
||||
try:
|
||||
os.rename(filepath, filepath_new)
|
||||
filepath = filepath_new
|
||||
except:
|
||||
logger.warn('%s unable to rename file to accomodate metatagging cbz to the same filename' % module)
|
||||
if not os.path.isfile(filepath):
|
||||
logger.fdebug(module + 'Trying utf-8 conversion.')
|
||||
tmpf = tmpfilename.encode('utf-8')
|
||||
|
|
|
@ -280,6 +280,10 @@ _CONFIG_DEFINITIONS = OrderedDict({
|
|||
'ENABLE_PUBLIC': (bool, 'Torrents', False),
|
||||
'PUBLIC_VERIFY': (bool, 'Torrents', True),
|
||||
|
||||
'ENABLE_DDL': (bool, 'DDL', False),
|
||||
'ALLOW_PACKS': (bool, 'DDL', False),
|
||||
'DDL_LOCATION': (str, 'DDL', None),
|
||||
|
||||
'AUTO_SNATCH': (bool, 'AutoSnatch', False),
|
||||
'AUTO_SNATCH_SCRIPT': (str, 'AutoSnatch', None),
|
||||
'PP_SSHHOST': (str, 'AutoSnatch', None),
|
||||
|
@ -839,6 +843,9 @@ class Config(object):
|
|||
else:
|
||||
logger.fdebug('Successfully created ComicTagger Settings location.')
|
||||
|
||||
if self.DDL_LOCATION is None:
|
||||
self.DDL_LOCATION = self.CACHE_DIR
|
||||
|
||||
if self.MODE_32P is False and self.RSSFEED_32P is not None:
|
||||
mylar.KEYS_32P = self.parse_32pfeed(self.RSSFEED_32P)
|
||||
|
||||
|
@ -949,7 +956,11 @@ class Config(object):
|
|||
PR.append('Experimental')
|
||||
PR_NUM +=1
|
||||
|
||||
PPR = ['32p', 'public torrents', 'nzb.su', 'dognzb', 'Experimental']
|
||||
if self.ENABLE_DDL:
|
||||
PR.append('DDL')
|
||||
PR_NUM +=1
|
||||
|
||||
PPR = ['32p', 'public torrents', 'nzb.su', 'dognzb', 'Experimental', 'DDL']
|
||||
if self.NEWZNAB:
|
||||
for ens in self.EXTRA_NEWZNABS:
|
||||
if str(ens[5]) == '1': # if newznabs are enabled
|
||||
|
|
|
@ -318,7 +318,7 @@ def GetComicInfo(comicid, dom, safechk=None):
|
|||
#figure out if it's a print / digital edition.
|
||||
comic['Type'] = 'None'
|
||||
if comic_deck != 'None':
|
||||
if any(['print' in comic_deck.lower(), 'digital' in comic_deck.lower(), 'paperback' in comic_deck.lower(), 'hardcover' in comic_deck.lower()]):
|
||||
if any(['print' in comic_deck.lower(), 'digital' in comic_deck.lower(), 'paperback' in comic_deck.lower(), 'one shot' in re.sub('-', '', comic_deck.lower()).strip(), 'hardcover' in comic_deck.lower()]):
|
||||
if 'print' in comic_deck.lower():
|
||||
comic['Type'] = 'Print'
|
||||
elif 'digital' in comic_deck.lower():
|
||||
|
@ -327,6 +327,8 @@ def GetComicInfo(comicid, dom, safechk=None):
|
|||
comic['Type'] = 'TPB'
|
||||
elif 'hardcover' in comic_deck.lower():
|
||||
comic['Type'] = 'HC'
|
||||
elif 'oneshot' in re.sub('-', '', comic_deck.lower()).strip():
|
||||
comic['Type'] = 'One-Shot'
|
||||
|
||||
if comic_desc != 'None' and comic['Type'] == 'None':
|
||||
if 'print' in comic_desc[:60].lower() and 'print edition can be found' not in comic_desc.lower():
|
||||
|
@ -337,6 +339,8 @@ def GetComicInfo(comicid, dom, safechk=None):
|
|||
comic['Type'] = 'TPB'
|
||||
elif 'hardcover' in comic_desc[:60].lower() and 'hardcover can be found' not in comic_desc.lower():
|
||||
comic['Type'] = 'HC'
|
||||
elif any(['one-shot' in comic_desc[:60].lower(), 'one shot' in comic_desc[:60].lower()]) and 'can be found' not in comic_desc.lower():
|
||||
comic['Type'] = 'One-Shot'
|
||||
else:
|
||||
comic['Type'] = 'Print'
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ class FileHandlers(object):
|
|||
else:
|
||||
booktype = self.comic['Type']
|
||||
|
||||
if booktype == 'Print' or all([booktype != 'Print', mylar.CONFIG.FORMAT_BOOKTYPE is False]):
|
||||
if any([booktype is None, booktype == 'None', booktype == 'Print']) or all([booktype != 'Print', mylar.CONFIG.FORMAT_BOOKTYPE is False]):
|
||||
chunk_fb = re.sub('\$Type', '', mylar.CONFIG.FOLDER_FORMAT)
|
||||
chunk_b = re.compile(r'\s+')
|
||||
chunk_folder_format = chunk_b.sub(' ', chunk_fb)
|
||||
|
|
|
@ -32,10 +32,10 @@ def Startit(searchName, searchIssue, searchYear, ComicVersion, IssDateFix):
|
|||
searchName = searchName.replace(x, ' ', cnt)
|
||||
|
||||
searchName = re.sub('\s+', ' ', searchName)
|
||||
searchName = re.sub("[\,\:|'%20']", "", searchName).strip()
|
||||
logger.fdebug("searchname: %s" % searchName)
|
||||
logger.fdebug("issue: %s" % searchIssue)
|
||||
logger.fdebug("year: %s" % searchYear)
|
||||
searchName = re.sub("[\,\:]", "", searchName).strip()
|
||||
#logger.fdebug("searchname: %s" % searchName)
|
||||
#logger.fdebug("issue: %s" % searchIssue)
|
||||
#logger.fdebug("year: %s" % searchYear)
|
||||
encodeSearch = urllib.quote_plus(searchName)
|
||||
splitSearch = encodeSearch.split(" ")
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ def addComictoDB(comicid, mismatch=None, pullupd=None, imported=None, ogcname=No
|
|||
oldcomversion = None
|
||||
series_status = 'Loading'
|
||||
lastissueid = None
|
||||
aliases = None
|
||||
else:
|
||||
if chkwant is not None:
|
||||
logger.fdebug('ComicID: ' + str(comicid) + ' already exists. Not adding from the future pull list at this time.')
|
||||
|
@ -79,6 +80,8 @@ def addComictoDB(comicid, mismatch=None, pullupd=None, imported=None, ogcname=No
|
|||
newValueDict = {"Status": "Loading"}
|
||||
comlocation = dbcomic['ComicLocation']
|
||||
lastissueid = dbcomic['LatestIssueID']
|
||||
aliases = dbcomic['AlternateSearch']
|
||||
logger.info('aliases currently: %s' % aliases)
|
||||
|
||||
if not latestissueinfo:
|
||||
latestissueinfo = []
|
||||
|
@ -277,6 +280,20 @@ def addComictoDB(comicid, mismatch=None, pullupd=None, imported=None, ogcname=No
|
|||
else:
|
||||
issue_list = None
|
||||
|
||||
if comic['Aliases'] != 'None':
|
||||
if all([aliases is not None, aliases != 'None']):
|
||||
for x in aliases.split('##'):
|
||||
aliaschk = [x for y in comic['Aliases'].split('##') if y == x]
|
||||
if aliaschk and x not in aliases.split('##'):
|
||||
aliases += '##' + ''.join(x)
|
||||
else:
|
||||
if x not in aliases.split('##'):
|
||||
aliases += '##' + x
|
||||
else:
|
||||
aliases = comic['Aliases']
|
||||
else:
|
||||
aliases = aliases
|
||||
|
||||
controlValueDict = {"ComicID": comicid}
|
||||
newValueDict = {"ComicName": comic['ComicName'],
|
||||
"ComicSortName": sortname,
|
||||
|
@ -292,7 +309,7 @@ def addComictoDB(comicid, mismatch=None, pullupd=None, imported=None, ogcname=No
|
|||
"ComicPublisher": comic['ComicPublisher'],
|
||||
# "Description": Cdesc, #.dencode('utf-8', 'replace'),
|
||||
"DetailURL": comic['ComicURL'],
|
||||
# "AlternateSearch": comic['Aliases'],
|
||||
"AlternateSearch": aliases,
|
||||
# "ComicPublished": gcdinfo['resultPublished'],
|
||||
"ComicPublished": "Unknown",
|
||||
"Type": comic['Type'],
|
||||
|
|
|
@ -147,7 +147,7 @@ class NMA:
|
|||
if snatched_nzb:
|
||||
if snatched_nzb[-1] == '\.': snatched_nzb = snatched_nzb[:-1]
|
||||
event = snline
|
||||
description = "Mylar has snatched: " + snatched_nzb + " from " + prov + " and has sent it to " + sent_to
|
||||
description = "Mylar has snatched: " + snatched_nzb + " from " + prov + " and " + sent_to
|
||||
else:
|
||||
event = prline
|
||||
description = prline2
|
||||
|
@ -246,7 +246,7 @@ class PUSHOVER:
|
|||
if snatched_nzb:
|
||||
if snatched_nzb[-1] == '\.':
|
||||
snatched_nzb = snatched_nzb[:-1]
|
||||
message = "Mylar has snatched: " + snatched_nzb + " from " + prov + " and has sent it to " + sent_to
|
||||
message = "Mylar has snatched: " + snatched_nzb + " from " + prov + " and " + sent_to
|
||||
|
||||
data = {'token': mylar.CONFIG.PUSHOVER_APIKEY,
|
||||
'user': mylar.CONFIG.PUSHOVER_USERKEY,
|
||||
|
@ -359,7 +359,7 @@ class BOXCAR:
|
|||
# if no username was given then use the one from the config
|
||||
if snatched_nzb:
|
||||
title = snline
|
||||
message = "Mylar has snatched: " + snatched_nzb + " and has sent it to " + sent_to
|
||||
message = "Mylar has snatched: " + snatched_nzb + " and " + sent_to
|
||||
else:
|
||||
title = prline
|
||||
message = prline2
|
||||
|
@ -412,7 +412,7 @@ class PUSHBULLET:
|
|||
if snatched:
|
||||
if snatched[-1] == '.': snatched = snatched[:-1]
|
||||
event = snline
|
||||
message = "Mylar has snatched: " + snatched + " from " + prov + " and has sent it to " + sent_to
|
||||
message = "Mylar has snatched: " + snatched + " from " + prov + " and " + sent_to
|
||||
else:
|
||||
event = prline + ' complete!'
|
||||
message = prline2
|
||||
|
@ -489,7 +489,7 @@ class SLACK:
|
|||
module += '[NOTIFIER]'
|
||||
|
||||
if all([sent_to is not None, prov is not None]):
|
||||
attachment_text += ' from %s and sent to %s' % (prov, sent_to)
|
||||
attachment_text += ' from %s and %s' % (prov, sent_to)
|
||||
elif sent_to is None:
|
||||
attachment_text += ' from %s' % prov
|
||||
else:
|
||||
|
|
|
@ -1,4 +1,17 @@
|
|||
#!/usr/bin/python
|
||||
# This file is part of Mylar.
|
||||
#
|
||||
# Mylar is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Mylar is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Mylar. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import os, sys
|
||||
import re
|
||||
|
|
806
mylar/search.py
806
mylar/search.py
File diff suppressed because it is too large
Load Diff
|
@ -698,7 +698,7 @@ def nzblog(IssueID, NZBName, ComicName, SARC=None, IssueArcID=None, id=None, pro
|
|||
pass
|
||||
else:
|
||||
altnames = chkd['AltNZBName']
|
||||
if any([altnames is None, altnameas == '']):
|
||||
if any([altnames is None, altnames == '']):
|
||||
#we need to wipe the entry so we can re-update with the alt-nzbname if required
|
||||
myDB.action('DELETE FROM nzblog WHERE IssueID=? and Provider=?', [IssueID, prov])
|
||||
logger.fdebug('Deleted stale entry from nzblog for IssueID: ' + str(IssueID) + ' [' + prov + ']')
|
||||
|
@ -932,7 +932,7 @@ def forceRescan(ComicID, archive=None, module=None, recheck=False):
|
|||
else:
|
||||
altnames = ''
|
||||
|
||||
if all([rescan['Type'] != 'Print', rescan['Type'] != 'Digital']) or rescan['Corrected_Type'] == 'TPB':
|
||||
if (all([rescan['Type'] != 'Print', rescan['Type'] != 'Digital']) and rescan['Corrected_Type'] != 'Print') or rescan['Corrected_Type'] == 'TPB':
|
||||
booktype = 'TPB'
|
||||
else:
|
||||
booktype = None
|
||||
|
|
|
@ -189,6 +189,8 @@ class WebInterface(object):
|
|||
|
||||
if comic['Corrected_Type'] == 'TPB':
|
||||
force_type = 1
|
||||
elif comic['Corrected_Type'] == 'Print':
|
||||
force_type = 2
|
||||
else:
|
||||
force_type = 0
|
||||
|
||||
|
@ -1418,6 +1420,7 @@ class WebInterface(object):
|
|||
ComicVersion = cdname['ComicVersion']
|
||||
ComicName = cdname['ComicName']
|
||||
TorrentID_32p = cdname['TorrentID_32P']
|
||||
Type = cdname['Type']
|
||||
controlValueDict = {"IssueID": IssueID}
|
||||
newStatus = {"Status": "Wanted"}
|
||||
if mode == 'want':
|
||||
|
@ -1463,7 +1466,7 @@ class WebInterface(object):
|
|||
#Publisher = miy['ComicPublisher']
|
||||
#UseAFuzzy = miy['UseFuzzy']
|
||||
#ComicVersion = miy['ComicVersion']
|
||||
s = mylar.SEARCH_QUEUE.put({'issueid': IssueID, 'comicname': ComicName, 'seriesyear': SeriesYear, 'comicid': ComicID, 'issuenumber': ComicIssue})
|
||||
s = mylar.SEARCH_QUEUE.put({'issueid': IssueID, 'comicname': ComicName, 'seriesyear': SeriesYear, 'comicid': ComicID, 'issuenumber': ComicIssue, 'type': Type})
|
||||
# foundcom, prov = search.search_init(ComicName, ComicIssue, ComicYear, SeriesYear, Publisher, issues['IssueDate'], storedate, IssueID, AlternateSearch, UseAFuzzy, ComicVersion, mode=mode, ComicID=ComicID, manualsearch=manualsearch, filesafe=ComicName_Filesafe, allow_packs=AllowPacks, torrentid_32p=TorrentID_32p)
|
||||
# if foundcom['status'] is True:
|
||||
# # file check to see if issue exists and update 'have' count
|
||||
|
@ -4696,6 +4699,7 @@ class WebInterface(object):
|
|||
"extra_torznabs": sorted(mylar.CONFIG.EXTRA_TORZNABS, key=itemgetter(4), reverse=True),
|
||||
"newznab": helpers.checked(mylar.CONFIG.NEWZNAB),
|
||||
"extra_newznabs": sorted(mylar.CONFIG.EXTRA_NEWZNABS, key=itemgetter(5), reverse=True),
|
||||
"enable_ddl": helpers.checked(mylar.CONFIG.ENABLE_DDL),
|
||||
"enable_rss": helpers.checked(mylar.CONFIG.ENABLE_RSS),
|
||||
"rss_checkinterval": mylar.CONFIG.RSS_CHECKINTERVAL,
|
||||
"rss_last": rss_sclast,
|
||||
|
@ -4932,8 +4936,10 @@ class WebInterface(object):
|
|||
else:
|
||||
newValues['ForceContinuing'] = 1
|
||||
|
||||
if force_type is not None:
|
||||
if force_type == '1':
|
||||
newValues['Corrected_Type'] = 'TPB'
|
||||
elif force_type == '2':
|
||||
newValues['Corrected_Type'] = 'Print'
|
||||
else:
|
||||
newValues['Corrected_Type'] = None
|
||||
|
||||
|
@ -5051,7 +5057,7 @@ class WebInterface(object):
|
|||
'lowercase_filenames', 'autowant_upcoming', 'autowant_all', 'comic_cover_local', 'alternate_latest_series_covers', 'cvinfo', 'snatchedtorrent_notify',
|
||||
'prowl_enabled', 'prowl_onsnatch', 'nma_enabled', 'nma_onsnatch', 'pushover_enabled', 'pushover_onsnatch', 'boxcar_enabled',
|
||||
'boxcar_onsnatch', 'pushbullet_enabled', 'pushbullet_onsnatch', 'telegram_enabled', 'telegram_onsnatch', 'slack_enabled', 'slack_onsnatch',
|
||||
'opds_enable', 'opds_authentication', 'opds_metainfo']
|
||||
'opds_enable', 'opds_authentication', 'opds_metainfo'] #, 'enable_ddl']
|
||||
|
||||
for checked_config in checked_configs:
|
||||
if checked_config not in kwargs:
|
||||
|
@ -6007,9 +6013,9 @@ class WebInterface(object):
|
|||
if sresults is not None:
|
||||
updater.foundsearch(dsr['ComicID'], dsr['IssueID'], mode='series', provider=dsr['tmpprov'], hash=sresults['t_hash'])
|
||||
except:
|
||||
return json.dumps({'result': 'failure'})
|
||||
return False #json.dumps({'result': 'failure'})
|
||||
else:
|
||||
return json.dumps({'result': 'success'})
|
||||
return True #json.dumps({'result': 'success'})
|
||||
|
||||
download_specific_release.exposed = True
|
||||
|
||||
|
|
Loading…
Reference in New Issue