mirror of
https://github.com/RicterZ/nhentai.git
synced 2026-05-22 21:46:51 +02:00
fix: apply language filter to --artist searches
When language is configured, --artist now routes through the search endpoint with 'artist:X language:Y' so results are properly filtered. Without language set, the faster tagged endpoint is still used. Closes #435
This commit is contained in:
+15
-6
@@ -86,12 +86,21 @@ def main():
|
|||||||
)
|
)
|
||||||
|
|
||||||
elif options.artist:
|
elif options.artist:
|
||||||
doujinshis = parser.artist(
|
if language:
|
||||||
options.artist,
|
logger.info(f'Using default language: {language}')
|
||||||
sorting=options.sorting,
|
doujinshis = parser.search(
|
||||||
page=page_list,
|
f'artist:{options.artist} language:{language}',
|
||||||
is_page_all=options.page_all,
|
sorting=options.sorting,
|
||||||
)
|
page=page_list,
|
||||||
|
is_page_all=options.page_all,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
doujinshis = parser.artist(
|
||||||
|
options.artist,
|
||||||
|
sorting=options.sorting,
|
||||||
|
page=page_list,
|
||||||
|
is_page_all=options.page_all,
|
||||||
|
)
|
||||||
|
|
||||||
elif not doujinshi_ids:
|
elif not doujinshi_ids:
|
||||||
doujinshi_ids = options.id
|
doujinshi_ids = options.id
|
||||||
|
|||||||
Reference in New Issue
Block a user