'
cnt = 0
@@ -3601,7 +3604,7 @@ class WebInterface(object):
if volume is None or volume == 'None':
ctrlVal = {"DynamicName": DynamicName,
- "ComicName": ComicName}
+ "ComicName": ComicName}
else:
ctrlVal = {"DynamicName": DynamicName,
"ComicName": ComicName,
@@ -3682,6 +3685,10 @@ class WebInterface(object):
self.addbyid(sr['comicid'], calledby=True, imported=imported, ogcname=ogcname) #imported=yes)
else:
logger.info('[IMPORT] There is more than one result that might be valid - normally this is due to the filename(s) not having enough information for me to use (ie. no volume label/year). Manual intervention is required.')
+ #force the status here just in case
+ newVal = {'SRID': SRID,
+ 'Status': 'Manual Intervention'}
+ myDB.upsert("importresults", newVal, ctrlVal)
mylar.IMPORTLOCK = False
logger.info('[IMPORT] Initial Import complete (I might still be populating the series data).')
@@ -4842,22 +4849,42 @@ class WebInterface(object):
return
else:
rp = test.RTorrent()
- torrent_info = rp.main(torrent_hash)
+ torrent_info = rp.main(torrent_hash, check=True)
+
+ if torrent_info:
+ torrent_name = torrent_info['name']
+ torrent_info['filesize'] = helpers.human_size(torrent_info['total_filesize'])
+ torrent_info['download'] = helpers.human_size(torrent_info['download_total'])
+ torrent_info['upload'] = helpers.human_size(torrent_info['upload_total'])
+ torrent_info['seedtime'] = helpers.humanize_time(amount=int(time.time()) - torrent_info['time_started'])
- if torrent_info['completed']:
logger.info("Client: %s", mylar.RTORRENT_HOST)
logger.info("Directory: %s", torrent_info['folder'])
logger.info("Name: %s", torrent_info['name'])
logger.info("Hash: %s", torrent_info['hash'])
- logger.info("FileSize: %s", helpers.human_size(torrent_info['total_filesize']))
+ logger.info("FileSize: %s", torrent_info['filesize'])
logger.info("Completed: %s", torrent_info['completed'])
- logger.info("Downloaded: %s", helpers.human_size(torrent_info['download_total']))
- logger.info("Uploaded: %s", helpers.human_size(torrent_info['upload_total']))
+ logger.info("Downloaded: %s", torrent_info['download'])
+ logger.info("Uploaded: %s", torrent_info['upload'])
logger.info("Ratio: %s", torrent_info['ratio'])
+ logger.info("Seeding Time: %s", torrent_info['seedtime'])
if torrent_info['label']:
logger.info("Torrent Label: %s", torrent_info['label'])
+ ti = '
'
+ ti += '' + torrent_name + ''
+ ti += '' + torrent_info['hash'] + ''
+ ti += ' |
Filesize: ' + torrent_info['filesize'] + ' |
'
+ ti += '' + torrent_info['download'] + ' DOWN / ' + torrent_info['upload'] + ' UP |
'
+ ti += 'Ratio: ' + str(torrent_info['ratio']) + ' |
'
+ ti += 'Seedtime: ' + torrent_info['seedtime'] + ' | '
+ ti += '
'
+ else:
+ torrent_name = 'Not Found'
+ ti = 'Torrent not found (' + str(torrent_hash)
+ return ti
+
torrentit.exposed = True
def get_the_hash(self, filepath):
@@ -4877,5 +4904,6 @@ class WebInterface(object):
import auth32p
p = auth32p.info32p(test=True)
rtnvalues = p.authenticate()
+ logger.info('32p return values: ' + str(rtnvalues))
return rtnvalues
test_32p.exposed = True
diff --git a/mylar/weeklypull.py b/mylar/weeklypull.py
index 87d4b448..91852c97 100755
--- a/mylar/weeklypull.py
+++ b/mylar/weeklypull.py
@@ -57,6 +57,7 @@ def pullit(forcecheck=None):
#PULLURL = 'http://www.previewsworld.com/shipping/prevues/newreleases.txt'
PULLURL = 'http://www.previewsworld.com/shipping/newreleases.txt'
newrl = os.path.join(mylar.CACHE_DIR, 'newreleases.txt')
+ mylar.PULLBYFILE = None
if mylar.ALT_PULL == 1:
#logger.info('[PULL-LIST] The Alt-Pull method is currently broken. Defaulting back to the normal method of grabbing the pull-list.')
@@ -75,10 +76,12 @@ def pullit(forcecheck=None):
else:
logger.info('[PULL-LIST] Unable to retrieve weekly pull-list. Dropping down to legacy method of PW-file')
- f= urllib.urlretrieve(PULLURL, newrl)
+ urllib.urlretrieve(PULLURL, newrl)
+ mylar.PULLBYFILE = True
else:
logger.info('[PULL-LIST] Populating & Loading pull-list data from file')
- f = urllib.urlretrieve(PULLURL, newrl)
+ urllib.urlretrieve(PULLURL, newrl)
+ mylar.PULLBYFILE = True
#set newrl to a manual file to pull in against that particular file
#newrl = '/mylar/tmp/newreleases.txt'
@@ -86,7 +89,7 @@ def pullit(forcecheck=None):
#newtxtfile header info ("SHIPDATE\tPUBLISHER\tISSUE\tCOMIC\tEXTRA\tSTATUS\n")
#STATUS denotes default status to be applied to pulllist in Mylar (default = Skipped)
- if mylar.ALT_PULL != 2:
+ if mylar.ALT_PULL != 2 or mylar.PULLBYFILE is True:
newfl = os.path.join(mylar.CACHE_DIR, 'Clean-newreleases.txt')
newtxtfile = open(newfl, 'wb')
@@ -386,7 +389,7 @@ def pullit(forcecheck=None):
dupefound = "no"
#-- remove html tags when alt_pull is enabled
- if mylar.ALT_PULL:
+ if mylar.ALT_PULL == 1:
if '&' in comicnm:
comicnm = re.sub('&', '&', comicnm).strip()
if '&' in pub:
@@ -423,7 +426,7 @@ def pullit(forcecheck=None):
newtxtfile.close()
- if pulldate == '00000000' and mylar.ALT_PULL != 2:
+ if all([pulldate == '00000000', mylar.ALT_PULL != 2]) or mylar.PULLBYFILE is True:
pulldate = shipdate
try:
@@ -471,7 +474,7 @@ def pullit(forcecheck=None):
logger.info(u"Weekly Pull List successfully loaded.")
- if mylar.ALT_PULL != 2:
+ if mylar.ALT_PULL != 2 or mylar.PULLBYFILE is True:
pullitcheck(forcecheck=forcecheck)
def pullitcheck(comic1off_name=None, comic1off_id=None, forcecheck=None, futurepull=None, issue=None):