mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-20 11:01:17 +02:00
dojinshis download
This commit is contained in:
parent
cb0972c2eb
commit
08ce2858c8
@ -48,7 +48,7 @@ class Downloader(object):
|
|||||||
except Exception, e:
|
except Exception, e:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
logger.info('%s downloaded: %s done!' % (threading.currentThread().getName(), url))
|
logger.info('%s %s downloaded.' % (threading.currentThread().getName(), url))
|
||||||
|
|
||||||
def _download_thread(self, queue, folder=''):
|
def _download_thread(self, queue, folder=''):
|
||||||
while True:
|
while True:
|
||||||
@ -67,7 +67,7 @@ class Downloader(object):
|
|||||||
folder = str(folder)
|
folder = str(folder)
|
||||||
|
|
||||||
if self.path:
|
if self.path:
|
||||||
folder = self.path
|
folder = '%s/%s' % (self.path, folder)
|
||||||
|
|
||||||
if os.path.exists(path=folder):
|
if os.path.exists(path=folder):
|
||||||
logger.warn('Path \'%s\' already exist' % folder)
|
logger.warn('Path \'%s\' already exist' % folder)
|
||||||
@ -85,4 +85,6 @@ class Downloader(object):
|
|||||||
for thread in self.threads:
|
for thread in self.threads:
|
||||||
thread.join()
|
thread.join()
|
||||||
|
|
||||||
|
# clean threads list
|
||||||
|
self.threads = []
|
||||||
logger.log(15, u'🍺 All done, saved to \'%s\'!' % folder)
|
logger.log(15, u'🍺 All done, saved to \'%s\'!' % folder)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user