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

fix: remove trim _pxx #1204

Merged
merged 1 commit into from Jan 2, 2023
Merged

fix: remove trim _pxx #1204

merged 1 commit into from Jan 2, 2023

Conversation

cokemine
Copy link
Contributor

@cokemine cokemine commented Dec 3, 2022

This should fix for some pictures titled end with _xxx, e.g. https://www.pixiv.net/artworks/100345141

リコリス・リコイル_02.txt shouldn't be trimed to リコリス・リコイル.txt

However, I don't know why info_filename = re.sub(r'_p?\d+$', '', info_filename) code exists. I checked the commit history and found that this was added six years ago, I think it may be a historical problem

@Nandaka
Copy link
Owner

Nandaka commented Dec 3, 2022

it is for manga images, if you don't remove it, the info file will contains _pxx

@cokemine
Copy link
Contributor Author

cokemine commented Dec 3, 2022

I 've tested both single image and manga images. I found that deleting this code did not change the output(except the bug that I mentioned), that's why I have that question

@cokemine
Copy link
Contributor Author

cokemine commented Dec 3, 2022

I used the default config

filenameFormat = %artist% (%member_id%)/%urlFilename% - %title%
filenameMangaFormat = %artist% (%member_id%)/%urlFilename% - %title%
filenameInfoFormat = %artist% (%member_id%)/%urlFilename% - %title%
filenameMangaInfoFormat = %artist% (%member_id%)/%urlFilename% - %title%

info_filename is end with %title%, and _pxx will be only trimed from %title% not from %urlFilename%

So all the manga information will be in the format id_pXX - title and _pXX won't be trimed

@Nandaka Nandaka merged commit 39464b0 into Nandaka:master Jan 2, 2023
Nandaka added a commit that referenced this pull request Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants