mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-09 16:11:20 +02:00
View more discover results (#1198)
## Description Adds a card at the end of the rows on the discover page/tab to view more results. When clicking this card, it goes to a grid view of more results starting focused on the next one. ### Dev notes This PR modifies `ApiRequestPager` to move most of its functionality into an abstract class, `RequestPager`. And then add a new concrete class, `DiscoverRequestPager`, for Seerr API paging. `ApiRequestPager` remains for Jellyfin paging. ### Related issues Related to #1035 ### Testing Emulator ## Screenshots   ## AI or LLM usage None
This commit is contained in:
parent
1366ee744d
commit
9a3af225a4
16 changed files with 926 additions and 246 deletions
|
|
@ -191,6 +191,18 @@ class SeerrService
|
|||
return "${base}${prefix}$path"
|
||||
}
|
||||
|
||||
suspend fun createDiscoverItem(item: Any): DiscoverItem =
|
||||
when (item) {
|
||||
is MovieResult -> createDiscoverItem(item)
|
||||
is MovieDetails -> createDiscoverItem(item)
|
||||
is TvResult -> createDiscoverItem(item)
|
||||
is TvDetails -> createDiscoverItem(item)
|
||||
is SeerrSearchResult -> createDiscoverItem(item)
|
||||
is CreditCast -> createDiscoverItem(item)
|
||||
is CreditCrew -> createDiscoverItem(item)
|
||||
else -> throw IllegalArgumentException("Unsupported type ${item::class.qualifiedName}")
|
||||
}
|
||||
|
||||
suspend fun createDiscoverItem(movie: MovieResult): DiscoverItem =
|
||||
DiscoverItem(
|
||||
id = movie.id,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue