Compare commits

..

17 Commits
0.4.4 ... 0.4.6

Author SHA1 Message Date
9c7354be32 0.4.6 2020-11-07 12:04:42 +08:00
7f48b3edd1 Merge pull request #175 from RicterZ/dev
add default value of output dir
2020-10-15 02:10:06 +08:00
d84b827241 add default value of output dir 2020-10-15 02:09:09 +08:00
4ac161a38c Merge pull request #174 from Nontre12/fix-gen-main
Fix change directory output_dir option on gen-main
2020-10-15 01:47:51 +08:00
648b6f87bf Added logo.png to the installation 2020-10-14 12:09:39 +02:00
2ec1283ba8 Fix change directory output_dir option on gen-main 2020-10-14 12:02:57 +02:00
a9bd46b426 Merge pull request #173 from Nontre12/db-ignored
Fix db ignored
2020-10-14 02:44:03 +08:00
c52bc271fc Fix db ignored 2020-10-13 13:39:24 +02:00
f2d22f8e7d Merge pull request #169 from Nontre12/master
Fix running without parameters
2020-10-11 03:48:39 +08:00
ea6089ff31 Fix 2020-10-10 21:15:20 +02:00
670d14c3f3 Merge pull request #4 from RicterZ/master
Update master branch
2020-10-10 20:50:01 +02:00
b46106a5bc Merge pull request #167 from RicterZ/0.4.5
0.4.5
2020-10-11 02:00:02 +08:00
f04359e486 0.4.5 2020-10-11 01:57:37 +08:00
6861cbcbc1 Merge pull request #166 from RicterZ/dev
0.4.4
2020-10-11 01:45:53 +08:00
e0938c5a0e Merge pull request #165 from RicterZ/dev
0.4.4
2020-10-11 01:43:41 +08:00
4aa34c668a Merge pull request #3 from RicterZ/master
Update master branch from origin
2020-10-10 19:11:56 +02:00
8ad60d9838 Merge pull request #1 from RicterZ/master
Merge pull request #162 from Nontre12/master
2020-10-10 18:31:47 +02:00
4 changed files with 19 additions and 16 deletions

View File

@ -6,3 +6,4 @@ include nhentai/viewer/scripts.js
include nhentai/viewer/main.html include nhentai/viewer/main.html
include nhentai/viewer/main.css include nhentai/viewer/main.css
include nhentai/viewer/main.js include nhentai/viewer/main.js
include nhentai/viewer/logo.png

View File

@ -1,3 +1,3 @@
__version__ = '0.4.4' __version__ = '0.4.6'
__author__ = 'RicterZ' __author__ = 'RicterZ'
__email__ = 'ricterzheng@gmail.com' __email__ = 'ricterzheng@gmail.com'

View File

@ -87,7 +87,7 @@ def cmd_parser():
choices=['recent', 'popular', 'popular-today', 'popular-week']) choices=['recent', 'popular', 'popular-today', 'popular-week'])
# download options # download options
parser.add_option('--output', '-o', type='string', dest='output_dir', action='store', default='', parser.add_option('--output', '-o', type='string', dest='output_dir', action='store', default='./',
help='output dir') help='output dir')
parser.add_option('--threads', '-t', type='int', dest='threads', action='store', default=5, parser.add_option('--threads', '-t', type='int', dest='threads', action='store', default=5,
help='thread count for downloading doujinshi') help='thread count for downloading doujinshi')
@ -95,7 +95,7 @@ def cmd_parser():
help='timeout for downloading doujinshi') help='timeout for downloading doujinshi')
parser.add_option('--delay', '-d', type='int', dest='delay', action='store', default=0, parser.add_option('--delay', '-d', type='int', dest='delay', action='store', default=0,
help='slow down between downloading every doujinshi') help='slow down between downloading every doujinshi')
parser.add_option('--proxy', '-p', type='string', dest='proxy', action='store', default='', parser.add_option('--proxy', type='string', dest='proxy', action='store', default='',
help='store a proxy, for example: -p \'http://127.0.0.1:1080\'') help='store a proxy, for example: -p \'http://127.0.0.1:1080\'')
parser.add_option('--file', '-f', type='string', dest='file', action='store', help='read gallery IDs from file.') parser.add_option('--file', '-f', type='string', dest='file', action='store', help='read gallery IDs from file.')
parser.add_option('--format', type='string', dest='name_format', action='store', parser.add_option('--format', type='string', dest='name_format', action='store',
@ -153,28 +153,30 @@ def cmd_parser():
exit(0) exit(0)
# --- set config --- # --- set config ---
if args.cookie: if args.cookie is not None:
constant.CONFIG['cookie'] = args.cookie constant.CONFIG['cookie'] = args.cookie
logger.info('Cookie saved.') logger.info('Cookie saved.')
write_config() write_config()
exit(0) exit(0)
if args.language: if args.language is not None:
constant.CONFIG['language'] = args.language constant.CONFIG['language'] = args.language
logger.info('LANGUAGE now set to \'{0}\''.format(args.language)) logger.info('Default language now set to \'{0}\''.format(args.language))
write_config() write_config()
exit(0) exit(0)
# TODO: search without language # TODO: search without language
if args.proxy: if args.proxy:
proxy_url = urlparse(args.proxy) proxy_url = urlparse(args.proxy)
if proxy_url.scheme not in ('http', 'https'): if not args.proxy == '' and proxy_url.scheme not in ('http', 'https'):
logger.error('Invalid protocol \'{0}\' of proxy, ignored'.format(proxy_url.scheme)) logger.error('Invalid protocol \'{0}\' of proxy, ignored'.format(proxy_url.scheme))
exit(0)
else:
constant.CONFIG['proxy'] = { constant.CONFIG['proxy'] = {
'http': args.proxy, 'http': args.proxy,
'https': args.proxy, 'https': args.proxy,
} }
logger.info('Proxy \'{0}\' saved.'.format(args.proxy)) logger.info('Proxy now set to \'{0}\'.'.format(args.proxy))
write_config() write_config()
exit(0) exit(0)
# --- end set config --- # --- end set config ---

View File

@ -58,9 +58,9 @@ def main():
if options.is_save_download_history: if options.is_save_download_history:
with DB() as db: with DB() as db:
data = set(db.get_all()) data = map(int, db.get_all())
doujinshi_ids = list(set(doujinshi_ids) - data) doujinshi_ids = list(set(doujinshi_ids) - set(data))
if doujinshi_ids: if doujinshi_ids:
for i, id_ in enumerate(doujinshi_ids): for i, id_ in enumerate(doujinshi_ids):