Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong/misleading print when using action menu_download_from_list #626

Closed
fireattack opened this issue Jan 13, 2020 · 0 comments
Closed

Wrong/misleading print when using action menu_download_from_list #626

fireattack opened this issue Jan 13, 2020 · 0 comments

Comments

@fireattack
Copy link
Contributor

@fireattack fireattack commented Jan 13, 2020

Prerequisites

  • Did you read FAQ section?
  • Did you test with the latest releases or commit ?

Description

Currently, if you use action 4 with option processFromDB, it will still show Processing member id from .\list.txt, which is wrong, because it will only process from the DB.

Processing member id from .\list.txt
Processing from database.

The reason is that there is a print at

PixivHelper.safePrint(u"Processing member id from {0} for tags: {1}".format(list_file_name, tags))

before the conditional in process_list, which means it will print so regardless if processFromDB is disabled or not.

Actually, if you disable processFromDB, it will also end up printing two relatively redundant messages like

Processing member id from .\list.txt
Processing from list file: .\list.txt

because there is another print at

PixivHelper.print_and_log('info', 'Processing from list file: {0}'.format(list_file_name))

Suggestion

Remove print at PixivUtil2.py#L1714, only print in process_list. Move conditionals for {tags} cases within process_list. This way, only one line will be printed, and it will without confusion that is is either "from DB" or "from list file", as what the logic actually does.

Steps to Reproduce

  1. PixivUtil2.py
  2. 4 then enter twice

Versions

You can get this information from executing PixivUtil2.py --help.

master

@Nandaka Nandaka closed this in 8ce38f8 Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.