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

Idea about fixing the naming of multiple/simultaneous extra chapters #54

Open
rokibhasansagar opened this issue Jan 7, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@rokibhasansagar
Copy link

Currently, mloader works by fetching the chapter data provided by mangaplus api.

When there's an extra chapter, it only denotes itself as extra, but whose extra(?), that data is not sent from server. Only the next chapter is given.

And if there are multiple simultaneous extras, the first ones' next chapter value is Always another extra.
So, naming (or more accurately, numbering) the (continuous) extras is hard this way.

Let the Manga Serial, Current implementation and Expected result partially be like this...

# Original Serial Currently Downloads As Expected Behavior
r2 ... ... ...
r3 Chapter 3 c003 c003
r4 extra 0Exx1 c003x1
r5 extra 0Exx1 c003x2
r6 extra c003x1 c003x3
r7 Chapter 4 c004 c004
r8 Chapter 5 c005 c005
r9 ... ... ...

Following #38, and also my own findings, To mitigate the problem, I can suggest a way.

This process needs 2 globally available variables

(or whatever denotation is best for them)

  1. PassedChNum (just downloaded chapter number, c[0-9]{3} or d[0-9]{4}),
  2. OldExNum (number of already downloaded simultaneous extra chapters, [0-9]{1}, default = 0)
  • When it's a full chapter, increase the main variable and reset the extra number,
  • When it's an extra, only increase the extra number.

Main technique

  • When a chapter is fetched (say, r3 from above table), save that chapter number (as-well-as an extra number) as the above mentioned variables
    • PassedChNum=c003 OldExNum=0
  • When the next chapter (r4) is fetched, the previously saved chapter number can be re-used.
    • And if this 2nd chapter is an extra, increase the extra number (OldExNum: 0 > 1),
      • c003x1 (using the above 2 variables)
    • After this, the mentioned global variable can be modified/rewriten,
      • PassedChNum=c003 OldExNum=1
  • When the 3rd chapter (r5) is again an extra, increase the number in the extra part of the variable,
    • c003x2
    • Rewrite > PassedChNum=c003 OldExNum=2
  • Continue for 4th (r6) downloadable chapter
    • c003x2
    • Rewrite > PassedChNum=c003 OldExNum=3
  • Continue for 4th (r7) downloadable chapter
    • c004
    • As it's not an extra, reset > OldExNum=0
  • And so on...

Well, something like this might help someone implement it inside mloader🤔

Looking forward to see the upcoming changes... 😃

@rokibhasansagar rokibhasansagar added the enhancement New feature or request label Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants