-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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)
PassedChNum(just downloaded chapter number,c[0-9]{3}ord[0-9]{4}),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,
r3from above table), save that chapter number (as-well-as an extra number) as the above mentioned variablesPassedChNum=c003OldExNum=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=c003OldExNum=1
- And if this 2nd chapter is an extra, increase the extra number (
- When the 3rd chapter (
r5) is again anextra, increase the number in the extra part of the variable,c003x2- Rewrite >
PassedChNum=c003OldExNum=2
- Continue for 4th (
r6) downloadable chapterc003x2- Rewrite >
PassedChNum=c003OldExNum=3
- Continue for 4th (
r7) downloadable chapterc004- 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... 😃
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request