Update Seerr integration version & start blocklist handling logic (#1671)

## Description
Start testing against Seerr `3.3.0` which has been out for over a month.
The only significant change is that the new "blocklisted" status is
added, but it uses the same code as the previous "deleted" status. So
generally, Seerr `3.2.0` will still work.

This starts work on supporting Seerr's blocklist which, unfortunately,
is expected to be enforced on the client side. For now, blocklisted
items still show, but the request button is disabled and shows
"Unavailable" instead.

Finally, some Seerr parent permissions I missed in #1631 are added.

### Related issues
Related to #1626

### Testing
Emulator testing

## Screenshots
N/A

## AI or LLM usage
None
This commit is contained in:
Damontecres 2026-07-07 13:56:22 -04:00 • committed by GitHub
parent f6e00c7820
commit 013755208d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 81 additions and 13 deletions

View file

@ -56,12 +56,14 @@ enum class SeerrItemType(
enum class SeerrAvailability(
val status: Int,
) {
// https://github.com/seerr-team/seerr/blob/develop/server/constants/media.ts#L14
UNKNOWN(1),
PENDING(2),
PROCESSING(3),
PARTIALLY_AVAILABLE(4),
AVAILABLE(5),
DELETED(6),
BLOCKLISTED(6),
DELETED(7),
;
companion object {

View file

@ -23,8 +23,8 @@ enum class SeerrPermission(
REQUEST_4K(1024),
REQUEST_4K_MOVIE(2048, REQUEST_4K),
REQUEST_4K_TV(4096, REQUEST_4K),
REQUEST_ADVANCED(8192),
REQUEST_VIEW(16384),
REQUEST_ADVANCED(8192, MANAGE_REQUESTS),
REQUEST_VIEW(16384, MANAGE_REQUESTS),
AUTO_APPROVE_4K(32768),
AUTO_APPROVE_4K_MOVIE(65536, AUTO_APPROVE_4K),
AUTO_APPROVE_4K_TV(131072, AUTO_APPROVE_4K),
@ -36,10 +36,10 @@ enum class SeerrPermission(
AUTO_REQUEST(8388608),
AUTO_REQUEST_MOVIE(16777216, AUTO_REQUEST),
AUTO_REQUEST_TV(33554432, AUTO_REQUEST),
RECENT_VIEW(67108864),
WATCHLIST_VIEW(134217728),
MANAGE_BLACKLIST(268435456),
VIEW_BLACKLIST(1073741824, MANAGE_BLACKLIST),
RECENT_VIEW(67108864, MANAGE_REQUESTS),
WATCHLIST_VIEW(134217728, MANAGE_REQUESTS),
MANAGE_BLOCKLIST(268435456),
VIEW_BLOCKLIST(1073741824, MANAGE_BLOCKLIST),
;
internal fun hasPermission(permissions: Int) = flag.and(permissions) == flag