-
Notifications
You must be signed in to change notification settings - Fork 6
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
Additional fields for manga. readingDirection
suggested
trackerLinks
#5
base: main
Are you sure you want to change the base?
Conversation
val chapters: List<Chapter>? = null, | ||
val related: List<Manga> = emptyList(), | ||
val suggested: List<Manga> = emptyList(), | ||
val trackerLinks: List<String> = emptyList(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe a hashmap? so say we can set "anilist" to 1234 and so on, this way new trackers can be added without much trouble
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would that be like this?
val trackerLinks: HashMap<Long, String> = hashMapOf()
also what should the key be? name? url? or reuse like these numbers?
companion object {
const val MYANIMELIST = 1L
const val ANILIST = 2L
const val KITSU = 3L
const val SHIKIMORI = 4L
const val BANGUMI = 5L
const val KOMGA = 6L
const val MANGA_UPDATES = 7L
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some sort of constant for sure, otherwise it'll be too implicit and one could accidentally throw in an invalid value. Those consts in the companion object are just Longs though, do we have an enum of trackers somewhere?
readingDirection
availabilityStatus
suggested
trackerLinks
readingDirection
suggested
trackerLinks
Co-authored-by: AntsyLich <[email protected]>
How about some sources even have more than 1 page of suggestions/related manga? |
That could probably be set in the extension settings I guess for sources that have it the user can choose. Kind of like how some sources let you select cover resolution. |
do you mean like extensions have to set it in option and it must load all pages & flat out by itself? |
Imo suggested (as well as related) should be separate functions. |
Most of the time, related manga will be on the same page so having it in the same function saves additional network requests |
I suppose we can keep related as is but the only sites I know that does have related has it in a separate api call. |
No description provided.