Compare commits

..

3 Commits

Author SHA1 Message Date
0xsysr3ll
eb08eb024f fix(plexapi): temporary remove unused PlexLibraryResponse interface 2026-02-16 21:53:14 +01:00
0xsysr3ll
b5c8e21104 feat(plexapi): add debug logs for Plex API response 2026-02-16 21:48:46 +01:00
0xsysr3ll
54baa53aac feat(plexapi): add debug logs for Plex API response 2026-02-16 21:47:01 +01:00
9 changed files with 109 additions and 45 deletions

4
.github/cliff.toml vendored
View File

@@ -33,9 +33,9 @@ body = """
{{ self::print_commit(commit=commit) }} {{ self::print_commit(commit=commit) }}
{%- endfor %} {%- endfor %}
{%- for commit in commits %} {%- for commit in commits %}
{%- if not commit.scope %} {%- if not commit.scope -%}
{{ self::print_commit(commit=commit) }} {{ self::print_commit(commit=commit) }}
{%- endif %} {%- endif -%}
{%- endfor -%} {%- endfor -%}
{%- endfor -%} {%- endfor -%}

View File

@@ -6,7 +6,7 @@ on:
workflow_dispatch: workflow_dispatch:
push: push:
branches: branches:
- develop - legacy-jellyseerr
paths: paths:
- 'docs/**' - 'docs/**'
- 'gen-docs/**' - 'gen-docs/**'

View File

@@ -279,17 +279,17 @@ jobs:
--certificate-identity "https://github.com/${{ github.workflow_ref }}" \ --certificate-identity "https://github.com/${{ github.workflow_ref }}" \
--certificate-oidc-issuer "https://token.actions.githubusercontent.com" --certificate-oidc-issuer "https://token.actions.githubusercontent.com"
# - name: Verify attestations - name: Verify attestations
# run: | run: |
# cosign verify-attestation "ghcr.io/${{ github.repository }}@${{ needs.publish.outputs.image_digest }}" \ cosign verify-attestation "ghcr.io/${{ github.repository }}@${{ needs.publish.outputs.image_digest }}" \
# --type cyclonedx \ --type cyclonedx \
# --certificate-identity "https://github.com/${{ github.workflow_ref }}" \ --certificate-identity "https://github.com/${{ github.workflow_ref }}" \
# --certificate-oidc-issuer "https://token.actions.githubusercontent.com" > /dev/null --certificate-oidc-issuer "https://token.actions.githubusercontent.com" > /dev/null
# cosign verify-attestation "${{ env.DOCKER_HUB }}@${{ needs.publish.outputs.image_digest }}" \ cosign verify-attestation "${{ env.DOCKER_HUB }}@${{ needs.publish.outputs.image_digest }}" \
# --type cyclonedx \ --type cyclonedx \
# --certificate-identity "https://github.com/${{ github.workflow_ref }}" \ --certificate-identity "https://github.com/${{ github.workflow_ref }}" \
# --certificate-oidc-issuer "https://token.actions.githubusercontent.com" > /dev/null --certificate-oidc-issuer "https://token.actions.githubusercontent.com" > /dev/null
publish-release: publish-release:
name: Publish release name: Publish release

View File

@@ -1,6 +1,6 @@
<p align="center"> <div align="center">⚠️ <strong>NOTE:</strong> We are currently in the process of merging Overseerr and Jellyseerr into this unified repository.</div>
<img src="./public/logo_full.svg" alt="Seerr" style="margin: 20px 0;">
</p> <h1 align="center" style="font-size: 4em;">🚧 Seerr</h1>
<p align="center"> <p align="center">
<img src="https://github.com/seerr-team/seerr/actions/workflows/release.yml/badge.svg" alt="Seerr Release" /> <img src="https://github.com/seerr-team/seerr/actions/workflows/release.yml/badge.svg" alt="Seerr Release" />
<img src="https://github.com/seerr-team/seerr/actions/workflows/ci.yml/badge.svg" alt="Seerr CI"> <img src="https://github.com/seerr-team/seerr/actions/workflows/ci.yml/badge.svg" alt="Seerr CI">
@@ -32,19 +32,31 @@ With more features on the way! Check out our [issue tracker](/../../issues) to s
## Getting Started ## Getting Started
Check out our documentation for instructions on how to install and run Seerr: For instructions on how to install and run **Jellyseerr**, please refer to the official documentation:
https://docs.seerr.dev/getting-started/ https://docs.seerr.dev/getting-started/
> [!IMPORTANT]
> **Seerr is not officially released yet.**
> The project is currently available **only on the `develop` branch** and is intended for **beta testing only**.
The documentation linked above is for running the **latest Jellyseerr** release.
> [!WARNING]
> If you are migrating from **Overseerr** to **Seerr** for beta testing, **do not follow the Jellyseerr latest setup guide**.
Instead, follow the dedicated migration guide (with `:develop` tag):
https://github.com/seerr-team/seerr/blob/develop/docs/migration-guide.mdx
> [!CAUTION]
> **DO NOT run Jellyseerr (latest) using an existing Overseerr database. This includes third-party images with `seerr:latest` (as it points to jellyseerr 2.7.3 and not seerr.**
> Doing so **may cause database corruption and/or irreversible data loss and/or weird unintended behaviour**.
For migration assistance, beta testing questions, or troubleshooting, please join our **Discord** and ask for support there.
## Preview ## Preview
<img src="./public/preview.jpg" alt="Seerr application preview" /> <img src="./public/preview.jpg">
## Migrating from Overseerr/Jellyseerr to Seerr
Read our [release announcement](https://docs.seerr.dev/blog/seerr-release) to learn what Seerr means for Jellyseerr and Overseerr users.
Please follow our [migration guide](https://docs.seerr.dev/migration-guide) for detailed instructions on migrating from Overseerr or Jellyseerr.
## Support ## Support

View File

@@ -200,15 +200,14 @@ Summary of changes :
</TabItem> </TabItem>
</Tabs> </Tabs>
## Third-party installation methods ### Nix (Third-party installation methods)
### Nix
Waiting for https://github.com/NixOS/nixpkgs/pull/450096 and https://github.com/NixOS/nixpkgs/pull/450093 Waiting for https://github.com/NixOS/nixpkgs/pull/450096 and https://github.com/NixOS/nixpkgs/pull/450093
### AUR ### AUR (Third-party installation methods)
See https://aur.archlinux.org/packages/seerr See https://aur.archlinux.org/packages/seerr
### TrueNAS ### TrueNAS (Third-party installation methods)
Waiting for https://github.com/truenas/apps/issues/3374 Waiting for https://github.com/truenas/apps/issues/3374

View File

@@ -3,7 +3,7 @@
// previously cached resources to be updated from the network. // previously cached resources to be updated from the network.
// This variable is intentionally declared and unused. // This variable is intentionally declared and unused.
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
const OFFLINE_VERSION = 5; const OFFLINE_VERSION = 4;
const CACHE_NAME = 'offline'; const CACHE_NAME = 'offline';
// Customize this with a different URL if needed. // Customize this with a different URL if needed.
const OFFLINE_URL = '/offline.html'; const OFFLINE_URL = '/offline.html';

View File

@@ -27,10 +27,13 @@ export interface PlexLibraryItem {
Media: Media[]; Media: Media[];
} }
interface PlexLibraryResponse { interface PlexLibraryResponseRaw {
MediaContainer: { MediaContainer: {
totalSize: number; totalSize?: number;
Metadata: PlexLibraryItem[]; size?: number;
Metadata?: PlexLibraryItem[];
Directory?: PlexLibraryItem[];
[key: string]: unknown;
}; };
} }
@@ -177,7 +180,7 @@ class PlexAPI extends ExternalAPI {
id: string, id: string,
{ offset = 0, size = 50 }: { offset?: number; size?: number } = {} { offset = 0, size = 50 }: { offset?: number; size?: number } = {}
): Promise<{ totalSize: number; items: PlexLibraryItem[] }> { ): Promise<{ totalSize: number; items: PlexLibraryItem[] }> {
const response = await this.get<PlexLibraryResponse>( const response = await this.get<PlexLibraryResponseRaw>(
`/library/sections/${id}/all?includeGuids=1`, `/library/sections/${id}/all?includeGuids=1`,
{ {
headers: { headers: {
@@ -187,9 +190,26 @@ class PlexAPI extends ExternalAPI {
} }
); );
const container = response.MediaContainer;
const metadataLength = container.Metadata?.length ?? 0;
const directoryLength = container.Directory?.length ?? 0;
logger.debug('Plex getLibraryContents raw response', {
label: 'Plex API',
libraryId: id,
offset,
metadataLength,
directoryLength,
totalSize: container.totalSize,
size: container.size,
keys: Object.keys(container).filter((k) =>
['Metadata', 'Directory', 'totalSize', 'size'].includes(k)
),
});
return { return {
totalSize: response.MediaContainer.totalSize, totalSize: container.totalSize ?? 0,
items: response.MediaContainer.Metadata ?? [], items: container.Metadata ?? [],
}; };
} }
@@ -221,7 +241,7 @@ class PlexAPI extends ExternalAPI {
}, },
mediaType: 'movie' | 'show' mediaType: 'movie' | 'show'
): Promise<PlexLibraryItem[]> { ): Promise<PlexLibraryItem[]> {
const response = await this.get<PlexLibraryResponse>( const response = await this.get<PlexLibraryResponseRaw>(
`/library/sections/${id}/all?type=${ `/library/sections/${id}/all?type=${
mediaType === 'show' ? '4' : '1' mediaType === 'show' ? '4' : '1'
}&sort=addedAt%3Adesc&addedAt>>=${Math.floor(options.addedAt / 1000)}`, }&sort=addedAt%3Adesc&addedAt>>=${Math.floor(options.addedAt / 1000)}`,
@@ -233,7 +253,21 @@ class PlexAPI extends ExternalAPI {
} }
); );
return response.MediaContainer.Metadata; const container = response.MediaContainer;
const items = container.Metadata ?? [];
logger.debug('Plex getRecentlyAdded raw response', {
label: 'Plex API',
libraryId: id,
mediaType,
addedAtFilter: options.addedAt,
addedAtFilterDate: new Date(options.addedAt).toISOString(),
metadataLength: container.Metadata?.length ?? 0,
directoryLength: container.Directory?.length ?? 0,
itemsReturned: items.length,
});
return items;
} }
} }

View File

@@ -92,7 +92,7 @@ class ServarrBase<QueueItemAppendT> extends ExternalAPI {
apiKey, apiKey,
cacheName, cacheName,
apiName, apiName,
timeout = 10000, timeout = 5000,
}: { }: {
url: string; url: string;
apiKey: string; apiKey: string;

View File

@@ -90,22 +90,41 @@ class PlexScanner
if (this.isRecentOnly) { if (this.isRecentOnly) {
for (const library of this.libraries) { for (const library of this.libraries) {
this.currentLibrary = library; this.currentLibrary = library;
this.log( const addedAtOpt = library.lastScan
`Beginning to process recently added for library: ${library.name}`,
'info',
{ lastScan: library.lastScan }
);
const libraryItems = await this.plexClient.getRecentlyAdded(
library.id,
library.lastScan
? { ? {
// We remove 10 minutes from the last scan as a buffer // We remove 10 minutes from the last scan as a buffer
addedAt: library.lastScan - 1000 * 60 * 10, addedAt: library.lastScan - 1000 * 60 * 10,
} }
: undefined;
this.log(
`Beginning to process recently added for library: ${library.name}`,
'info',
{
lastScan: library.lastScan,
addedAtFilter: addedAtOpt?.addedAt,
addedAtFilterDate: addedAtOpt
? new Date(addedAtOpt.addedAt).toISOString()
: undefined, : undefined,
}
);
const libraryItems = await this.plexClient.getRecentlyAdded(
library.id,
addedAtOpt ?? {
addedAt: Date.now() - 1000 * 60 * 60,
},
library.type library.type
); );
this.log(
`Recently added fetched ${libraryItems.length} items for library: ${library.name}`,
'debug',
{
libraryId: library.id,
itemCount: libraryItems.length,
lastScanWillUpdateTo: Date.now(),
}
);
// Bundle items up by rating keys // Bundle items up by rating keys
this.items = uniqWith(libraryItems, (mediaA, mediaB) => { this.items = uniqWith(libraryItems, (mediaA, mediaB) => {
if (mediaA.grandparentRatingKey && mediaB.grandparentRatingKey) { if (mediaA.grandparentRatingKey && mediaB.grandparentRatingKey) {