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

Additional fields for manga. readingDirection suggested trackerLinks #5

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Animeboynz
Copy link

No description provided.

RFC.md Outdated Show resolved Hide resolved
RFC.md Outdated Show resolved Hide resolved
val chapters: List<Chapter>? = null,
val related: List<Manga> = emptyList(),
val suggested: List<Manga> = emptyList(),
val trackerLinks: List<String> = emptyList(),
Copy link
Contributor

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

Copy link
Author

@Animeboynz Animeboynz Oct 25, 2024

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
}

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?

@Animeboynz Animeboynz changed the title Additional fields for manga. readingDirection availabilityStatus suggested trackerLinks Additional fields for manga. readingDirection suggested trackerLinks Oct 23, 2024
RFC.md Outdated Show resolved Hide resolved
@cuong-tran
Copy link

How about some sources even have more than 1 page of suggestions/related manga?

@Animeboynz
Copy link
Author

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.

@cuong-tran
Copy link

do you mean like extensions have to set it in option and it must load all pages & flat out by itself?

@AntsyLich
Copy link
Owner

Imo suggested (as well as related) should be separate functions.

@AwkwardPeak7
Copy link
Contributor

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

@AntsyLich
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants