Fix requesting new seasons after approval (#1816)

## Description
Fixes requesting additional seasons of a show if a previous request has
already been approved

Now if the previous request is already approved/completed/etc, a new
request will be created instead of trying to update the previous one.
Pending requests will still be updated as before instead of requesting a
new one.

### Related issues
Fixes #1702

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-08-12 16:47:08 -04:00 • committed by GitHub
parent 548ec09af3
commit e6304f79a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 161 additions and 41 deletions

View file

@ -71,6 +71,23 @@ enum class SeerrAvailability(
}
}
@Serializable
enum class RequestStatus(
val status: Int,
) {
UNKNOWN(0),
PENDING(1),
APPROVED(2),
DECLINED(3),
FAILURE(4),
COMPLETED(5),
;
companion object {
fun from(status: Int?) = RequestStatus.entries.firstOrNull { it.status == status } ?: UNKNOWN
}
}
/**
* An item provided by a discovery service (ie Seerr). It may exist on the JF server as well, see [availability].
*/