View more from home page & recommended rows (#1392)

## Description
Adds a card at the end of the rows on the home page and recommended tabs
to "View More" which goes to a grid of the items in the row.

The grid will endlessly scroll all of the available items except for a
few cases where the first 1000 are shown because the server does not
(yet) support pagination: genres, studios, people (added in v12), and
latest grouped tv shows.

Dev notes: This PR also rewrites the `RecommendedViewModel` and
consolidates the previous multiple view models into one.

### Related issues
Closes #1371
Closes #1035
Similar to #1198

### Testing
Emulator

## Screenshots
N/A, see #1198

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-05-16 11:35:11 -04:00 • committed by GitHub
parent 98ffaf51ac
commit f4bdb8446e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 1417 additions and 1075 deletions

View file

@ -21,9 +21,11 @@ import org.jellyfin.sdk.model.api.GetProgramsDto
import org.jellyfin.sdk.model.api.request.GetEpisodesRequest
import org.jellyfin.sdk.model.api.request.GetGenresRequest
import org.jellyfin.sdk.model.api.request.GetItemsRequest
import org.jellyfin.sdk.model.api.request.GetLiveTvChannelsRequest
import org.jellyfin.sdk.model.api.request.GetNextUpRequest
import org.jellyfin.sdk.model.api.request.GetPersonsRequest
import org.jellyfin.sdk.model.api.request.GetPlaylistItemsRequest
import org.jellyfin.sdk.model.api.request.GetRecordingsRequest
import org.jellyfin.sdk.model.api.request.GetResumeItemsRequest
import org.jellyfin.sdk.model.api.request.GetStudiosRequest
import org.jellyfin.sdk.model.api.request.GetSuggestionsRequest
@ -328,3 +330,43 @@ val GetStudiosRequestHandler =
request: GetStudiosRequest,
): Response<BaseItemDtoQueryResult> = api.studiosApi.getStudios(request)
}
val GetRecordingsRequestHandler =
object : RequestHandler<GetRecordingsRequest> {
override fun prepare(
request: GetRecordingsRequest,
startIndex: Int,
limit: Int,
enableTotalRecordCount: Boolean,
): GetRecordingsRequest =
request.copy(
startIndex = startIndex,
limit = limit,
enableTotalRecordCount = enableTotalRecordCount,
)
override suspend fun execute(
api: ApiClient,
request: GetRecordingsRequest,
): Response<BaseItemDtoQueryResult> = api.liveTvApi.getRecordings(request)
}
val GetLiveTvChannelsRequestHandler =
object : RequestHandler<GetLiveTvChannelsRequest> {
override fun prepare(
request: GetLiveTvChannelsRequest,
startIndex: Int,
limit: Int,
enableTotalRecordCount: Boolean,
): GetLiveTvChannelsRequest =
request.copy(
startIndex = startIndex,
limit = limit,
// enableTotalRecordCount = enableTotalRecordCount,
)
override suspend fun execute(
api: ApiClient,
request: GetLiveTvChannelsRequest,
): Response<BaseItemDtoQueryResult> = api.liveTvApi.getLiveTvChannels(request)
}