-
Notifications
You must be signed in to change notification settings - Fork 578
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
Add reviews support #1534
base: master
Are you sure you want to change the base?
Add reviews support #1534
Conversation
This has been fully tested to work on mobile, still need to add UI for TV though. |
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.
I only a reviewed the code itself for API changes, and did not test it. You will get a tested review after the draft period. Keep in mind that the mainapi has very strict requirements as it is hard to change after introducing it.
library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt
Outdated
Show resolved
Hide resolved
library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt
Outdated
Show resolved
Hide resolved
library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt
Outdated
Show resolved
Hide resolved
open suspend fun loadReviews( | ||
url: String, | ||
page: Int, | ||
showSpoilers: Boolean = false |
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.
While this api might be functional, we might want to also add sort by or filter by.
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.
I gave spoiler support control to the API so it is no longer done here at all, can pass isSpoiler to UserReview and then it has a UI for spoilers (which will be improved) as for sort I guess we could add it if you think we need to?
app/src/main/java/com/lagradost/cloudstream3/ui/APIRepository.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/lagradost/cloudstream3/ui/result/ReviewAdapter.kt
Outdated
Show resolved
Hide resolved
library/src/commonMain/kotlin/com/lagradost/cloudstream3/MainAPI.kt
Outdated
Show resolved
Hide resolved
url: String, | ||
page: Int, | ||
showSpoilers: Boolean = false | ||
): List<UserReview> { |
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.
Unlike HomePageResponse, this lacks a hasNext making it hard to know if we should re-fetch or not if it fails.
app/src/main/java/com/lagradost/cloudstream3/ui/result/ResultViewModel2.kt
Outdated
Show resolved
Hide resolved
I put this on hold for now. I am go back to it eventually but this has become much more work than I originally bargained for... |
TODO: