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:
|
||||
doujinshis = parser.artist(
|
||||
options.artist,
|
||||
sorting=options.sorting,
|
||||
page=page_list,
|
||||
is_page_all=options.page_all,
|
||||
)
|
||||
if language:
|
||||
logger.info(f'Using default language: {language}')
|
||||
doujinshis = parser.search(
|
||||
f'artist:{options.artist} language:{language}',
|
||||
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:
|
||||
doujinshi_ids = options.id
|
||||
|
||||
Reference in New Issue
Block a user