diff --git a/README.md b/README.md index ebe36ba3d..c99720b5a 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ A video game management application inspired by the -Arr apps (Sonarr, Radarr, P [![Docker Pulls](https://img.shields.io/docker/pulls/doezer/questarr?logo=docker&logoColor=white)](https://hub.docker.com/r/doezer/questarr) [![GHCR](https://img.shields.io/badge/ghcr.io-questarr-blue?logo=github&logoColor=white)](https://github.com/Doezer/Questarr/pkgs/container/questarr) +[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/questarr)](https://artifacthub.io/packages/search?repo=questarr) [![License](https://img.shields.io/github/license/Doezer/Questarr)](https://github.com/Doezer/Questarr/blob/main/COPYING) [![GitHub release](https://img.shields.io/github/v/release/Doezer/Questarr)](https://github.com/Doezer/Questarr/releases) [![GitHub release date](https://img.shields.io/github/release-date/Doezer/Questarr)](https://github.com/Doezer/Questarr/releases) diff --git a/docs/API.md b/docs/API.md index c2d9da76d..43cc51a62 100644 --- a/docs/API.md +++ b/docs/API.md @@ -86,11 +86,15 @@ configuration routes (see | PATCH | `/api/games/:id/status` | JWT + `sensitiveEndpointLimiter`, `sanitizeGameId`, `sanitizeGameStatus`, `validateRequest` | `{ status: "wanted"\|"owned"\|"completed"\|"downloading" }` via `updateGameStatusSchema` | Updated `Game`; 404 if not found | | PATCH | `/api/games/:id/hidden` | JWT + `sensitiveEndpointLimiter`, `sanitizeGameId`, `validateRequest` | `{ hidden: boolean }` via `updateGameHiddenSchema` | Updated `Game`; 404 if not found | | PATCH | `/api/games/:id/user-rating` | JWT + `sensitiveEndpointLimiter`, `sanitizeGameId`, `validateRequest` | `{ userRating: number\|null }` (0.5–10, step 0.5) via `updateGameUserRatingSchema` | Updated `Game`; 404 if not found | +| PATCH | `/api/games/:id/upgrade-policy` | JWT | `{ upgradePolicy: "notify"\|"off"\|null }` — per-game override of the account's **Updates for Owned Games** default; `null` follows the default | | PATCH | `/api/games/:id/installed-version` | JWT + `sensitiveEndpointLimiter`, `sanitizeGameId`, `validateRequest` | `{ installedVersion: string\|null }` (free text, trimmed, ≤64; blank clears) via `updateGameInstalledVersionSchema` | Updated `Game`; 404 if not found. Auto-search skips update releases whose version is not newer than this | | POST | `/api/games/refresh-metadata` | JWT + `igdbRateLimiter` | — | `{ success, message, updatedCount, errorCount }` | | DELETE | `/api/games/:id` | JWT + `sensitiveEndpointLimiter`, `sanitizeGameId`, `validateRequest` | Query: `deleteFiles?` ("true" to also remove the game's files on disk) | `{ success: true, fileDeletion }`; 404 if not found. `fileDeletion` is `null` when `deleteFiles` wasn't set, otherwise `{ deleted: true, path }` or `{ deleted: false, reason: "outside-library-root"\|"delete-failed", path }`. Files are only deleted when `libraryPath` resolves inside the configured library root **or** inside a root folder with `allowDelete: true` (see Root Folders below) | | GET | `/api/games/:id/downloads` | JWT + `sanitizeGameId`, `validateRequest` (verifies game ownership) | — | `GameDownload[]`; 404 game not found, 403 not owner | | GET | `/api/games/discover` | JWT + `igdbRateLimiter` | Query: `limit?` | `Game[]` (IGDB-formatted recommendations) | +| GET | `/api/games/recommendations` | JWT + `igdbRateLimiter` | Query: `limit?` (default 20, max 50) | `Game[]` from the user's library taste profile, each with `recommendation.reasons`; `[]` while the library says nothing about the taste. Cached per user. | +| POST | `/api/games/:gameId/ddl/check` | JWT + `sensitiveEndpointLimiter` (game must belong to the user) | `{ links?, containerBase64?, downloaderId? }` | Per-link check with Real-Debrid (400 if no link or no enabled Real-Debrid downloader, 502 if Real-Debrid cannot be reached). | +| POST | `/api/games/:gameId/ddl/links` | JWT + `sensitiveEndpointLimiter` (game must belong to the user) | `{ links?, containerBase64?, downloaderId?, title?, archivePassword? }` (up to 500 links, container up to 1 MB) | `{ success, id, links }`: the links sent to Real-Debrid as one download job. | | POST | `/api/games/match-and-add` | JWT | `{ title: string }` — manual `typeof` check, no validator | 201 `Game`; 404 if no IGDB match; 409 if already in collection | | POST | `/api/games/:gameId/blacklist` | JWT (explicit) | `{ releaseTitle: string (required, ≤500) }` via `insertReleaseBlacklistSchema.safeParse` | 201 blacklist entry; 400 invalid; 403/404 via ownership check | | GET | `/api/games/:gameId/blacklist` | JWT (explicit) | — | Blacklist entries array; 403/404 via ownership check | @@ -99,6 +103,22 @@ configuration routes (see | DELETE | `/api/games/:gameId/blacklist/:id` | JWT (explicit) | — | 204; 404 if entry not found | | DELETE | `/api/games/:id/downloads/:downloadId` | JWT + `sanitizeGameId`, `sanitizeDownloadId`, `validateRequest` | — | `{ success: true }`; 404 if game/download not found | +## Tags + +Your own labels for games. Tags belong to the user; a game must belong to the caller to be tagged. + +| Method | Path | Request Body | +| ------ | -------------------------------- | --------------------------------------------------- | +| GET | `/api/tags` | — | +| POST | `/api/tags` | `{ name, color? }` | +| GET | `/api/tags/:tagId` | — | +| PATCH | `/api/tags/:tagId` | Any of `name`, `color` (`color: null` clears it) | +| DELETE | `/api/tags/:tagId` | — | +| GET | `/api/tags/:tagId/games` | — | +| GET | `/api/games/:gameId/tags` | — | +| POST | `/api/games/:gameId/tags` | `{ tagId }` (409 when the game already has the tag) | +| DELETE | `/api/games/:gameId/tags/:tagId` | — | + ## Collections User-defined groups of games. A `manual` collection holds an explicit list of games; a `smart` collection stores `rules` and its games are computed from the user's library on every read. Hidden games and games excluded by the user's content-filter settings are never included. All routes require JWT and only see the requester's own collections (404 otherwise). @@ -126,24 +146,25 @@ User-defined groups of games. A `manual` collection holds an explicit list of ga ## Downloaders -| Method | Path | Auth Required | Request Body | Response | -| ------ | ---------------------------------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | -| GET | `/api/downloaders` | JWT | — | `Downloader[]` (passwords masked as `********`) | -| GET | `/api/downloaders/enabled` | JWT | — | `Downloader[]` (masked) | -| GET | `/api/downloaders/storage` | JWT | — | `{ downloaderId, downloaderName, freeSpace, error? }[]`, cached 30s server-side | -| GET | `/api/downloaders/:id` | JWT | — | `Downloader` (masked); 404 if not found | -| POST | `/api/downloaders` | JWT + `sensitiveEndpointLimiter`, `sanitizeDownloaderData`, `validateRequest` | `{ name (1–200), type (transmission\|rtorrent\|qbittorrent\|sabnzbd\|nzbget), url (full URL or bare hostname/IP), username?, password?, enabled?, downloadPath? (no ".."), label?, urlPath? }` via `insertDownloaderSchema`; SSRF-checked via `isSafeUrl` | 201 `Downloader` (masked); 400 invalid/unsafe URL | -| PATCH | `/api/downloaders/:id` | JWT + `sensitiveEndpointLimiter`, `sanitizeDownloaderUpdateData`, `validateRequest` | Partial of above plus `priority?`, `category?`; `password` equal to the redacted placeholder = keep unchanged | Updated `Downloader` (masked); 404 if not found | -| DELETE | `/api/downloaders/:id` | JWT + `sensitiveEndpointLimiter` | — | 204; 404 if not found | -| POST | `/api/downloaders/test` | JWT | `{ type, url, port?, useSsl?, urlPath?, username?, password?, downloadPath?, category?, label?, allowInsecureLan?, ... }` — manual checks, SSRF-checked | Connection test result object | -| POST | `/api/downloaders/:id/test` | JWT | — | Connection test result for saved downloader; 404 if not found | -| POST | `/api/downloaders/:id/downloads` | JWT + `sensitiveEndpointLimiter`, `sanitizeDownloaderDownloadData`, `validateRequest` | `{ url, title, category?, downloadPath?, priority?, downloadType?, password? (≤200 chars) }` | Add-download result; 404 downloader not found; 400 if downloader disabled | -| GET | `/api/downloaders/:id/downloads` | JWT | — | Downloads array from that client; 404 if downloader not found | -| GET | `/api/downloaders/:id/downloads/:downloadId` | JWT | — | Single download status object; 404 if not found | -| GET | `/api/downloaders/:id/downloads/:downloadId/details` | JWT | — | Detailed info (files, trackers); 404 if not found | -| POST | `/api/downloaders/:id/downloads/:downloadId/pause` | JWT | — | Pause result object | -| POST | `/api/downloaders/:id/downloads/:downloadId/resume` | JWT | — | Resume result object | -| DELETE | `/api/downloaders/:id/downloads/:downloadId` | JWT | Query: `deleteFiles?` | Removal result object | +| Method | Path | Auth Required | Request Body | Response | +| ------ | ---------------------------------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| GET | `/api/downloaders` | JWT | — | `Downloader[]` (passwords masked as `********`) | +| GET | `/api/downloaders/enabled` | JWT | — | `Downloader[]` (masked) | +| GET | `/api/downloaders/storage` | JWT | — | `{ downloaderId, downloaderName, freeSpace, error? }[]`, cached 30s server-side | +| GET | `/api/downloaders/:id` | JWT | — | `Downloader` (masked); 404 if not found | +| POST | `/api/downloaders` | JWT + `sensitiveEndpointLimiter`, `sanitizeDownloaderData`, `validateRequest` | `{ name (1–200), type (transmission\|rtorrent\|qbittorrent\|sabnzbd\|nzbget), url (full URL or bare hostname/IP), username?, password?, enabled?, downloadPath? (no ".."), label?, urlPath? }` via `insertDownloaderSchema`; SSRF-checked via `isSafeUrl` | 201 `Downloader` (masked); 400 invalid/unsafe URL | +| PATCH | `/api/downloaders/:id` | JWT + `sensitiveEndpointLimiter`, `sanitizeDownloaderUpdateData`, `validateRequest` | Partial of above plus `priority?`, `category?`; `password` equal to the redacted placeholder = keep unchanged | Updated `Downloader` (masked); 404 if not found | +| DELETE | `/api/downloaders/:id` | JWT + `sensitiveEndpointLimiter` | — | 204; 404 if not found | +| POST | `/api/downloaders/test` | JWT | `{ type, url, port?, useSsl?, urlPath?, username?, password?, downloadPath?, category?, label?, allowInsecureLan?, ... }` — manual checks, SSRF-checked | Connection test result object | +| POST | `/api/downloaders/:id/test` | JWT | — | Connection test result for saved downloader; 404 if not found | +| POST | `/api/downloaders/:id/downloads` | JWT + `sensitiveEndpointLimiter`, `sanitizeDownloaderDownloadData`, `validateRequest` | `{ url, title, category?, downloadPath?, priority?, downloadType?, password? (≤200 chars) }` | Add-download result; 404 downloader not found; 400 if downloader disabled | +| GET | `/api/downloaders/:id/downloads` | JWT | — | Downloads array from that client; 404 if downloader not found | +| GET | `/api/downloaders/:id/downloads/:downloadId` | JWT | — | Single download status object; 404 if not found | +| GET | `/api/downloaders/:id/downloads/:downloadId/link` | JWT | — | `{ url }`, a fresh short-lived download link (link-only TorBox downloaders); 404 downloader not found or no link yet; 400 if the downloader gives no links | +| GET | `/api/downloaders/:id/downloads/:downloadId/details` | JWT | — | Detailed info (files, trackers); 404 if not found | +| POST | `/api/downloaders/:id/downloads/:downloadId/pause` | JWT | — | Pause result object | +| POST | `/api/downloaders/:id/downloads/:downloadId/resume` | JWT | — | Resume result object | +| DELETE | `/api/downloaders/:id/downloads/:downloadId` | JWT | Query: `deleteFiles?` | Removal result object | ## Root Folders / Library Scan @@ -374,6 +395,14 @@ documented under [Settings](#settings). | ------ | -------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | POST | `/api/stats/discord-share` | JWT | `{ image: string (data URI, png/jpeg/gif/webp base64), message?: string }` — manual checks; webhook URL must match Discord's domain pattern | `{ success: true }`; 400 on missing/invalid config or image; 502 if Discord request fails | +### Backlog quests + +`server/quest-routes.ts` — requires a JWT. + +| Method | Path | Auth Required | Request Body | Response | +| ------ | ------------- | ------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| GET | `/api/quests` | JWT | — | `{ enabled, current, history, medals, backlogProgress }`; makes sure the week and month have their quests and updates their progress; days follow `timeZone` (IANA) or `tz` | + ## Play time All routes need a JWT; game routes also check that the game belongs to the caller (404 otherwise). @@ -427,16 +456,18 @@ is documented under [Games](#games). Mounted under `/api/activity` and `/api/system` (JWT). Activity only sees the requester's own downloads and games. -| Method | Path | Request | Response | -| ------ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| GET | `/api/activity/history` | Query: `eventType?` (`grabbed`, `completed`, `imported`, `failed`, `needs_review`, `removed`, `blocklisted`), `search?` (≤200), `limit?` (1–200, default 50), `offset?` (≥0) | `{ events, total }`, newest first; 400 on invalid query | -| DELETE | `/api/activity/blocklist` | — | `{ removed }`: unblocks every release of the user's games | -| GET | `/api/system/tasks` | — | `{ tasks }`: each task has `name`, `title`, `description`, `intervalMs`, `running`, `lastStartedAt`, `lastFinishedAt`, `lastDurationMs`, `lastResult` (`success`\|`error`), `lastError`, `lastTrigger` (`schedule`\|`manual`\|`startup`), `nextRunAt` | -| POST | `/api/system/tasks/:name/run` | — | 202 `{ task }` and the job runs in the background (progress over Socket.io: `task:started`, `task:finished`); 404 unknown task; 409 if already running | +| Method | Path | Request | Response | +| ------ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| GET | `/api/activity/history` | Query: `eventType?` (`grabbed`, `completed`, `imported`, `failed`, `needs_review`, `removed`, `blocklisted`), `search?` (≤200), `limit?` (1–200, default 50), `offset?` (≥0) | `{ events, total }`, newest first; 400 on invalid query | +| DELETE | `/api/activity/blocklist` | — | `{ removed }`: unblocks every release of the user's games | +| GET | `/api/system/tasks` | — | `{ tasks }`: each task has `name`, `title`, `description`, `intervalMs`, `running`, `lastStartedAt`, `lastFinishedAt`, `lastDurationMs`, `lastResult` (`success`\|`error`), `lastError`, `lastTrigger` (`schedule`\|`manual`\|`startup`), `nextRunAt` | +| POST | `/api/system/tasks/:name/run` | — | 202 `{ task }` and the job runs in the background (progress over Socket.io: `task:started`, `task:finished`); 404 unknown task; 409 if already running | +| GET | `/api/system/setup-wizard` | — | `{ state, seenRevision, currentRevision }`: `state` is `pending` (new install, wizard not run yet), `done`, or `never`; the revisions let the prompt come back once when a release adds steps (install that predates the wizard; offered once, never forced) | +| PUT | `/api/system/setup-wizard` | `{ state: "pending"\|"done" }` | `{ state }`; 400 on any other value | ## Release Scoring -Authenticated endpoints behind the **Settings → Discovery & Downloads → Release Scoring** card. Each user has one release profile and any number of custom formats; both are created with defaults (and the old preferred release groups converted) the first time they are read. +Authenticated endpoints behind the **Settings → Release Scoring** card. Each user has one release profile and any number of custom formats; both are created with defaults (and the old preferred release groups converted) the first time they are read. | Method | Path | Request body | Response | | ------ | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | @@ -474,6 +505,34 @@ router), both behind the global auth gate plus explicit `authenticateToken`. | GET | `/api/steam/playtime/import/preview` | — | `{ candidates: [{ gameId, title, steamMinutes, recordedMinutes, importMinutes, lastPlayedAt }], skipped }`; writes nothing; 400 if Steam is not set up; 502 on a Steam failure | | POST | `/api/steam/playtime/import` | `{ gameIds?: string[] }` | `{ sessionsAdded, minutesAdded }`. Imports one `steam_import` session per listed game (all when omitted); minutes are recomputed server side; 409 while a sync or import runs; 400 on another body | +### Steam achievements + +`server/steam-achievements-routes.ts` — turns the Steam achievements sync on or off, runs it and reads +the stored progress. All routes require a JWT. + +| Method | Path | Body | Response | +| ------ | ------------------------------ | ---------------------- | ----------------------------------------------------------------------------------------------------------------------- | +| GET | `/api/steam/achievements` | — | `{ available, enabled, lastSyncAt, ... }` status; `available` needs a Steam key and a linked Steam ID | +| PUT | `/api/steam/achievements` | `{ enabled: boolean }` | The same status; 400 on another body | +| POST | `/api/steam/achievements/sync` | — | `{ result, status }`; 400 if the sync is off or Steam is not set up; a run within 30 minutes of the last one is refused | +| GET | `/api/achievements/progress` | — | Stored progress per game (unlocked, total, rarest unlock), content filters applied | + +### RetroAchievements + +`server/retroachievements-routes.ts` — account, switch and sync for the RetroAchievements progress. All routes require a JWT. + +| Method | Path | Body | Response | +| ------ | ------------------------------------ | --------------------------------------- | --------------------------------------------------------------------------------------------- | +| GET | `/api/retroachievements` | — | Status: account saved, sync on or off, last run (never the key) | +| PUT | `/api/retroachievements/credentials` | `{ username: string, apiKey?: string }` | The status; the account is checked against RetroAchievements first; 400 invalid, 502 upstream | +| DELETE | `/api/retroachievements/credentials` | — | The status after removing the account and its stored progress | +| PUT | `/api/retroachievements` | `{ enabled: boolean }` | The status; 400 on another body | +| POST | `/api/retroachievements/sync` | — | `{ result, status }`; 400 if the sync is off; 409 if a sync is already running | + +### PlayStation and Xbox achievements + +`server/psn-routes.ts` and `server/xbox-routes.ts` expose the same account, switch and sync routes as RetroAchievements under `/api/psn-achievements` and `/api/xbox-achievements` (`GET`, `PUT /credentials`, `DELETE /credentials`, `PUT` with `{ enabled }`, `POST /sync`). The credentials body is `{ npsso: string }` for PlayStation (an unofficial sign-in token) and `{ apiKey: string }` for Xbox (an OpenXBL key); neither is ever returned. All routes require a JWT. + ### Owned Steam library `server/steam-library-routes.ts` — preview and import endpoints. diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index c1ddc05f4..4390f1c1a 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -136,7 +136,7 @@ flowchart TB ### Direct Steam owned-library import -The browser's Settings → Integrations view preselects untracked owned Steam games, +The browser's Settings → Connections view preselects untracked owned Steam games, with search and 50-row preview pages. `steam-library-routes.ts` provides preview, synchronous compatibility import, bulk-job start, progress and retry endpoints behind the authentication/CSRF boundary. `steam-library-jobs.ts` persists one diff --git a/docs/BACKLOG_ROULETTE.md b/docs/BACKLOG_ROULETTE.md index 697e354ac..bd2c9f61d 100644 --- a/docs/BACKLOG_ROULETTE.md +++ b/docs/BACKLOG_ROULETTE.md @@ -46,3 +46,45 @@ that match the page search and filters. The pool is fixed to **Currently playing**, and there is no **Mark as Playing** action because those games already have that status. The toolbar wraps at narrower widths to keep the picker reachable in both Library and Playing. + +## Weight the draw + +Open the extra options in the dialog to steer the draw instead of leaving it to +pure chance: + +- **Favour**: **Pure chance** (default), **Oldest first**, **Quick wins** or + **Highest rated**. The favoured games are drawn more often; the others can + still come up. +- **Mood**: **Any mood**, **Relaxing**, **Short and sweet** or **Co-op**, based on + the genres, themes and modes stored on each game. +- **Genre** and **Platform** narrow the pool further. +- **Only installed games** keeps only games already installed. + +**Not now** snoozes the shown game so it stays out of the next draws for a +while; the snooze is kept in this browser. **Bring them back** clears all +snoozes. A skipped game is not offered again until the pool runs dry. + +## Backlog quests + +If you would rather be given a goal than draw one, Questarr offers a few quests +each period from your owned and playing games. They show on **Stats** (with the +history) and on **Playing**. + +| Quest | Period | Goal | +| -------------------- | ------ | --------------------------------------------------------------- | +| **Weekend Sprint** | Week | Finish a game of under 6 hours from your backlog. | +| **Backlog Cleanup** | Week | Finish any game from your backlog. | +| **Backlog Slayer** | Month | Play or finish 3 games added more than a year before the month. | +| **Retro Explorer** | Month | Play or finish a game released before 2005. | +| **Monthly Finisher** | Month | Finish 2 games from your backlog. | + +Each period gets up to two quests, picked in a stable order so reloading the +page does not change them. Progress follows your status changes and play +sessions; only finishing a game that was in your backlog counts. A quest ends as +**Completed**, or **Missed** once its period is over, and stays in the history. +Completing quests unlocks medals (Sprinter, Backlog Slayer, Retro Explorer, +Regular for five quests). The card also shows how much of the month's backlog +you have cleared. + +Turn the quests, medals and backlog progress off in **Settings → Backlog +quests**. diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 120328922..6daf9044f 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +## [1.7.0] - Unreleased + ### Added - **macOS tarball**: tagged releases now attach `questarr--macos-arm64.tar.gz` and `questarr--macos-x64.tar.gz` (with SHA-256 files). They bundle Node.js; `install.sh` installs Questarr for the current user (no sudo) in `~/Library/Application Support/Questarr` as a launchd agent that starts at login and listens on `localhost:5000`, and `uninstall.sh` removes it while keeping your data. The archives are not signed or notarized (Homebrew tap to follow), and the new release job has not run on a real tag yet. @@ -12,26 +14,108 @@ All notable changes to this project will be documented in this file. - **RetroAchievements** (Questarr-mgmt#78): the achievement sync has a second provider. Save a RetroAchievements username and Web API key in **Settings → Connections**; retro games are matched by title and console. - **Setup wizard**: a step-by-step wizard (`/setup-wizard`) asks which platforms you manage games for, whether Questarr should search and download, and whether you want notifications, then shows only the settings that apply: IGDB, platforms, indexers, download clients, automatic search, import, Steam, RetroAchievements, NexusMods, Apprise, quests and error reports. A new install opens it right after the account is created. Installs that predate it see a dismissible prompt once, and the wizard then skips what is already configured (a switch turns that off). It can be run again from **Settings → General → Setup wizard**. State is kept by `GET`/`PUT /api/system/setup-wizard` (Questarr-mgmt#124). - **Setup wizard, Xbox and PlayStation steps and a prompt for new steps**: the wizard now has an Xbox (OpenXBL key) and a PlayStation (NPSSO token) step. It remembers the wizard revision you last finished or dismissed, so when a later release adds steps, the prompt comes back once, naming them ("New in Questarr: …"). Finishing or dismissing it again clears it. `GET /api/system/setup-wizard` also returns `seenRevision` and `currentRevision` (Questarr-mgmt#124). +- **Weekly and monthly backlog quests**: each week and month Questarr picks a few quests from your owned and playing games (Weekend Sprint, Backlog Cleanup, Backlog Slayer, Retro Explorer, Monthly Finisher). Progress follows status changes and play sessions, finished and missed quests are kept as history, medals are earned along the way, and the month's backlog progress is shown on **Stats** and **Playing**. Turn them off in **Settings → Backlog quests**. See [Backlog roulette](BACKLOG_ROULETTE.md#backlog-quests) (#1416). +- **ZimaOS store**: Questarr can be installed on ZimaOS from its own third-party store, and the home-server guide and the release checklist now cover it. The CasaOS AppFile is kept as the legacy option. See [Home server apps](HOME_SERVER_APPS.md#zimaos) (#1408). +- **Steam achievements sync**: turn it on in **Settings → Steam** to keep the achievement progress of your owned and playing Steam games up to date (every 12 hours, or with **Sync now**). Library cards show the unlocked percentage, the **Stats** page gets an achievements summary (rate, games tracked, rarest unlock), and a notification tells you when new achievements were unlocked. The first sync only records your current progress, so nothing floods you at the start. The Steam profile's Game details must be public (#1419). A game's details now list its achievements, filterable by All, Unlocked and Locked, and say what is missing (Steam key, Steam ID, linked Steam app, or a private profile) instead of hiding the section (#1427). +- **Link-only mode for TorBox**: TorBox downloaders no longer copy files to your server by default. Finished downloads stay on TorBox and the **Downloads** page shows **Copy link** and **Download** buttons that request a fresh link on demand (a zip when the torrent holds several files); nothing is imported. Link-only is the default for every TorBox downloader that has no explicit choice; switch **Fetch files to this server** on to copy files to a staging folder and import them. See [TorBox](TORBOX.md) (#1418, #1426). +- **Backlog roulette, weighted draws**: choose what to **Favour** (Pure chance, Oldest first, Quick wins, Highest rated), a **Mood** (Relaxing, Short and sweet, Co-op), a genre, a platform and **Only installed games**; **Not now** snoozes a game for a while and **Bring them back** clears the snoozes. See [Backlog roulette](BACKLOG_ROULETTE.md) (#1417). +- **TorBox downloader**: **Downloaders → Add Downloader** has a new **TorBox** type. Like Real-Debrid, TorBox fetches the torrent on its servers and Questarr copies the finished files to a local staging folder and imports them. Paste an API key (stored encrypted on the server) and set the **Staging Path**. Torrents other than the ones Questarr added are left alone, and a failed copy is retried with a growing delay. Not tested against a real account yet (Questarr-mgmt#44, #1414). See [TorBox](TORBOX.md). +- **Recommended for You**: **Discover** has a new **Recommended for You** row built from your own library: your genres, themes, developers and game modes, weighted by your ratings and by what you play and finish. Each game says why it is suggested ("Because you rated Hades 9/10", "More from…"), games already in your library, wishlist or hidden are never suggested, and the row only appears once your library says something about your taste. It is computed per user and cached (Questarr-mgmt#74, #1413). +- **Direct-download RSS feeds**: a feed can be marked **Items carry file-hoster download links (send them to Real-Debrid)**. Each item then keeps the hoster links found in its content (blog pages and hosts Real-Debrid cannot unrestrict are dropped), and an item matched to a library game gets a button that opens **Add download links** with those links filled in. See [RSS feeds](RSS.md#direct-download-feeds) (Questarr-mgmt#109, #1412). +- **Direct-download links through Real-Debrid**: with a Real-Debrid downloader set up, the **Download** menu of a game has **Add download links**. Paste the file-hoster links (one per line, or a whole forum post or BBCode: Questarr picks out the links) or attach a DLC, CCF or RSDF container, and Real-Debrid fetches them. Questarr then imports the files like any other download. Up to 500 links per job. See [Real-Debrid](REAL-DEBRID.md#direct-download-links) (#1411). +- **Setup diagnostics**: a new **Diagnostics** page (under System) checks the library root, root folders and path mappings, every indexer and download client, and the tools (7-Zip, unrar, ClamAV, Apprise), and explains how to fix each problem. It changes nothing. **Copy report** gives a report with hosts, keys and personal paths redacted, ready to paste into an issue (#1405). +- **Persistent progress for manual imports**: a manual import now shows its progress (starting, security scan, extraction, transfer) in the review dialog and keeps it if you close the dialog or reload. Reopening the review shows the operation in progress or its result instead of starting a second one (#1404). +- **Real-Debrid downloader**: **Downloaders → Add Downloader** has a new **Real-Debrid** type for premium accounts. Real-Debrid fetches the torrent on its servers, then Questarr copies the finished files to a local staging folder and runs the normal import on them. Connect with the device-code flow (**Connect Real-Debrid**, tokens stored encrypted on the server) or paste a private API token; expired tokens refresh by themselves. Pause and resume are not available (#1395). See [Real-Debrid](REAL-DEBRID.md). +- **Backlog burn-down**: the **Statistics** page has a **Backlog burn-down** section for the games you own but have not finished (**Owned** or **Playing**). It shows the games left, the time left from the IGDB Time to Beat minus what you played, your pace over the last 28 days and the date the backlog would be cleared, with a chart per week or month of the backlog size and the games completed. Questarr now records each status change of a game to draw it, with a starting point for the games you already had (#1397). See [Play time](PLAY_TIME.md#backlog-burn-down). +- **Play time statistics range and export**: the play time statistics gain a **Range** selector (all time, last 7, 30 or 90 days, last 12 months or custom days), a heatmap of play per day, the split by weekday and time of day, session length statistics (average, median and length bands) and **Export CSV / JSON** of the sessions of the selected range (#1396). See [Play time](PLAY_TIME.md#range-and-export). +- **Import Steam play time from before tracking**: **Settings → Steam → Steam play time → Preview import** lists, per game, what Steam holds minus what Questarr already recorded, and **Import** records the games you leave ticked as one estimated session each (shown as "Steam · before tracking"). It never runs by itself and imports a game only once (#1398). +- **Helm chart on GHCR**: the Helm chart is now published as an OCI chart, so you can install it with `helm install questarr oci://ghcr.io/doezer/charts/questarr --namespace questarr --create-namespace` instead of from a clone (chart version 0.1.4). The chart is also listed on [Artifact Hub](https://artifacthub.io/packages/search?repo=questarr), and the README has its badge. A version that is already published is never overwritten (#1389). +- **Start the container as a non-root user**: the Docker image now starts when the platform runs it as a fixed non-root user, such as TrueNAS Apps, Kubernetes `runAsUser` or `docker run --user`. `PUID` and `PGID` are ignored in that case, and the entrypoint only checks that `/app/data` (and an existing database file) is writable by that user, with a clear error if it is not (Questarr-mgmt#104). +- **Support diagnostics**: **Send Logs** and the automatic error reports now attach a short, secret-free description of your instance (runtime, database engine, the shape of your indexer and download client settings, a few behaviour switches and a digest of recent errors). It never contains a host name, address, credential, URL path or query string, and logs that embed secrets are redacted more thoroughly (#1354). Shared logs also hide user names and keep only the kind of each IP address (local, private or public), error entries keep their message and stack, and reports are triaged and de-duplicated before they reach the issue tracker (#1442, #1447). - **Updates and DLC in subfolders**: **Settings → Import** has a new **Updates and DLC in subfolders** switch. When on, a release recognized as an update or DLC is imported into `update/` or `dlc/` inside the game's folder (`//update/`, the layout RomM reads) instead of next to the base game; a single file keeps its name, a second update joins the existing folder without overwriting a file, and the game's own entry in the library does not move. A pack that also contains the base game ("Base Game + Update") stays where it is, and extras and packs are unchanged. Off by default, so imports behave as before; games already imported are not moved (Questarr-mgmt#120). - **Fix misplaced RomM folders**: **Settings → Import → RomM → Fix misplaced platform folders** lists games stored in a RomM platform folder that none of their platforms belongs to (for example a Switch 2 game left in `win`) and moves them to the right folder after confirmation, updating the game and its files and asking RomM to rescan. An existing destination is never overwritten (Doezer/Questarr#1393). - **Folder for single-file releases**: **Settings → Import** has a new **Folder for single-file releases** switch. When on, a release that is one file is imported into its own folder named like the game, inside the platform folder, as multi-file releases already are. On by default, including for existing installs; switch it off to keep a single file directly in the platform folder (Doezer/Questarr#1375). - **Replace the previous version after an upgrade**: **Settings → Import** has a new **Previous version after an upgrade** choice. With **Move it to .questarr-replaced** or **Delete it**, a new full release of a game that already has files in your library takes their place: the old version is kept until the new one is imported, then archived under `.questarr-replaced` in the library root or deleted, and it is put back if the import fails. When both versions use the same folder the import no longer waits for a manual review. The replacement is recorded in **Activity → History** and notified. Off by default (**Keep it**), which leaves imports exactly as before; DLC, updates and extras never replace anything. +- **Update patch with an auto-downloaded release**: **Settings → Search & Downloads → Auto-download rules** has a new **Include updates automatically** switch. When auto-download takes a release for a wanted game, it also takes the newest update patch that names that release's version as its starting point. The game is not marked as downloaded by the patch alone: its status stays as it was while the main release is still downloading, and the patch is only imported once the main release is. Off by default (Questarr-mgmt#40, #1406). +- **Extras and update-only patches**: the download dialog (**Download with Updates & Extras?**) lists the smaller extras found for the game (soundtrack, artbook and similar, up to a size set in **Auto-download rules → Suggest extras up to (% of the game's size)**, 25% by default) so you can tick the ones you want with the main game. A new **Prefer update-only releases** switch makes the automatic upgrade take a patch that starts from the installed version over a full release of the same new version, which is a much smaller download. Off by default (Questarr-mgmt#40, #1403). - **Automatic upgrades of owned games**: the **Updates for Owned Games** setting (and the per-game **Updates** field) has a new **Download automatically** choice. With it, the scheduled search downloads a release whose name proves a newer version than the installed one: a full release with a higher version, or an update patch that says it starts from the installed version. Anything it cannot prove (no readable version, a different numbering scheme, a patch from another base, an unknown installed version) is left alone and flagged as before. The game stays owned while the new version downloads, each automatic upgrade is listed in **Activity → History** as **Upgrade** with the reason, and an "Upgrade Started" notification is sent. Opt-in: the default stays **Notify me**. It needs a scoring profile (Questarr-mgmt#97). -- **Replace owned releases with better-scored ones**: for owned games set to **Download automatically**, **Settings → Discovery & Downloads → Download Rules → Replace owned releases with better-scored ones** also swaps the release you downloaded for a better-scored release of the same version, until the installed release reaches the **Stop at score** cutoff. A release must score at least **Minimum score gain** points more (10 by default) to be taken. The installed release is the last full release Questarr downloaded for the game, scored in the same search as the others: when it is no longer listed by your indexers, or carries another version than the installed one, nothing is swapped. Off by default (Questarr-mgmt#97). -- **Auto-download the best-scored release**: with **Settings → Discovery & Downloads → Download Rules → Auto-download the best-scored release** switched on, auto-download no longer stops when several releases remain for a wanted game: it takes the one your scoring profile ranks first, skipping a release that already failed for that game. Off by default, so the "Multiple Results Found" notification is unchanged until you opt in; it needs an active scoring profile and auto-download. +- **Replace owned releases with better-scored ones**: for owned games set to **Download automatically**, **Settings → Search & Downloads → Download Rules → Replace owned releases with better-scored ones** also swaps the release you downloaded for a better-scored release of the same version, until the installed release reaches the **Stop at score** cutoff. A release must score at least **Minimum score gain** points more (10 by default) to be taken. The installed release is the last full release Questarr downloaded for the game, scored in the same search as the others: when it is no longer listed by your indexers, or carries another version than the installed one, nothing is swapped. Off by default (Questarr-mgmt#97). +- **Auto-download the best-scored release**: with **Settings → Search & Downloads → Download Rules → Auto-download the best-scored release** switched on, auto-download no longer stops when several releases remain for a wanted game: it takes the one your scoring profile ranks first, skipping a release that already failed for that game. Off by default, so the "Multiple Results Found" notification is unchanged until you opt in; it needs an active scoring profile and auto-download. +- **Finish-by goal**: pick a target day for a game in its **Playtime** section and Questarr compares it with the IGDB Time to Beat and your pace of the last 14 days (**On track**, **Behind**, **Overdue** or **Done**, with the time left and the time needed per day). The **Statistics** page lists every unfinished game with a goal, soonest first. See [Play time](PLAY_TIME.md#finish-by-goals) (#1351). +- **Installed version detection**: a scan and an import now read the installed version of a game from `version.txt`, a GOG `goggame-*.info`, a Steam `appmanifest_*.acf` or an `.nfo` file, and the game page shows where the version comes from. A version you typed yourself is kept until a strictly newer download replaces it (#1342). +- **Admin API keys on more integration routes**: an `admin`-scope API key can now call the integration ping and library read routes (#1357). - **Edit, merge and split play sessions**: manual and timer sessions can now be corrected from a game's Playtime section (new start and end, two or more sessions merged into one, one session cut in two), with `PATCH /api/games/:id/play-sessions/:sessionId`, `POST …/play-sessions/merge` and `POST …/:sessionId/split`. Imported and estimated sessions stay delete-only (Questarr-mgmt#94). See [Play time](PLAY_TIME.md#edit-merge-and-split). - **Outbound webhooks**: **Settings → Notifications → Outbound Webhooks** (and `/api/webhooks`, also reachable with an `admin`-scope API key) sends signed JSON events to your own automation when a download completes or fails, an import fails, or a game is released or delayed. Requests carry an HMAC-SHA256 signature of the timestamp and body, failed deliveries are retried up to three times, a **Send test** button sends a sample event, and the last 50 attempts of each webhook are listed under **Recent deliveries**. See [Webhooks](WEBHOOKS.md) (Questarr-mgmt#81). - **Game tags**: put your own labels on games. Manage them in **Settings → Appearance → Tags**, add or remove them from a game's page (typing a new name creates the tag) and filter the library by tag from the **Filters** panel. Tags are private to your account (Questarr-mgmt#75, #1323). The Backlog roulette can also draw from a single tag. - **Play status sync**: the new `POST /api/integration/play-status` route lets Playnite push the completion status of games from any library it reads (Steam, GOG, Epic). Statuses are mapped to Questarr's, a playing, shelved or completed status you set yourself is never overwritten (a status written by an earlier sync can be replaced), wanted games are only promoted on request, and the platform is recorded on the game. The Playnite extension (1.2.0) sends it with **Sync play status to Questarr**, or after each library update when switched on (off by default; Questarr-mgmt#86). - **GOG library and play time**: the Playnite extension (1.3.0) can add the games of your GOG library to Questarr as owned (**Import GOG library into Questarr**; a title IGDB cannot match to the same game is skipped, never added wrongly) and send the play time Playnite already holds for them (**Import GOG play time into Questarr**). The play time becomes one estimated session per game, minus what Questarr already recorded, so running it again adds nothing. New routes `POST /api/integration/library/import` and `POST /api/integration/play-time-totals` (Questarr-mgmt#87). +- **Owned Steam library import**: from **Settings → Connections**, preview your public Steam library and import the games you select (all untracked games are selected by default, thousands at a time) as **Owned**. The import runs on the server with saved progress, survives restarts and can be retried for the games that failed. Existing games keep their status, ratings and files. See [Steam library import](STEAM_LIBRARY.md) (#1273). +- **Personal screenshots**: upload your own JPEG, PNG or WebP images (up to 8 MB) to a saved game from **Media → Your screenshots**, next to the trailers and IGDB artwork. Existing journal images appear there too. See [Personal screenshots](PERSONAL_SCREENSHOTS.md) (#1296, requested in #1287). +- **Game modes**: IGDB game modes (single player, multiplayer, co-op...) are stored, shown on the game details and available as a **Game mode** rule for smart collections (#1295). +- **Import into library**: a game found in an external root folder can be copied, moved or hardlinked into your library root with the configured naming pattern from **Library → Library Import**. Questarr then points the game at its new files (#1310, Questarr-mgmt#49). See [Library import](LIBRARY_IMPORT.md#discover-games-already-on-disk). +- **Automatic root folder rescan**: a new **Auto rescan** setting in **Library Import** rescans your root folders every hour, 6 hours, 12 hours, day or week (off by default). A rescan only looks up new or unresolved folders on IGDB. It is listed as **Library rescan** under **System Tasks** (#1308). +- **Search fallback**: when the full game title finds nothing, the search retries with simpler titles (without a possessive publisher prefix, edition words, punctuation or subtitle) and tells you which one it used. Sequels are still refused. Releases whose protocol none of your download clients supports (Usenet with only torrent clients, or the opposite) are flagged and cannot be downloaded (#1312). +- **Persistent classification cache**: release verdicts are now kept in the database as well as in memory (7 days, 20,000 rows, pruned hourly), for every classification mode and for the historical Jev check, so a restart or a Docker update no longer repeats paid cloud calls. A new model, provider endpoint or model, mode, confidence bar or pipeline version never reuses an older verdict, a failing layer's answer is never stored, and **Settings → Release classification → Clear classification cache** empties it (Questarr-mgmt#59, #1311). +- **Indexer protection**: searches no longer hammer indexers shared with Sonarr, Radarr or Prowlarr. A search the browser abandoned stops its indexer requests, identical simultaneous searches share one request, and each indexer serves 2 searches at once per line (`SEARCH_MAX_CONCURRENT_PER_INDEXER`); interactive searches and auto-search have separate lines, so an indexer can receive up to 2 of each at the same time. `SEARCH_INDEXER_TIMEOUT_MS` sets the timeout of one indexer request, and each indexer can carry its own **Request timeout** (1 to 300 seconds) in its settings. An indexer that answers 429 is left alone for its `Retry-After`, or for a growing delay (30 s, 1 min, 2 min... up to 15 min) when it gives none, and its search errors say so instead of querying it again. See [Indexers](INDEXERS.md#protect-shared-indexers) (#1315, #1337, Questarr-mgmt#61). +- **Update policy for owned games**: **Settings → Search & Downloads** gets an **Updates for Owned Games** default (**Notify me**, **Off** or **Download automatically**) and each game's details an **Updates** field that can follow it or override it. With **Off**, auto-search no longer looks for newer versions or repacks of that game and clears the update badge it showed (Questarr-mgmt#53, #1339). +- **Needs Review log**: a folder that stays in Needs Review is explained in the server log (query sent to IGDB, candidates returned, best score against the 0.85 threshold) (#1340). - **Epic library and play time**: the Playnite extension (1.4.0) gets **Import Epic library into Questarr** and **Import Epic play time into Questarr**, the same two commands as for GOG, reading the library through Playnite's own Epic plugin (no Epic API, no scraping). Games are recorded with source `epic`. No server change (Questarr-mgmt#88). - **Play status source and Playnite sync state**: a game whose status was written by a Playnite sync says so on its page ("Synced from Steam/GOG/Epic") with a **Keep mine** button that hands the status back to you (a playing, shelved or completed status you own is never overwritten by a sync), and the settings page lists when Playnite last sent statuses, a library import and play time, what each request did and the last failure. New route `GET /api/playnite/sync` (Questarr-mgmt#89). - **Backup and restore**: the new **Backups** page (under Activity) saves the database, `config.yaml` and optionally the journal screenshots to a checksummed `.zip` in `data/backups`, on SQLite and on Postgres. A scheduled backup runs every 7 days (kept 28 days; both settable), a manual one on demand; backups can be downloaded and restored from a saved backup or an uploaded file. A restore checks the archive, refuses a backup from a newer Questarr or the other database engine, saves a "Before restore" copy and applies at the next start. See [Backups](BACKUPS.md) (Questarr-mgmt#5). - **Play time**: start and stop a timer on a playing game or add a session by hand; sessions appear in the game's Playtime section and journal, and the Statistics page shows hours per week and month, most played games, genres, platforms and streaks. Days follow your time zone with daylight saving time applied per session (#1318, #1320, Questarr-mgmt#71, Questarr-mgmt#84). See [Play time](PLAY_TIME.md). - **Playnite play time**: the Playnite extension (1.1.0) can send each finished session to the new `POST /api/integration/play-sessions` route. The end is the moment the game closed and the start is derived from the duration Playnite reports, so a session near midnight can land on the neighbouring day. Off by default; sessions that fail for a retryable reason (server unreachable, rate limit, server error) wait in a bounded local queue of 200 entries, and rejected ones are dropped (Questarr-mgmt#83). -- **Steam play time**: **Settings → Steam → Steam play time** records the time you play on Steam. Each sync (every 6 hours or **Sync now**) adds the growth of a game's Steam total as one estimated session, labelled "Steam · estimated". The first sync only notes your current totals, minutes already recorded by hand, with the timer or from Playnite are subtracted, and estimated sessions stay out of the longest session and the streaks. Off by default (Questarr-mgmt#82). See [Play time](PLAY_TIME.md#steam-play-time). +- **Steam play time**: **Settings → Steam → Steam play time** records the time you play on Steam. Each sync (every 6 hours or **Sync now**) adds the growth of a game's Steam total as one estimated session, labelled "Steam · estimated". The first sync only notes your current totals, minutes already recorded by hand, with the timer or from Playnite are subtracted, and estimated sessions stay out of the longest session and the streaks. Off by default (#1325, Questarr-mgmt#82). See [Play time](PLAY_TIME.md#steam-play-time). - **Steam Web API key in Settings**: the key for the library import, the play-time sync and the achievements can now be saved in **Settings → Steam** instead of only through `STEAM_API_KEY`. It is stored encrypted, never shown again, and overrides the environment variable until you remove it. -- **Persistent classification cache**: release verdicts are now kept in the database as well as in memory (7 days, 20,000 rows, pruned hourly), for every classification mode and for the historical Jev check, so a restart or a Docker update no longer repeats paid cloud calls. A new model, provider endpoint or model, mode, confidence bar or pipeline version never reuses an older verdict, a failing layer's answer is never stored, and **Settings → Release classification → Clear classification cache** empties it (Questarr-mgmt#59). +- **Needs Review covers and folder tags**: each Needs Review candidate shows its IGDB cover and release year, and the scan asks IGDB for ten candidates per folder. A year in the folder name (`Celeste (2018)`) now only breaks ties, and `{igdb-1234}` or `{steam-620}` in a folder name selects the game exactly. See [Library import](LIBRARY_IMPORT.md) (#1317). + +### Changed + +- **Settings reorganized**: each section now has its own page under `/settings` (for example `/settings/connections`), listed in a sidebar: **General**, **Search & Downloads**, **Release Scoring**, **Notifications**, **Connections**, **Import**, **Security** and **System**. Release scoring and the release classification cards moved to their own **Release Scoring** page, and the IGDB card comes first under **Connections** (previously **Integrations**). Links to the classification review from older notifications still open the right card. Each Settings card now shows unsaved changes and saves on its own, muted text and primary buttons meet WCAG AA contrast, and the page width is capped (#1378, #1380, #1381, #1382, #1390). + +### Fixed + +- **Import into the right platform folder**: an import no longer ignores the game's target platform when choosing the platform folder, so a game goes into the folder of the platform it was added for (#1457). +- **SABnzbd single-file jobs**: a SABnzbd job that is a single file is now imported from the correct source path instead of a wrong one (#1456). +- **Release matching on titles with accents and short words**: the fallback that matches a release to a game now compares whole words, ignores accents and apostrophe forms, and matches glued release names on whole release words with a guard against sequels, so a short title no longer matches a longer one by accident (#1449, supersedes #1349, thanks to @egamer24). +- **Wrong update ticked in the bundle dialog**: updates ticked in the download dialog are now tracked by release instead of list position, so fresh search results arriving while the dialog is open can no longer shift a tick onto a different (even blacklisted) update (Questarr-mgmt#70, #1433). +- **Version detection in release names**: the version extraction used by automatic upgrades recognises more repackers and no longer trusts names that cannot be read reliably, so such releases are left alone instead of being taken as an upgrade (Questarr-mgmt#97, #1409). +- **Torznab results with an NZB link**: a Torznab result whose link is an `.nzb` file is treated as a usenet download and sent to your usenet client, instead of failing as a torrent (#1233, #1401). +- **Remakes scored as spinoffs**: a remake release is no longer scored as a spinoff of another game when IGDB knows no separate remake of that title (#1365, #1407). +- **RomM folder for Switch 2**: a Switch 2 game imported into RomM goes to the `switch-2` folder, and a platform outside RomM's list no longer gets a wrong folder (#1393, #1402). +- **Ambiguous releases and auto-download**: an accepted release whose title match is ambiguous (an unconfirmed group suffix) now counts for the **has results** badge and the **Game Available** notification, and no longer blocks the auto-download of a lone clear match; auto-download stays limited to clear matches and keeps paging when only ambiguous releases are found. Standalone region words (EUR, USA, JPN, PAL, NTSC) are treated as release metadata (#1391, #1394). +- **Release scores after a profile change**: search results no longer keep the scores computed with the previous release profile after you save the release profile or a custom format (#1376). +- **Manual import retries**: confirming a manual import again no longer transfers the files twice or sends a finished download back to manual review, and a second confirmation while the first is still running is refused with a clear message (#1275, #1359). +- **Switch 2, Nintendo 64 and remake releases**: Switch 2 is now a platform of its own, `Nintendo 64`/`N64` markers are read as a platform, and a remake is kept distinct from the original game, so these releases are no longer scored as title spinoffs of another game (#1345, #1356). +- **xREL checks**: a malformed xREL response is treated as unavailable, never as an empty result (#1305). A release missing from a full, truncated xREL list is reported as unknown instead of not found (#1309). xREL results are kept across long auto-search intervals and large wanted lists (#1307). The trust badge says that p2p releases cannot be checked for nukes (#1306). +- **Large archive imports**: archive listings are streamed, so valid archives with a long file list no longer fail on a size limit (#1300, thanks @JEFF7712). +- **Path checks**: the sensitive-path guard also rejects Windows system paths, the `ADMIN$` share and the macOS `/private/etc` alias, and SeerrNG assets are validated against your real library roots (#1304). +- **Needs Review manual search**: the results of **Not listed? Search IGDB by name** are ordered by how well the title matches what you typed. A bracketed year or an id tag is ignored when scoring, and a trailing word such as "-Men" is no longer taken for a release group (#1335). +- **Play time refresh**: open pages update after a scheduled Steam sync or a Playnite push, without a reload. The Statistics, the Steam sync status and the game's sessions refresh, including after the browser reconnects (#1336). +- **Linked finished downloads**: linking an already finished download (**Downloads → Scan unlinked**, or a single claim) now starts the import when post-processing is on, instead of leaving it completed with nothing in the library folder (#1324). +- **Screen reader labels on game cards**: the rating and release date controls on game cards now name the game they belong to, for example "My rating for Hades: 6.5/10" (#1331). +- **Apprise destinations**: the Apprise API URL and each notification URL are checked before they are saved and again before each send. Local network addresses still work; cloud metadata and other blocked addresses are refused with an "Invalid or unsafe" error, and an unsafe notification URL already saved is skipped with a warning (#1314). + +### Vulnerabilities Addressed + +Inventory from `scripts/cve-report.mjs` / `scripts/cwe-report.mjs` against OSV.dev (`v1.6.0` → `main`). The other 154 bumped packages matched no patched advisory. + +#### Production dependencies + +- **node-forge** 1.4.1 → 1.4.3 — fixes 4 advisories: + - **CVE-2026-125333** (MODERATE, CWE-1333) — ReDoS in `forge.http` response header and cookie trimming + - **CVE-2026-125334** (MODERATE, CWE-476) — TLS client crash on a handshake record received without a session + - **CVE-2026-125332** (MODERATE, CWE-20 and CWE-248) — TLS client crash on an unsupported ServerHello compression method + - **CVE-2026-125335** (LOW, CWE-347) — Ed25519 signature verification accepts small-order public keys +- **fast-xml-parser** 5.11.2 → 5.12.1 — fixes **CVE-2026-126066** (LOW, CWE-407): quadratic CPU consumption scanning unterminated stop-node tags +- **minimatch** 10.2.5 → 11.0.9 — fixes **CVE-2026-118764** / GHSA-g3hv-75wg-m249 (MODERATE, CWE-405): denial of service via globparts amplification; pinned with an `overrides` entry because the only production consumer is `archiver` → `readdir-glob` (not listed by `scripts/cve-report.mjs`, added by hand from OSV.dev) + +#### First-party fixes + +- **Apprise destinations (CWE-918, server-side request forgery; no CVE assigned)**: the Apprise API URL and the notification URLs are validated before they are saved and before each send, so a crafted URL can no longer make Questarr call cloud metadata or other blocked addresses (#1314). + +### Dependencies + +- Dependency updates: #1297, #1298, #1299, #1313, #1319, #1321, #1328, #1329, #1330, #1327, #1332, #1333, #1334. ## [1.6.0] - 2026-10-31 @@ -48,7 +132,7 @@ All notable changes to this project will be documented in this file. - The manual search shows the score, its breakdown and why a release was rejected - The auto-search only considers accepted releases, keeps the best-scored copy of a duplicate and orders the rest by score, then preferred protocol, then your sort order. - Releases the xREL PreDB lists as nuked are rejected, and the search shows an xREL badge. - - Configure it under **Settings → Discovery & Downloads → Release Scoring**, + - Configure it under **Settings → Release Scoring**, - Preferred Release Groups card: existing preferred groups become a "Preferred release group" format worth +50 (#1196). - In the manual download dialog, rejected releases are hidden by default with a badge showing how many: untick **Hide rejected releases** to see them, or set the default under **Auto-download rules** (#1231). - **Release trust badge**: each search result also shows one verdict, **Trusted**, **Unverified** or **Risky**, with the reasons behind it. The verdict comes from the rejection reasons and facts, not from the score, so changing a rule weight cannot turn a nuked release into a trusted one (#1250). Trust levels: @@ -56,7 +140,7 @@ All notable changes to this project will be documented in this file. - Trusted needs an accepted release with a clear title match and evidence that is hard to fake: listed on xREL with a size within 25 % of yours, or a preferred release group. - A name alone on xREL, or an xREL lookup that could not run, stays Unverified. - **Recommended custom formats**: an **Install recommended formats** button adds a starting set that pushes down crack-only, demo and pre-installed releases, rejects trainers, keygens and activators outright, and favors releases that include updates and DLC and a few trusted repackers. Formats you already have are not duplicated (#1224). -- **Scoped API keys**: API keys now have an access level (all, library write, read, game requests or admin) and an optional expiry of 1 to 365 days, chosen in **Settings → Integrations → API Keys**. The **admin** access lets deployment tooling configure Questarr (download clients, indexers, notifications, settings, import paths) from a script without an interactive login; treat such a key like an administrator login (#1289). +- **Scoped API keys**: API keys now have an access level (all, library write, read, game requests or admin) and an optional expiry of 1 to 365 days, chosen in **Settings → Connections → API Keys**. The **admin** access lets deployment tooling configure Questarr (download clients, indexers, notifications, settings, import paths) from a script without an interactive login; treat such a key like an administrator login (#1289). - **SeerrNG/Gameyfin Integration**: In API keys, the new **Game requests (SeerrNG)** access lets SeerrNG request PC games from Questarr through a provider API that follows the QuestarrNG contract. Integration routes are limited to 300 requests per minute per key (#1198). See [SeerrNG](SEERRNG.md), [Gameyfin](GAMEYFIN.md) and [API](API.md#api-keys-management). - **Release classification**: - Smart release filtering through machine learning, built in and free. Questarr recognizes patches, DLC, full games and non-game files (software, movies, soundtracks) right on your server, before anything is downloaded. No account, no API key, nothing leaves your network. @@ -64,8 +148,8 @@ All notable changes to this project will be documented in this file. - In detail, Questarr works out whether a release is the full game, a patch, DLC, an expansion, or something to avoid such as a crack only, demo or soundtrack. A release classified as a patch, DLC, crack only, demo or soundtrack is held for your review instead of being downloaded unattended. - It applies to automatic downloads and to the manual search results alike, so a release gets one type everywhere. - Questarr tries fast built-in rules first, then a small local model that ships with Questarr, including the Docker image, and runs offline (trained on 964 labeled releases, #1291), and only asks the optional TypeSafe cloud provider when those cannot decide. - - Pick the mode (`hybrid` by default, `local` to never leave your server, `cloud` for the previous cloud-only check), the confidence threshold and whether unclassified releases are held under **Settings → Discovery & Downloads → Release classification**, with no restart needed (#1258, #1263, #1265, #1266, #1267). -- **Review the classification**: Releases the classifier was unsure about can be kept for you to label under **Settings → Discovery & Downloads → Release classification review**, which flags a disagreement between the cloud and local models and notifies you each time 25 more releases wait for review (#1261, #1262, #1270). You can also share your verified labels with the maintainer to help improve the public model: tick **Share my verified labels automatically** (off by default), and only the release name, game title, label and model version are sent, never anything about your library, with **See what will be sent** showing the exact rows (#1271). See [Release classification](RELEASE_CLASSIFICATION.md) (#1264). + - Pick the mode (`hybrid` by default, `local` to never leave your server, `cloud` for the previous cloud-only check), the confidence threshold and whether unclassified releases are held under **Settings → Release Scoring → Release classification**, with no restart needed (#1258, #1263, #1265, #1266, #1267). +- **Review the classification**: Releases the classifier was unsure about can be kept for you to label under **Settings → Release Scoring → Release classification review**, which flags a disagreement between the cloud and local models and notifies you each time 25 more releases wait for review (#1261, #1262, #1270). You can also share your verified labels with the maintainer to help improve the public model: tick **Share my verified labels automatically** (off by default), and only the release name, game title, label and model version are sent, never anything about your library, with **See what will be sent** showing the exact rows (#1271). See [Release classification](RELEASE_CLASSIFICATION.md) (#1264). - **Update available badge and filter**: library games with newer update releases on your indexers show an **Update available** badge on their card and on the game page, and a new **Update Available** filter in the Library lists only those games. The plain search-results badge shows only when no update release is waiting (#1240). - **Backlog roulette game length**: choose a short adventure (up to 5 hours), a weekend quest (up to 15 hours) or a longer journey (up to 40 hours) from the IGDB completion estimate; games without a known estimate stay out of length-filtered draws. See [Backlog roulette](BACKLOG_ROULETTE.md) (#1272). - **Ignored folders in Library Import**: **Ignore** on a Needs Review folder removes it for good, so later scans skip it before listing its files, for example a Proton build next to your games. An **Ignored Folders** list under Needs Review restores a folder, which queues a rescan of its root folder, see [Library Import](LIBRARY_IMPORT.md) (#1239). @@ -152,7 +236,7 @@ Thanks to everyone who contributed to this release: - **Import review**: incomplete ClamAV scans stay in Pending Manual Imports instead of quarantine; ISO images remain intact during auto-unpack, and Sort Extras preserves internal game layouts while recognizing release-level extras (#1179). - **Pending imports**: orphaned downloads (missing game record) get a dedicated "Link Game" action to reattach them instead of stalling silently (#932). - **Download search**: results now link back to their indexer/source page (#872). -- **Global release name blacklist**: Settings → Discovery & Downloads lets you hide any release whose title contains a given term, case-insensitively, across manual search, both auto-search cycles, and AI enrichment/auto-download (#1112, closes #991). +- **Global release name blacklist**: Settings → Search & Downloads lets you hide any release whose title contains a given term, case-insensitively, across manual search, both auto-search cycles, and AI enrichment/auto-download (#1112, closes #991). #### Integrations diff --git a/docs/INDEXERS.md b/docs/INDEXERS.md index 05ae70b34..e4d0d7b45 100644 --- a/docs/INDEXERS.md +++ b/docs/INDEXERS.md @@ -45,7 +45,7 @@ applies to search results as well as Discover games. ## Manage release blacklists -Open **Settings → Discovery & Downloads → Release Blacklist**. Add terms to +Open **Settings → Search & Downloads → Release Blacklist**. Add terms to hide matching release names across manual, automatic and AI-assisted searches; matching is case-insensitive. Choose **Save Blacklist** to save term edits. @@ -70,8 +70,14 @@ Indexers shared with Sonarr, Radarr or Prowlarr can be pushed into backoff (HTTP - A search the browser no longer waits for (you typed another letter or closed the dialog) stops its indexer requests, and a search still waiting in line is never sent. - Identical searches in flight at the same time share one request to each indexer. -- Each indexer serves 2 searches at once; the others wait in line. Auto-search has its own - line, so interactive searches do not starve it. -- `SEARCH_MAX_CONCURRENT_PER_INDEXER` (1 to 10, default 2) changes the limit. +- Each indexer serves 2 searches at once per line; the others wait. Interactive searches and + auto-search have separate lines, so interactive searches do not starve auto-search, and an + indexer can receive up to 2 requests from each line at the same time. +- `SEARCH_MAX_CONCURRENT_PER_INDEXER` (1 to 10, default 2) changes the limit of each line. - `SEARCH_INDEXER_TIMEOUT_MS` (1000 to 300000, default 30000) changes the timeout of one indexer request. Raise it for FlareSolverr-backed indexers. +- An indexer's own **Request timeout** field (1 to 300 seconds, empty = the default above) + overrides that value for this indexer only. +- An indexer that answers 429 Too Many Requests is not queried again until its `Retry-After` + delay has passed (up to 1 hour). Without that header the wait grows with each consecutive 429 + (30 s, 1 min, 2 min... capped at 15 min). A successful answer ends the wait. diff --git a/docs/LIBRARY_IMPORT.md b/docs/LIBRARY_IMPORT.md index 510a1817e..767bb1c8c 100644 --- a/docs/LIBRARY_IMPORT.md +++ b/docs/LIBRARY_IMPORT.md @@ -201,7 +201,8 @@ configuration does not delete the directory itself. with its cover and release year. - A folder that stays in Needs Review is explained in the server log (search `Library scan: folder left in Needs Review`): the query sent to IGDB, how many candidates came back, and the best one with its score against the 0.85 threshold. - Under **Needs Review**, choose a suggested IGDB game or enter a different - name in **Not listed? Search IGDB by name**. Search alone does not import the + name in **Not listed? Search IGDB by name**. Search results are ordered by how well the + title matches what you typed. Search alone does not import the game; clicking a candidate confirms it and adds it to your library. - **Ignore** removes a folder from Needs Review for good, for example a Proton build next to your games. Later scans skip it before listing its files, unless it is @@ -209,6 +210,25 @@ configuration does not delete the directory itself. **Restore** brings one back and queues a rescan of its root folder. Ignore and candidate matching are disabled while the other is in progress. +### Import a game into the library + +Games found in an external root folder stay where they are. To bring one into +your Library Root, choose **Import into library** on **Library Import**, pick +**Copy**, **Move** or **Hardlink**, and confirm. Questarr names the folder with +your [naming pattern](#naming-pattern), transfers the files, then points the game +at the new location. **Copy** is the safest option and keeps the originals. +**Move** renames the files on the same disk; across disks it copies them, checks +the copy, then tries to remove the originals. A leftover original is logged as +a warning and does not fail the import. **Hardlink** copies when the source is on +another disk. The preview warns when the destination lacks free space. + +### Automatic rescan + +**Auto rescan** on **Library Import** rescans all enabled root folders every +hour, 6 hours, 12 hours, day or week. It is off by default. A rescan only looks up +new or unresolved folders on IGDB. The task is listed as **Library rescan** under +**Activity → System Tasks**, with its last and next run. + If a folder is inaccessible, check the mount and the service user's permissions, then use its health-recheck button. If IGDB search fails, the folder stays in review so you can retry. Scan progress and unmatched candidates are in-memory diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index 942002174..d08e42187 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -16,7 +16,7 @@ For Windows, download `QuestarrSetup-<version>-windows-x64.exe` from the release with the Windows installer attached. The installer sets up a Windows service and starts Questarr automatically. -Open `http://localhost:5000` and follow the initial setup wizard. Keep the Docker +Open `http://localhost:5000` and create your account; the setup wizard then asks which platforms you manage and whether Questarr should search and download, and shows only the settings that apply (you can run it again from **Settings → General → Setup wizard**). Keep the Docker `data` volume across upgrades. SQLite is the default; see [Database](DATABASE.md) for optional PostgreSQL and data migration. diff --git a/docs/REAL-DEBRID.md b/docs/REAL-DEBRID.md index 5e0f2b742..8dd328db9 100644 --- a/docs/REAL-DEBRID.md +++ b/docs/REAL-DEBRID.md @@ -13,7 +13,7 @@ folder** and runs the normal import pipeline on them. A premium Real-Debrid acco the code, and approve. Questarr stores the resulting tokens encrypted on the server; they never reach the browser. 4. Optional: instead of Connect, paste a private API token from - <https://real-debrid.com/apitoken> into the password field. + [https://real-debrid.com/apitoken](https://real-debrid.com/apitoken) into the password field. ## How it behaves @@ -27,6 +27,14 @@ folder** and runs the normal import pipeline on them. A premium Real-Debrid acco - Expired access tokens are refreshed automatically. If Real-Debrid rejects the credentials, use **Reconnect**. +## Direct-download links + +Real-Debrid can also fetch file-hoster links, not only torrents. On a game, open the **Download** menu and choose **Add download links**: + +- Paste the links, one per line or a whole post (forum text and BBCode are fine): Questarr keeps the http(s) links, drops the duplicates and the trailing punctuation. +- Or attach a DLC, CCF or RSDF container file. +- Up to 500 links per job. Real-Debrid fetches them, then Questarr copies the files to the staging folder and imports them like a torrent. + ## Notes - The staging folder must be reachable by the import pipeline like any download folder; no path diff --git a/docs/RELEASE_CLASSIFICATION.md b/docs/RELEASE_CLASSIFICATION.md index b91bbd247..242d2f2d8 100644 --- a/docs/RELEASE_CLASSIFICATION.md +++ b/docs/RELEASE_CLASSIFICATION.md @@ -21,7 +21,7 @@ A release that no layer can classify is `unknown`. It is never turned into `full ## Settings page -Everything below can be changed in Settings > Discovery & Downloads > Release classification, +Everything below can be changed in Settings > Release Scoring > Release classification, without restarting: the classification type, the local model confidence, holding unclassifiable releases, and the active-learning options (collection, cloud suggestions, the low-confidence threshold and the candidate limit). The card also shows whether a local model is installed (and @@ -181,7 +181,7 @@ training example. ### Review -Settings > Discovery & Downloads > Release classification review lists pending candidates, most +Settings > Release Scoring > Release classification review lists pending candidates, most useful first: unresolved and disagreeing releases come before low-confidence ones, and a release whose likely class has few verified examples gets a bonus so the thin classes fill up. For each one you can verify a label (the local model's guess or the cloud suggestion is prefilled, not diff --git a/docs/RSS.md b/docs/RSS.md index 17075d872..1b4cb6e98 100644 --- a/docs/RSS.md +++ b/docs/RSS.md @@ -10,3 +10,16 @@ configuration, and overlapping refresh requests share a run. Choose a release to review its game match, or follow its article link to the original source. Disabled feeds do not participate in refreshes. + +## Direct-download feeds + +Some feeds publish file-hoster links instead of torrents. In **Manage Feeds**, switch on +**Items carry file-hoster download links (send them to Real-Debrid)** for such a feed, or for +an existing one with the **Extract download links** toggle in the **Links** column. + +- Questarr keeps the hoster links found in each item's content. Blog pages and hosts that + Real-Debrid cannot unrestrict are dropped. +- An item with links that is matched to a game of your library gets a button that opens **Add + download links** with the links filled in. Real-Debrid then fetches them and Questarr imports + the files. See [Real-Debrid](REAL-DEBRID.md#direct-download-links). +- A Real-Debrid downloader must be set up. diff --git a/docs/SECRETS.md b/docs/SECRETS.md index 935d2d400..e31e2c290 100644 --- a/docs/SECRETS.md +++ b/docs/SECRETS.md @@ -19,7 +19,7 @@ rather than starting with an invalid configuration. | Variable | Purpose | Required? | | --------------------------------------- | ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `JWT_SECRET` | Signs/verifies session JWTs | No — auto-generated and persisted to the DB if unset (§2) | -| `NEXUSMODS_API_KEY` | NexusMods mod lookups | No — validated by `envSchema`; can be set later in Settings → Integrations (§3) | +| `NEXUSMODS_API_KEY` | NexusMods mod lookups | No — validated by `envSchema`; can be set later in Settings → Connections (§3) | | `STEAM_API_KEY` | Steam achievements in a game's Journal tab | No — can also be saved in Settings → Steam (§3); without a key the achievements section is simply hidden | | `IGDB_CLIENT_ID` / `IGDB_CLIENT_SECRET` | Twitch/IGDB OAuth for game metadata & discovery | No env-wise, but one of env/DB must be set for discovery to work | | `PORT` | HTTP port | No (default `5000`) | @@ -343,7 +343,7 @@ points operators at is on the safe side of the fix. indexer/downloader credentials stay decryptable across DB resets (`openssl rand -hex 32`). - [ ] Set IGDB and (optionally) NexusMods credentials via `.env` or - Settings → Integrations. + Settings → Connections. - [ ] Restrict who has login access to the app — Questarr has no per-user role scoping, so any account holder can use every configured indexer/downloader (though the API keys/passwords themselves are diff --git a/docs/SECURITY_ASSESSMENT.md b/docs/SECURITY_ASSESSMENT.md index 2c3108731..b2f6d1225 100644 --- a/docs/SECURITY_ASSESSMENT.md +++ b/docs/SECURITY_ASSESSMENT.md @@ -37,7 +37,7 @@ this lighter table format matches the pragmatic tone of the rest of `docs/`. | Risk area | Description | Likelihood | Impact | Mitigation / status | Reference | | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | Session revocation | JWTs are valid for 7 days (`server/auth.ts:79-82`) with no server-side revocation list or logout endpoint. A stolen token remains usable for up to a week. | Low–Medium | Medium | Accepted risk for the self-hosted, single-tenant use case; no fix planned. Operators concerned about this can shorten the effective window by rotating `JWT_SECRET`, which invalidates all sessions immediately. | `server/auth.ts:77-82` | -| Integration API key blast radius | The `/api/integration` surface (added for the Playnite extension and other machine clients) accepts a long-lived API key instead of a JWT. A key can be created without an expiry (and keys created before expiry existed never expire), so unlike the 7-day JWT above it is then revoked only by explicit user action. | Low | Low–Medium | Each key also carries one scope (`library:write`, `read`, `requests` or `all` for full access (also what keys created before scopes use)) enforced per route by `requireScope()`, an optional expiry (401 `API_KEY_EXPIRED`), and a 300/min per-key rate limit, so a leaked read-only or SeerrNG key reaches far less than the whole integration surface. The outer boundary is deliberately narrow: `requireAuthenticationForApi` accepts a key only under `/api/integration`, never on key management (`/api/api-keys`) or any other route, so a leaked key cannot mint/revoke keys or reach the rest of the app. Only a SHA-256 hash is persisted (`api_keys.key_hash`), the raw key is shown once at creation, and a user can revoke a key at any time from Settings → Integrations. `getApiKeyByHash` is a single indexed lookup, not a scan, so this doesn't reintroduce the timing/scan concerns a per-key bcrypt comparison would. | `server/auth.ts` (`authenticateApiKeyOrToken`, `generateApiKey`), `server/routes.ts` (`isIntegrationApiRequest`), `server/routes/api-keys.ts` | +| Integration API key blast radius | The `/api/integration` surface (added for the Playnite extension and other machine clients) accepts a long-lived API key instead of a JWT. A key can be created without an expiry (and keys created before expiry existed never expire), so unlike the 7-day JWT above it is then revoked only by explicit user action. | Low | Low–Medium | Each key also carries one scope (`library:write`, `read`, `requests` or `all` for full access (also what keys created before scopes use)) enforced per route by `requireScope()`, an optional expiry (401 `API_KEY_EXPIRED`), and a 300/min per-key rate limit, so a leaked read-only or SeerrNG key reaches far less than the whole integration surface. The outer boundary is deliberately narrow: `requireAuthenticationForApi` accepts a key only under `/api/integration`, never on key management (`/api/api-keys`) or any other route, so a leaked key cannot mint/revoke keys or reach the rest of the app. Only a SHA-256 hash is persisted (`api_keys.key_hash`), the raw key is shown once at creation, and a user can revoke a key at any time from Settings → Connections. `getApiKeyByHash` is a single indexed lookup, not a scan, so this doesn't reintroduce the timing/scan concerns a per-key bcrypt comparison would. | `server/auth.ts` (`authenticateApiKeyOrToken`, `generateApiKey`), `server/routes.ts` (`isIntegrationApiRequest`), `server/routes/api-keys.ts` | | CodeQL `js/insufficient-password-hash` on the integration API key hash | CodeQL's dataflow treats `extractApiKey`'s output (the `X-Api-Key`/Bearer value) as a "password" and flags `hashApiKey`'s plain `crypto.createHash("sha256")` as insufficient computational effort — the same class of advice that's correct for a human-chosen password, applied here to a 256-bit random token. | Low | Low | False positive — the query can't see that its input is `crypto.randomBytes(32)` output, not attacker-guessable. A slow KDF (bcrypt/scrypt/argon2/PBKDF2) defends against brute-forcing a _low-entropy_ secret; brute-forcing a 256-bit key is infeasible regardless of hash speed, so it buys nothing here. It would also actively regress the design: `getApiKeyByHash` is a single indexed equality lookup on every authenticated integration request, which requires a deterministic, unsalted digest — a salted slow hash can't be looked up by index at all (each row's salt differs), forcing a full-table scan-and-compare per request instead. Same disposition as the `js/request-forgery` row below: dismissed as a false positive, not fixed, per `docs/VULNERABILITY_MANAGEMENT.md` §2.2 item 3. | `server/auth.ts` (`hashApiKey`, `generateApiKey`) | | Integration API key sent over plaintext HTTP | `authenticateApiKeyOrToken` accepts a key over any connection the server itself accepts — there is no `req.secure`/trusted-proxy check requiring TLS specifically for API-key auth. On an HTTP deployment, a network observer on that segment could capture the key from the `X-Api-Key`/`Authorization` header and reuse it. | Low | Low–Medium | Consistent with the JWT row above and the CORS/CSP/HSTS row below, not a new gap: this project has never code-enforced TLS for any credential — that's an explicit, documented operator responsibility (`docs/REVERSE_PROXY.md`, `docs/SECRETS.md`), because plenty of legitimate self-hosted deployments run entirely on a trusted home LAN with no reverse proxy. Hard-blocking HTTP specifically for API keys (and not the JWT the browser UI already sends the same way) would be a new, inconsistent, surprising restriction rather than a real hardening step. The client (`extensions/playnite-questarr/Questarr.psm1`) is deliberately consent-based rather than a hard block: connecting over a plain `http://` address always shows an explicit warning that the key travels in cleartext on every sync or request, worded more strongly for an address outside the caller's own local network (`Test-QuestarrIsPrivateHost`) since that traffic can cross the open internet — but the operator's own server is theirs to configure, so the choice to proceed is theirs too. A same-host redirect (a reverse proxy enforcing `https://`, or normalizing a trailing slash) is followed with the key reattached by hand; a redirect to any other host, or a same-host redirect that downgrades `https://` to `http://`, is refused outright, closing the vector that could otherwise silently move the key to a different host or a weaker scheme than the one configured. | `server/auth.ts` (`authenticateApiKeyOrToken`), `extensions/playnite-questarr/Questarr.psm1` (`Invoke-QuestarrConnect`, `Invoke-QuestarrHttpRequest`) | | Concurrent duplicate game creation | `POST /api/games/match-and-add`, `POST /api/integration/games/request`, and other IGDB-match-and-insert call sites (shared via `quickAddGameByTitle` for the first two) check `getUserGames` for an existing `igdbId`/title match, then call `storage.addGame` — two concurrent requests for the same title from the same user can both pass the check and each insert a row, since there is no unique constraint on `(userId, igdbId)`. | Low | Low | Pre-existing pattern, not introduced by the integration API: `/api/games/match-and-add` has worked this way since before this PR, and `quickAddGameByTitle` extends the exact same logic to a second caller rather than adding a new race. Worst case is a duplicate library entry a user can delete, not a security boundary crossed. A proper fix (a partial unique index on `games(user_id, igdb_id) WHERE igdb_id IS NOT NULL` plus `ON CONFLICT` handling in `storage.addGame`) would need to cover every insert path that can race the same way, not just the two quick-add routes — tracked as a follow-up rather than done piecemeal here. | `server/game-quick-add.ts`, `server/routes.ts` (`POST /api/games/match-and-add`), `server/storage.ts` (`addGame`) | diff --git a/docs/SEERRNG.md b/docs/SEERRNG.md index c405ea227..6f68bc504 100644 --- a/docs/SEERRNG.md +++ b/docs/SEERRNG.md @@ -16,7 +16,7 @@ may still label the provider "QuestarrNG" in its own UI. ## Set up -1. In Questarr, open **Settings → Integrations → API Keys** and create a key with the access +1. In Questarr, open **Settings → Connections → API Keys** and create a key with the access **Game requests (SeerrNG)**. Pick an expiry (or **Never**) and copy the key; Questarr stores only a hash. 2. In SeerrNG, add a software provider pointing to your Questarr address and paste the key. 3. Turn on **auto-search** in Questarr (Settings → Search). A request is added to the library as diff --git a/docs/STEAM_LIBRARY.md b/docs/STEAM_LIBRARY.md index e490e1600..593eeeb8f 100644 --- a/docs/STEAM_LIBRARY.md +++ b/docs/STEAM_LIBRARY.md @@ -1,6 +1,6 @@ # Import owned Steam games -In **Settings → Integrations**, save your SteamID64, then use **Preview owned +In **Settings → Connections**, save your SteamID64, then use **Preview owned games**. All untracked games are selected by default. Choose **Import selected** once to import a large library, including thousands of games, without manually submitting batches. diff --git a/docs/TORBOX.md b/docs/TORBOX.md index 3393e2e07..2cc7fd694 100644 --- a/docs/TORBOX.md +++ b/docs/TORBOX.md @@ -15,10 +15,22 @@ its staging code. 2. **Downloaders → Add Downloader**, type **TorBox**. 3. Paste the key in **API key**. It is stored encrypted on the server and never sent back to the browser. -4. Set the **Staging Path**: a local folder (inside the container if you use Docker) with enough - room for the files. Each torrent is copied into `<staging>/<torrent id>/`. +4. Choose how finished files are delivered with **Fetch files to this server** (see below). + If it is on, set the **Staging Path**: a local folder (inside the container if you use Docker) + with enough room for the files. Each torrent is copied into `<staging>/<torrent id>/`. 5. Press **Test connection**, then save. +## Link-only or local copy + +TorBox downloaders use **link-only** mode by default (**Fetch files to this server** off): +finished downloads stay on TorBox, nothing is copied or imported, and no staging folder is needed. +On the **Downloads** page a finished TorBox download shows **Copy link** and **Download** +buttons. The link is requested when you press the button because TorBox links are short-lived: +one file's direct link, or a zip when the torrent holds several files. + +Turn **Fetch files to this server** on to copy the files to the staging folder and import them like +any other download, as described below. A downloader without an explicit choice is link-only. + ## How it behaves - A torrent shows as downloading while TorBox fetches it (first half of the progress bar), then diff --git a/docs/docs.json b/docs/docs.json index 52d333025..3acb16c44 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -48,6 +48,8 @@ "SEERRNG", "GAMEYFIN", "DOWNLOADERS_COMPATIBILITY", + "REAL-DEBRID", + "TORBOX", "synology-download-station-api-notes" ] },