genius257 / Manga

Local manga server powered by AutoIt3
MIT License
0 stars 0 forks source link

New logic for handling chapter download/updates #24

Open genius257 opened 3 years ago

genius257 commented 3 years ago

The chapter check/download is top to bottom. In Taadd that means newest to oldest enties, initially. This produces problems when updates to the Manga is added. New chapters are currently appearing at the bottom of the list, below the first chapter. This also screws with the reader experience, as the next and previous page feature acts the same, so trying to go back a page on the first page in chapter 1, will send you to the last page on the newly added chapters.

The solution is tricky, as we need to try and handles things like updates, order changes and possible deleted chapters. First fix would be to change how we handle chapters in the first place. We need to get them oldest to newest. This will make future chapters added to appear in the correct order naturally in the database id ordering, avoiding some confusion, without too many changes. (changes to manga API download and the reader should only be updated). Then there's the issues with deleted chapters. A choice need to be made, if we should delete them, or just mark it as deleted. The second part of this problem, is where in the chapter ordering would an deleted chapter exist?. Ideally a second table with the deleted chapters might appear, and we simply let the user choose the rest in settings. MUCH more work, but less complaints due to different needs.

Finally we have a possible option to make the user able to change the ordering of the chapters manually. This solution should be avoided if possible, as many edge cases could break databases and end up enraging more than helping people.

genius257 commented 3 years ago

One part is fixed, so chapter ordering is correct: 0f0a6ad719205daf61520c2f5b99eb584dd29449