@ouro.bot/cli 0.1.0-alpha.852 → 0.1.0-alpha.853

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "_note": "This changelog is maintained as part of the PR/version-bump workflow. Agent-curated, not auto-generated. Agents read this file directly via read_file to understand what changed between versions.",
3
3
  "versions": [
4
+ {
5
+ "version": "0.1.0-alpha.853",
6
+ "changes": [
7
+ "The Butler's override grab sends the release's quality and languages, which Sonarr v4 requires (it returned HTTP 500 without them)"
8
+ ]
9
+ },
4
10
  {
5
11
  "version": "0.1.0-alpha.852",
6
12
  "changes": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "runtimeVersion": "0.1.0-alpha.852",
2
+ "runtimeVersion": "0.1.0-alpha.853",
3
3
  "bundleSchemaVersion": 3,
4
4
  "lastUpdated": "2026-09-03T00:00:00.000Z"
5
5
  }
@@ -1012,7 +1012,10 @@ export async function mediaReleaseSearch(a) {
1012
1012
  raw = await sonarr("/release", { query: { seriesId: serviceId, seasonNumber: a.season_number }, timeoutMs: SEARCH_TIMEOUT_MS })
1013
1013
  } else return { result: "season_number_or_episode_ids_required" }
1014
1014
  const seen = new Set()
1015
- let rows = (Array.isArray(raw) ? raw : []).filter((r) => (seen.has(r.guid) ? false : seen.add(r.guid))).map((r) => releaseRow(a.kind, r))
1015
+ const unique = (Array.isArray(raw) ? raw : []).filter((r) => (seen.has(r.guid) ? false : seen.add(r.guid)))
1016
+ // Sonarr's override grab needs the release's own quality and languages objects back.
1017
+ const rawByGuid = new Map(unique.map((r) => [r.guid, r]))
1018
+ let rows = unique.map((r) => releaseRow(a.kind, r))
1016
1019
  const total = rows.length
1017
1020
  if (a.query) {
1018
1021
  const q = String(a.query).toLowerCase()
@@ -1020,7 +1023,11 @@ export async function mediaReleaseSearch(a) {
1020
1023
  }
1021
1024
  rows.sort((x, y) => Number(y.seeders ?? 0) - Number(x.seeders ?? 0))
1022
1025
  const limit = Math.min(Math.max(Number(a.limit) || 40, 1), 100)
1023
- for (const r of rows) cacheRelease(`${a.kind}:${r.guid}`, { ...r, service_id: serviceId, season_number: a.season_number ?? null })
1026
+ for (const r of rows) {
1027
+ const source = rawByGuid.get(r.guid)
1028
+ cacheRelease(`${a.kind}:${r.guid}`, { ...r, service_id: serviceId, season_number: a.season_number ?? null,
1029
+ quality_raw: source?.quality ?? null, languages_raw: source?.languages ?? null })
1030
+ }
1024
1031
  return { kind: a.kind, service_id: serviceId, total_found: total, matched: rows.length, releases: rows.slice(0, limit) }
1025
1032
  }
1026
1033
 
@@ -1049,7 +1056,10 @@ export async function mediaReleaseGrab(a) {
1049
1056
  const own = new Set((await seriesEpisodes(seriesId)).map((e) => e.id))
1050
1057
  const foreign = a.episode_ids.filter((id) => !own.has(id))
1051
1058
  if (foreign.length) return { result: "episode_id_not_for_series", foreign_episode_ids: foreign }
1052
- Object.assign(body, { seriesId, episodeIds: a.episode_ids.map(Number), shouldOverride: true })
1059
+ // Sonarr v4 refuses an override without quality and languages (ArgumentNullException, HTTP 500).
1060
+ if (!cached.quality_raw) return { result: "release_quality_unknown", message: "Sonarr's search did not report this release's quality; search again." }
1061
+ Object.assign(body, { seriesId, episodeIds: a.episode_ids.map(Number), shouldOverride: true,
1062
+ quality: cached.quality_raw, languages: Array.isArray(cached.languages_raw) ? cached.languages_raw : [] })
1053
1063
  if (a.download_client_id !== undefined && a.download_client_id !== null) body.downloadClientId = Number(a.download_client_id)
1054
1064
  }
1055
1065
  }
@@ -1,7 +1,7 @@
1
1
  <?xml version="1.0"?>
2
2
  <Container version="2">
3
3
  <Name>ouro-butler</Name>
4
- <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.852</Repository>
4
+ <Repository>ghcr.io/ourostack/ouroboros-butler:0.1.0-alpha.853</Repository>
5
5
  <Registry>https://github.com/ourostack/ouroboros/pkgs/container/ouroboros-butler</Registry>
6
6
  <Network>host</Network>
7
7
  <Shell>sh</Shell>
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.852",
3
+ "version": "0.1.0-alpha.853",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ouro.bot/cli",
9
- "version": "0.1.0-alpha.852",
9
+ "version": "0.1.0-alpha.853",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.78.0",
12
12
  "@azure/identity": "^4.13.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ouro.bot/cli",
3
- "version": "0.1.0-alpha.852",
3
+ "version": "0.1.0-alpha.853",
4
4
  "engines": {
5
5
  "node": ">=22"
6
6
  },