mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-11-06 02:40:58 +01:00
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:
parent
548ec09af3
commit
e6304f79a2
5 changed files with 161 additions and 41 deletions
|
|
@ -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].
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue