Request individual seasons from Jellyseerr (#1060)

## Description
Adds a dialog to select individual seasons for a TV show when requesting
it via Discover/Jellyseerr

If a request is already pending, it can be updated. If there's more than
7 seasons, a second submit button is added at the bottom of the dialog
for easier access.

Also, adds a button from Jellyfin series details to its Discover
equivalent and added a request button for partially available series to
request more seasons.

### Related issues
Closes #961

### Testing
Emulator & Jellyseerr 2.7.3

## Screenshots
![discover_seasons
Large](https://github.com/user-attachments/assets/c7781bf4-7c1b-4e4e-a0b8-a572111a8497)

## AI or LLM usage
None
This commit is contained in:
Ray 2026-03-10 11:54:00 -04:00 committed by GitHub
parent 49a6cd8d2f
commit afc47f254b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 512 additions and 46 deletions

View file

@ -57,6 +57,7 @@ class SeerrServerRepository
connection.map { (it as? SeerrConnectionStatus.Success)?.current?.server }
val currentUser: Flow<SeerrUser?> =
connection.map { (it as? SeerrConnectionStatus.Success)?.current?.user }
val currentUserId: Flow<Int?> = current.map { it?.config?.id }
/**
* Whether Seerr integration is currently active of not

View file

@ -2,6 +2,7 @@ package com.github.damontecres.wholphin.services
import com.github.damontecres.wholphin.api.seerr.SeerrApiClient
import com.github.damontecres.wholphin.api.seerr.model.SearchGet200ResponseResultsInner
import com.github.damontecres.wholphin.api.seerr.model.TvDetails
import com.github.damontecres.wholphin.data.model.BaseItem
import com.github.damontecres.wholphin.data.model.DiscoverItem
import kotlinx.coroutines.flow.first
@ -125,4 +126,16 @@ class SeerrService
} else {
null
}
suspend fun getTvSeries(item: BaseItem): TvDetails? =
if (active.first()) {
item.data.providerIds
?.get("Tmdb")
?.toIntOrNull()
?.let { tvId ->
api.tvApi.tvTvIdGet(tvId = tvId)
}
} else {
null
}
}