360 Secure SkillHub
360 安全技能中心

Sonarr

读取本地凭据配置,通过 Bash 脚本调用 Sonarr REST API 搜索电视剧、检查是否已在库中、按质量配置添加或移除剧集,并支持添加后立即搜索;搜索结果以带 TVDB 链接的编号列表呈现供用户选择与确认。

jordyvandomselaar
jordyvandomselaar
热度 72.16
最近更新 2026-05-11 15:48:49
分类:自动化依赖:代码执行 / 读写文件 / 第三方 API应用场景:自动化脚本 / 工作流 / 推荐

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add sonarr
Metadata
name
sonarr
version
1.0.0
description
Search and add TV shows to Sonarr. Supports monitor options, search-on-add.
metadata
{"clawdbot":{"emoji":"📺","requires":{"bins":["curl","jq"]}}}

Sonarr

Add TV shows to your Sonarr library.

Setup

Create ~/.clawdbot/credentials/sonarr/config.json:

{
  "url": "http://localhost:8989",
  "apiKey": "your-api-key",
  "defaultQualityProfile": 1
}
  • defaultQualityProfile: Quality profile ID (run config to see options)

Workflow

  1. Search: search "Show Name" - returns numbered list
  2. Present results with TVDB links - always show clickable links
  3. Check: User picks a number
  4. Add: Add show and start search

Important

  • Always include TVDB links when presenting search results to user
  • Format: [Title (Year)](https://thetvdb.com/series/SLUG)
  • Uses defaultQualityProfile from config; can override per-add

Commands

Search for shows

bash scripts/sonarr.sh search "Breaking Bad"

Check if show exists in library

bash scripts/sonarr.sh exists <tvdbId>

Add a show (searches immediately by default)

bash scripts/sonarr.sh add <tvdbId>              # searches right away
bash scripts/sonarr.sh add <tvdbId> --no-search  # don't search

Remove a show

bash scripts/sonarr.sh remove <tvdbId>                # keep files
bash scripts/sonarr.sh remove <tvdbId> --delete-files # delete files too

Always ask user if they want to delete files when removing!

Get root folders & quality profiles (for config)

bash scripts/sonarr.sh config