mloader
mloader copied to clipboard
Sakamoto Days chapter 123 is mistakenly considered an oneshot
Steps to replicate
Install the develop branch, change AUTH_PARAMS, then run the following:
$ mloader --format raw --chapter 1017028
- Actual name:
Sakamoto Days - 000 (web) [Oneshot] [Unknown] - Expected name: Sakamoto Days - c123 (web) [Unknown]`
This chapter's name is "One shot". This is probably the cause.
Environment:
- mloader version: 1.1.10@develop
- Mangaplus URL: https://mangaplus.shueisha.co.jp/viewer/1017028
https://github.com/hurlenko/mloader/blob/develop/mloader/utils.py needs to be updated to fix this issue 🤔
@10SecondsToWaste, Replace the is_oneshot definition with below code in utils.py:
def is_oneshot(chapter_name: str, chapter_subtitle: str) -> bool:
chapnum = chapter_name_to_int(chapter_name)
if chapnum:
return False
else:
for name in (chapter_name, chapter_subtitle):
name = name.lower()
if "one" in name and "shot" in name:
return True
return False
I just tested this changed code and it works.
@rokibhasansagar Thanks for investigating. Submitting a PR.
Hmm, the PR #57 looks good.
I used if..else conditional in my fix, but on second look, that was not necessary.