Commit graph

12 commits

Author SHA1 Message Date
d90d58755f v0.6.0: Seerr optional, scrubbed personal data, README rewrite
Issue #2.

Search/request now work without Seerr — when seerr.url/api_key are left
as placeholders the bot falls back to direct Sonarr/Radarr lookup + add
(mirrors how Lidarr music already works). Numbered selection keeps
working across both sources via a _source discriminator stamped onto
each result. !media requests / !media trending now print a friendly
hint when Seerr is absent.

base-config.yaml no longer ships any homelab-specific URLs, MXIDs, or
Emby UIDs — admin_users defaults to [], user_map to {}, and every
service URL uses a docker-hostname placeholder. New per-service config
keys (quality_profile_id, root_folder_path, monitor, search_on_add,
language_profile_id, minimum_availability) let operators pin Sonarr/
Radarr defaults the same way Lidarr already could; null = auto-pick
the first profile/folder.

README rewritten as a self-contained setup guide: requirements, build,
upload, instance config (Required vs Optional with the Seerr fallback
called out), webhook setup, fork notes.
2026-05-03 15:02:50 -04:00
23e4fbd8d7 v0.5.4: fix Lidarr health (v1 not v3), blank line between services
- LidarrClient.health() override: hits /api/v1/health. Base ArrClient
  uses /api/v3/health which 404s on Lidarr.
- !media health output now joins service blocks with a blank line for
  readability.
2026-05-03 14:47:24 -04:00
5e3cd82145 v0.5.3: !media health covers all 7 backing services
Was only Sonarr+Radarr. Now also probes Lidarr (existing /health), Seerr
(/api/v1/status), Emby (/System/Info/Public), NZBGet (status RPC) and
qBittorrent (transfer/info). Each line shows  healthy / ⚠️ warning
(with detail) / ⏸️ paused /  unreachable. NZBGet surfaces
DownloadPaused; qBt surfaces connection_status (firewalled vs disconnected
helps spot VPN issues quickly).
2026-05-03 14:40:11 -04:00
9dd04067bb v0.5.2: digest skips redundant/empty sections, splits long bodies
Daily-digest fixes for issue #1:
- Drop the Completed section unless a finished release isn't already
  represented in Recently Added (slug-substring match on titles).
- Skip the Queued section when both Sonarr and Radarr queues are empty.
- Split the message into numbered chunks (~3000 chars) so Sunday digests
  with the emby-cleaner recap don't get truncated by Matrix clients.
2026-05-03 10:21:59 -04:00
eb9fc07021 v0.5.1: defensive DB bootstrap + error-tolerant digest loop
The v0.4 schema migration silently failed on first deploy — Maubot's
UpgradeTable hook didn't create the subscriptions / digest_state tables
in the shared Postgres instance. When the digest fired at 8 AM, the
SELECT against digest_state raised, the loop's only except was
CancelledError, and the task crashed silently. No digest, no logs.

Two fixes:
- _ensure_db_schema() runs CREATE TABLE IF NOT EXISTS on start() so
  the bot self-heals if migrations don't run for any reason
- digest loop's inner work is now wrapped — any exception sleeps an
  hour and retries instead of killing the whole schedule
2026-04-29 08:30:48 -04:00
b2c6b86546 v0.5.0: Lidarr music search + add
- LidarrClient (api/v1) with lookup, profile/folder discovery, and
  add_artist
- !media music <query> — MusicBrainz lookup via Lidarr, numbered list
  cached per (room, sender)
- !media music add <query|N> — POST /api/v1/artist with profile/folder
  defaults (auto-picks first if not set in config). Carries through
  images/genres/links from the lookup result and kicks off a search
  for missing albums by default.
- New config block 'lidarr' with optional quality_profile_id /
  metadata_profile_id / root_folder_path overrides.
2026-04-29 07:03:13 -04:00
f7537894d0 v0.4.3: include emby-cleaner recap in Sunday digest
The cleaner runs Sunday 4:20 AM and pings ntfy. The Sunday digest now
pulls the last 12h of messages from the emby-cleaner topic and appends
them to the daily summary. Configurable via ntfy_url +
emby_cleaner_topic in base-config.yaml.

Also drop the zoneinfo dependency in favour of a manual EST/EDT offset
calc (the maubot container ships without tzdata).
2026-04-28 19:14:24 -04:00
bb29db6f32 v0.4.2: SQLite, subscriptions, Sonarr webhook, daily digest
- Enable maubot's bundled SQLite (database: true, webapp: true)
- Schema: subscriptions(mxid, sonarr_series_id, title, added_at) +
  digest_state for once-daily idempotency
- Commands: !media subscribe / unsubscribe / subscriptions / digest
- @web.post(/sonarr-webhook): on Download events, mention subscribers
  in notifications_room (Bearer auth via sonarr_webhook_secret)
- Daily digest loop: fires at digest_hour (Indianapolis), summarises
  Emby recently-added, NZBGet+qBt 24h completions, queue depth.
  Approximate EST/EDT calc since maubot container ships without tzdata.
2026-04-28 19:13:19 -04:00
4995b746c2 v0.3.1: enable plugin webapp + case-insensitive bearer
- Add webapp: true to maubot.yaml — without it, @web.post decorators
  are silently ignored and plugin webhook URLs return 404
- Match Authorization scheme case-insensitively (Seerr's UI lowercases
  'Bearer' on save)
2026-04-28 18:42:20 -04:00
efa22b4e25 v0.3.0: reactions, posters, Seerr webhook
- Admins can react 👍/ or 👎/ on a !media request to approve/decline
- Posters auto-attach to request confirmations and !media random picks
  (TMDB for Seerr items, Emby /Items/{id}/Images/Primary for library items)
- New @web.post(/seerr-webhook) handler — Seerr → Matrix room directly,
  replaces the Telegram bridge path
- New config: posters_enabled, admin_users, notifications_room,
  seerr_webhook_secret
2026-04-28 18:16:54 -04:00
bec9a1b8e7 v0.2.0: discovery, downloads control, numbered selection
Emby:
- !media find <q> — search the existing library
- !media resume — continue-watching list (with progress %)
- !media random [movie|tv] — random unwatched pick

Sonarr/Radarr:
- !media health — active warnings on either arr

Downloads:
- !media speed — aggregate down/up across NZBGet + qBt
- !media completed — finished in the last 24h
- !media pause / !media unpause — global pause/resume

QoL:
- Numbered selection: !media search dune then !media request 2
- Optional per-user defaults: default_media_type, result_count
2026-04-28 17:57:50 -04:00
8c62c9fd31 Initial commit: media bot v0.1.0
Maubot plugin: Matrix companion for the homelab media stack.

Services wrapped:
- Seerr: search, request, requests, trending
- Emby: nowplaying, recent, watched
- Sonarr/Radarr: queue, upcoming, missing
- NZBGet/qBittorrent: activity

Each Matrix sender is mapped to per-service user IDs via plugin config;
unmapped senders are rejected. Replies are MXID-prefixed for shared rooms.
2026-04-28 08:22:38 -04:00