@thelord/mcp-arr 1.0.0 → 1.1.0
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/README.md +70 -15
- package/dist/bazarr-client.d.ts +212 -0
- package/dist/bazarr-client.d.ts.map +1 -0
- package/dist/bazarr-client.js +155 -0
- package/dist/bazarr-client.js.map +1 -0
- package/dist/bazarr-handlers.d.ts +8 -0
- package/dist/bazarr-handlers.d.ts.map +1 -0
- package/dist/bazarr-handlers.js +355 -0
- package/dist/bazarr-handlers.js.map +1 -0
- package/dist/bazarr-tools.d.ts +8 -0
- package/dist/bazarr-tools.d.ts.map +1 -0
- package/dist/bazarr-tools.js +359 -0
- package/dist/bazarr-tools.js.map +1 -0
- package/dist/index.js +31 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# MCP *arr Server
|
|
2
2
|
|
|
3
|
-
[](https://github.com/aplaceforallmystuff/mcp-arr/actions/workflows/ci.yml)
|
|
3
|
+
[](https://www.npmjs.com/package/@thelord/mcp-arr)
|
|
5
4
|
[](https://opensource.org/licenses/MIT)
|
|
6
5
|
[](https://modelcontextprotocol.io)
|
|
7
6
|
|
|
8
|
-
MCP server for the [*arr media management suite](https://wiki.servarr.com/) - Sonarr, Radarr, Lidarr, Readarr, Prowlarr,
|
|
7
|
+
MCP server for the [*arr media management suite](https://wiki.servarr.com/) - Sonarr, Radarr, Lidarr, Readarr, Prowlarr, [Lingarr](https://github.com/lingarr/lingarr) (subtitle translation), and [Bazarr](https://www.bazarr.media/) (subtitle management).
|
|
8
|
+
|
|
9
|
+
> **Note**: This is a fork of [mcp-arr](https://github.com/aplaceforallmystuff/mcp-arr) with added Lingarr and Bazarr integration for comprehensive subtitle management.
|
|
9
10
|
|
|
10
11
|
## Why Use This?
|
|
11
12
|
|
|
@@ -15,6 +16,8 @@ MCP server for the [*arr media management suite](https://wiki.servarr.com/) - So
|
|
|
15
16
|
- **Download monitoring** - Check queue status and progress across all services
|
|
16
17
|
- **Calendar integration** - See upcoming releases for all media types
|
|
17
18
|
- **Configuration review** - Get AI-powered suggestions for optimizing your setup
|
|
19
|
+
- **Subtitle translation** - Manage Lingarr subtitle translations with AI models
|
|
20
|
+
- **Subtitle management** - Download and manage subtitles with Bazarr
|
|
18
21
|
- **Flexible configuration** - Enable only the services you use
|
|
19
22
|
|
|
20
23
|
## Features
|
|
@@ -27,6 +30,7 @@ MCP server for the [*arr media management suite](https://wiki.servarr.com/) - So
|
|
|
27
30
|
| **Readarr (Books)** | List authors, view books, search writers, trigger downloads, check queue, view calendar, review setup |
|
|
28
31
|
| **Prowlarr (Indexers)** | List indexers, search across all trackers, test health, view statistics |
|
|
29
32
|
| **Lingarr (Subtitles)** | Translate subtitles, view translation queue, manage requests, sync media, view statistics |
|
|
33
|
+
| **Bazarr (Subtitles)** | Download subtitles, manage wanted list, search providers, view history, sync with Sonarr/Radarr |
|
|
30
34
|
| **Cross-Service** | Status check, unified search across all configured services |
|
|
31
35
|
| **Configuration** | Quality profiles, download clients, naming conventions, health checks, storage info |
|
|
32
36
|
| **TRaSH Guides** | Reference quality profiles, custom formats, naming conventions, compare against recommendations |
|
|
@@ -41,19 +45,20 @@ MCP server for the [*arr media management suite](https://wiki.servarr.com/) - So
|
|
|
41
45
|
- [Readarr](https://readarr.com/) for books
|
|
42
46
|
- [Prowlarr](https://prowlarr.com/) for indexer management
|
|
43
47
|
- [Lingarr](https://github.com/lingarr/lingarr) for subtitle translation
|
|
48
|
+
- [Bazarr](https://www.bazarr.media/) for subtitle management
|
|
44
49
|
|
|
45
50
|
## Installation
|
|
46
51
|
|
|
47
|
-
### Using
|
|
52
|
+
### Using npx (Recommended)
|
|
48
53
|
|
|
49
54
|
```bash
|
|
50
|
-
npx mcp-arr
|
|
55
|
+
npx @thelord/mcp-arr
|
|
51
56
|
```
|
|
52
57
|
|
|
53
58
|
### From Source
|
|
54
59
|
|
|
55
60
|
```bash
|
|
56
|
-
git clone https://github.com/
|
|
61
|
+
git clone https://github.com/gilberth/mcp-arr.git
|
|
57
62
|
cd mcp-arr
|
|
58
63
|
npm install
|
|
59
64
|
npm run build
|
|
@@ -82,7 +87,7 @@ Add to your Claude Desktop config file:
|
|
|
82
87
|
"mcpServers": {
|
|
83
88
|
"arr": {
|
|
84
89
|
"command": "npx",
|
|
85
|
-
"args": ["-y", "mcp-arr
|
|
90
|
+
"args": ["-y", "@thelord/mcp-arr"],
|
|
86
91
|
"env": {
|
|
87
92
|
"SONARR_URL": "http://localhost:8989",
|
|
88
93
|
"SONARR_API_KEY": "your-sonarr-api-key",
|
|
@@ -95,28 +100,34 @@ Add to your Claude Desktop config file:
|
|
|
95
100
|
"PROWLARR_URL": "http://localhost:9696",
|
|
96
101
|
"PROWLARR_API_KEY": "your-prowlarr-api-key",
|
|
97
102
|
"LINGARR_URL": "http://localhost:9877",
|
|
98
|
-
"LINGARR_API_KEY": "your-lingarr-api-key"
|
|
103
|
+
"LINGARR_API_KEY": "your-lingarr-api-key",
|
|
104
|
+
"BAZARR_URL": "http://localhost:6767",
|
|
105
|
+
"BAZARR_API_KEY": "your-bazarr-api-key"
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
108
|
}
|
|
102
109
|
}
|
|
103
110
|
```
|
|
104
111
|
|
|
105
|
-
### For Claude Code
|
|
112
|
+
### For Claude Code / OpenCode
|
|
106
113
|
|
|
107
|
-
Add to `~/.claude.json
|
|
114
|
+
Add to `~/.claude.json` or your MCP config:
|
|
108
115
|
|
|
109
116
|
```json
|
|
110
117
|
{
|
|
111
118
|
"mcpServers": {
|
|
112
119
|
"arr": {
|
|
113
120
|
"command": "npx",
|
|
114
|
-
"args": ["-y", "mcp-arr
|
|
121
|
+
"args": ["-y", "@thelord/mcp-arr"],
|
|
115
122
|
"env": {
|
|
116
123
|
"SONARR_URL": "http://localhost:8989",
|
|
117
124
|
"SONARR_API_KEY": "your-sonarr-api-key",
|
|
118
125
|
"RADARR_URL": "http://localhost:7878",
|
|
119
|
-
"RADARR_API_KEY": "your-radarr-api-key"
|
|
126
|
+
"RADARR_API_KEY": "your-radarr-api-key",
|
|
127
|
+
"LINGARR_URL": "http://localhost:9877",
|
|
128
|
+
"LINGARR_API_KEY": "your-lingarr-api-key",
|
|
129
|
+
"BAZARR_URL": "http://localhost:6767",
|
|
130
|
+
"BAZARR_API_KEY": "your-bazarr-api-key"
|
|
120
131
|
}
|
|
121
132
|
}
|
|
122
133
|
}
|
|
@@ -171,6 +182,16 @@ Add to `~/.claude.json`:
|
|
|
171
182
|
- "Cancel that translation request"
|
|
172
183
|
- "Sync movies from Radarr to Lingarr"
|
|
173
184
|
|
|
185
|
+
### Subtitle Management (Bazarr)
|
|
186
|
+
- "What episodes are missing subtitles?"
|
|
187
|
+
- "Show me movies that need subtitles"
|
|
188
|
+
- "Search for Spanish subtitles for this movie"
|
|
189
|
+
- "Download English subtitles for this episode"
|
|
190
|
+
- "Show the subtitle download history"
|
|
191
|
+
- "What are the available languages in Bazarr?"
|
|
192
|
+
- "Sync series from Sonarr to Bazarr"
|
|
193
|
+
- "Check the Bazarr health status"
|
|
194
|
+
|
|
174
195
|
### Configuration Review
|
|
175
196
|
- "Review my Sonarr setup and suggest improvements"
|
|
176
197
|
- "Show me my quality profiles in Radarr"
|
|
@@ -270,6 +291,34 @@ Add to `~/.claude.json`:
|
|
|
270
291
|
| `lingarr_exclude_media` | Toggle exclusion of media from automatic translation |
|
|
271
292
|
| `lingarr_get_version` | Get Lingarr version information |
|
|
272
293
|
|
|
294
|
+
### Bazarr Tools (Subtitle Management)
|
|
295
|
+
|
|
296
|
+
| Tool | Description |
|
|
297
|
+
|------|-------------|
|
|
298
|
+
| `bazarr_get_status` | Get Bazarr system status including version and connected services |
|
|
299
|
+
| `bazarr_get_badges` | Get badge counts showing missing subtitles and connection status |
|
|
300
|
+
| `bazarr_get_health` | Get health check results showing any issues |
|
|
301
|
+
| `bazarr_get_languages` | List available languages (optionally filter to enabled only) |
|
|
302
|
+
| `bazarr_get_tasks` | List scheduled tasks with their status and next run time |
|
|
303
|
+
| `bazarr_run_task` | Manually trigger a scheduled task |
|
|
304
|
+
| `bazarr_get_series` | List TV series with subtitle status and missing counts |
|
|
305
|
+
| `bazarr_get_series_details` | Get detailed info about a specific series including episodes |
|
|
306
|
+
| `bazarr_get_episodes` | Get episodes for a series with subtitle status |
|
|
307
|
+
| `bazarr_get_wanted_episodes` | List episodes with missing subtitles (wanted list) |
|
|
308
|
+
| `bazarr_search_episode_subtitles` | Search for available subtitles for an episode |
|
|
309
|
+
| `bazarr_download_episode_subtitle` | Download a specific subtitle for an episode |
|
|
310
|
+
| `bazarr_search_missing_episode_subtitles` | Trigger search for missing episode subtitles |
|
|
311
|
+
| `bazarr_get_movies` | List movies with subtitle status |
|
|
312
|
+
| `bazarr_get_movie_details` | Get detailed info about a specific movie |
|
|
313
|
+
| `bazarr_get_wanted_movies` | List movies with missing subtitles (wanted list) |
|
|
314
|
+
| `bazarr_search_movie_subtitles` | Search for available subtitles for a movie |
|
|
315
|
+
| `bazarr_download_movie_subtitle` | Download a specific subtitle for a movie |
|
|
316
|
+
| `bazarr_search_missing_movie_subtitles` | Trigger search for missing movie subtitles |
|
|
317
|
+
| `bazarr_get_series_history` | Get subtitle download history for series |
|
|
318
|
+
| `bazarr_get_movie_history` | Get subtitle download history for movies |
|
|
319
|
+
| `bazarr_sync_series` | Trigger a sync of TV series from Sonarr |
|
|
320
|
+
| `bazarr_sync_movies` | Trigger a sync of movies from Radarr |
|
|
321
|
+
|
|
273
322
|
### Configuration Review Tools
|
|
274
323
|
|
|
275
324
|
These tools are available for Sonarr, Radarr, Lidarr, and Readarr. Replace `{service}` with the service name (e.g., `sonarr_get_quality_profiles`).
|
|
@@ -286,7 +335,7 @@ These tools are available for Sonarr, Radarr, Lidarr, and Readarr. Replace `{ser
|
|
|
286
335
|
|
|
287
336
|
The `{service}_review_setup` tool returns all configuration in a single call, enabling natural language conversations about optimizing your setup. Claude can analyze your quality profiles, suggest improvements, explain why certain content isn't being grabbed, and help configure complex settings like custom formats.
|
|
288
337
|
|
|
289
|
-
>
|
|
338
|
+
> **Disclaimer**: The configuration review tools provide **read-only** access to your *arr settings. Any changes to your configuration must be made directly in the *arr application interfaces. The AI's suggestions are recommendations only - always back up your configuration before making significant changes.
|
|
290
339
|
|
|
291
340
|
### TRaSH Guides Tools
|
|
292
341
|
|
|
@@ -353,11 +402,17 @@ Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for gui
|
|
|
353
402
|
|
|
354
403
|
MIT - see [LICENSE](LICENSE) for details.
|
|
355
404
|
|
|
405
|
+
## Credits
|
|
406
|
+
|
|
407
|
+
This project is a fork of [mcp-arr](https://github.com/aplaceforallmystuff/mcp-arr) by Jim Christian, with added Lingarr and Bazarr integration for comprehensive subtitle management.
|
|
408
|
+
|
|
356
409
|
## Links
|
|
357
410
|
|
|
411
|
+
- [npm Package](https://www.npmjs.com/package/@thelord/mcp-arr)
|
|
412
|
+
- [GitHub Repository](https://github.com/gilberth/mcp-arr)
|
|
358
413
|
- [Servarr Wiki](https://wiki.servarr.com/) - Documentation for all *arr applications
|
|
359
414
|
- [TRaSH Guides](https://trash-guides.info/) - Quality profiles, custom formats, and setup guides
|
|
360
415
|
- [Lingarr](https://github.com/lingarr/lingarr) - Subtitle translation service
|
|
361
|
-
- [
|
|
416
|
+
- [Bazarr](https://www.bazarr.media/) - Subtitle management companion
|
|
362
417
|
- [Model Context Protocol](https://modelcontextprotocol.io)
|
|
363
|
-
- [
|
|
418
|
+
- [Original mcp-arr](https://github.com/aplaceforallmystuff/mcp-arr) - Original project by Jim Christian
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bazarr API Client
|
|
3
|
+
*
|
|
4
|
+
* Client for interacting with Bazarr subtitle management API.
|
|
5
|
+
* Bazarr is a companion application to Sonarr and Radarr that manages
|
|
6
|
+
* and downloads subtitles based on your requirements.
|
|
7
|
+
*/
|
|
8
|
+
export interface BazarrConfig {
|
|
9
|
+
url: string;
|
|
10
|
+
apiKey: string;
|
|
11
|
+
}
|
|
12
|
+
export interface BazarrStatus {
|
|
13
|
+
bazarr_version: string;
|
|
14
|
+
sonarr_version: string;
|
|
15
|
+
radarr_version: string;
|
|
16
|
+
operating_system: string;
|
|
17
|
+
python_version: string;
|
|
18
|
+
start_time: number;
|
|
19
|
+
timezone: string;
|
|
20
|
+
}
|
|
21
|
+
export interface BazarrLanguage {
|
|
22
|
+
name: string;
|
|
23
|
+
code2: string;
|
|
24
|
+
code3: string;
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface BazarrSubtitle {
|
|
28
|
+
name: string;
|
|
29
|
+
code2: string;
|
|
30
|
+
code3: string;
|
|
31
|
+
path?: string;
|
|
32
|
+
forced: boolean;
|
|
33
|
+
hi: boolean;
|
|
34
|
+
file_size?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface BazarrSeries {
|
|
37
|
+
title: string;
|
|
38
|
+
alternativeTitles: string[];
|
|
39
|
+
path: string;
|
|
40
|
+
sonarrSeriesId: number;
|
|
41
|
+
tvdbId: number;
|
|
42
|
+
imdbId: string;
|
|
43
|
+
poster: string;
|
|
44
|
+
fanart: string;
|
|
45
|
+
year: string;
|
|
46
|
+
overview: string;
|
|
47
|
+
seriesType: string;
|
|
48
|
+
monitored: boolean;
|
|
49
|
+
ended: boolean;
|
|
50
|
+
episodeFileCount: number;
|
|
51
|
+
episodeMissingCount: number;
|
|
52
|
+
profileId: number;
|
|
53
|
+
tags: string[];
|
|
54
|
+
audio_language: any[];
|
|
55
|
+
}
|
|
56
|
+
export interface BazarrEpisode {
|
|
57
|
+
title: string;
|
|
58
|
+
path: string;
|
|
59
|
+
season: number;
|
|
60
|
+
episode: number;
|
|
61
|
+
sonarrSeriesId: number;
|
|
62
|
+
sonarrEpisodeId: number;
|
|
63
|
+
monitored: boolean;
|
|
64
|
+
sceneName: string | null;
|
|
65
|
+
subtitles: BazarrSubtitle[];
|
|
66
|
+
missing_subtitles: BazarrSubtitle[];
|
|
67
|
+
audio_language: {
|
|
68
|
+
name: string;
|
|
69
|
+
code2: string;
|
|
70
|
+
code3: string;
|
|
71
|
+
}[];
|
|
72
|
+
}
|
|
73
|
+
export interface BazarrMovie {
|
|
74
|
+
title: string;
|
|
75
|
+
alternativeTitles: string[];
|
|
76
|
+
path: string;
|
|
77
|
+
radarrId: number;
|
|
78
|
+
tmdbId: number;
|
|
79
|
+
imdbId: string;
|
|
80
|
+
poster: string;
|
|
81
|
+
fanart: string;
|
|
82
|
+
year: string;
|
|
83
|
+
overview: string;
|
|
84
|
+
monitored: boolean;
|
|
85
|
+
profileId: number;
|
|
86
|
+
tags: string[];
|
|
87
|
+
subtitles: BazarrSubtitle[];
|
|
88
|
+
missing_subtitles: BazarrSubtitle[];
|
|
89
|
+
audio_language: any[];
|
|
90
|
+
sceneName: string | null;
|
|
91
|
+
}
|
|
92
|
+
export interface BazarrWantedEpisode {
|
|
93
|
+
seriesTitle: string;
|
|
94
|
+
episode_number: string;
|
|
95
|
+
episodeTitle: string;
|
|
96
|
+
sonarrSeriesId: number;
|
|
97
|
+
sonarrEpisodeId: number;
|
|
98
|
+
sceneName: string | null;
|
|
99
|
+
tags: string[];
|
|
100
|
+
seriesType: string;
|
|
101
|
+
missing_subtitles: BazarrSubtitle[];
|
|
102
|
+
}
|
|
103
|
+
export interface BazarrWantedMovie {
|
|
104
|
+
title: string;
|
|
105
|
+
radarrId: number;
|
|
106
|
+
sceneName: string | null;
|
|
107
|
+
tags: string[];
|
|
108
|
+
missing_subtitles: BazarrSubtitle[];
|
|
109
|
+
}
|
|
110
|
+
export interface BazarrTask {
|
|
111
|
+
job_id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
interval: string;
|
|
114
|
+
next_run_in: string;
|
|
115
|
+
next_run_time: string;
|
|
116
|
+
job_running: boolean;
|
|
117
|
+
}
|
|
118
|
+
export interface BazarrBadges {
|
|
119
|
+
episodes: number;
|
|
120
|
+
movies: number;
|
|
121
|
+
providers: number;
|
|
122
|
+
status: number;
|
|
123
|
+
sonarr_signalr: string;
|
|
124
|
+
radarr_signalr: string;
|
|
125
|
+
announcements: number;
|
|
126
|
+
}
|
|
127
|
+
export interface BazarrHistoryItem {
|
|
128
|
+
action: number;
|
|
129
|
+
description: string;
|
|
130
|
+
language: {
|
|
131
|
+
name: string;
|
|
132
|
+
code2: string;
|
|
133
|
+
code3: string;
|
|
134
|
+
};
|
|
135
|
+
path: string;
|
|
136
|
+
provider: string;
|
|
137
|
+
score: string;
|
|
138
|
+
seriesTitle?: string;
|
|
139
|
+
episode_number?: string;
|
|
140
|
+
episodeTitle?: string;
|
|
141
|
+
sonarrSeriesId?: number;
|
|
142
|
+
sonarrEpisodeId?: number;
|
|
143
|
+
title?: string;
|
|
144
|
+
radarrId?: number;
|
|
145
|
+
timestamp: string;
|
|
146
|
+
upgradable: boolean;
|
|
147
|
+
}
|
|
148
|
+
export interface BazarrProvider {
|
|
149
|
+
name: string;
|
|
150
|
+
status: string;
|
|
151
|
+
retry: string;
|
|
152
|
+
}
|
|
153
|
+
export interface SubtitleSearchResult {
|
|
154
|
+
provider: string;
|
|
155
|
+
release_info: string[];
|
|
156
|
+
subtitle: string;
|
|
157
|
+
matches: string[];
|
|
158
|
+
score: number;
|
|
159
|
+
uploader: string;
|
|
160
|
+
url: string;
|
|
161
|
+
language: {
|
|
162
|
+
name: string;
|
|
163
|
+
code2: string;
|
|
164
|
+
code3: string;
|
|
165
|
+
};
|
|
166
|
+
forced: boolean;
|
|
167
|
+
hearing_impaired: boolean;
|
|
168
|
+
}
|
|
169
|
+
export declare class BazarrClient {
|
|
170
|
+
private config;
|
|
171
|
+
constructor(config: BazarrConfig);
|
|
172
|
+
private request;
|
|
173
|
+
getStatus(): Promise<BazarrStatus>;
|
|
174
|
+
getHealth(): Promise<any[]>;
|
|
175
|
+
getLanguages(): Promise<BazarrLanguage[]>;
|
|
176
|
+
getEnabledLanguages(): Promise<BazarrLanguage[]>;
|
|
177
|
+
getTasks(): Promise<BazarrTask[]>;
|
|
178
|
+
runTask(taskId: string): Promise<void>;
|
|
179
|
+
getBadges(): Promise<BazarrBadges>;
|
|
180
|
+
getProviders(): Promise<BazarrProvider[]>;
|
|
181
|
+
getSeries(): Promise<BazarrSeries[]>;
|
|
182
|
+
getSeriesById(seriesId: number): Promise<BazarrSeries>;
|
|
183
|
+
getEpisodes(seriesId: number): Promise<BazarrEpisode[]>;
|
|
184
|
+
getEpisodeById(episodeId: number): Promise<BazarrEpisode>;
|
|
185
|
+
getWantedEpisodes(page?: number, pageSize?: number): Promise<{
|
|
186
|
+
data: BazarrWantedEpisode[];
|
|
187
|
+
total: number;
|
|
188
|
+
}>;
|
|
189
|
+
searchEpisodeSubtitles(episodeId: number, language: string): Promise<SubtitleSearchResult[]>;
|
|
190
|
+
downloadEpisodeSubtitle(episodeId: number, provider: string, subtitle: string, language: string, forced?: boolean, hi?: boolean): Promise<void>;
|
|
191
|
+
searchMissingEpisodeSubtitles(seriesId?: number): Promise<void>;
|
|
192
|
+
getMovies(): Promise<BazarrMovie[]>;
|
|
193
|
+
getMovieById(movieId: number): Promise<BazarrMovie>;
|
|
194
|
+
getWantedMovies(page?: number, pageSize?: number): Promise<{
|
|
195
|
+
data: BazarrWantedMovie[];
|
|
196
|
+
total: number;
|
|
197
|
+
}>;
|
|
198
|
+
searchMovieSubtitles(movieId: number, language: string): Promise<SubtitleSearchResult[]>;
|
|
199
|
+
downloadMovieSubtitle(movieId: number, provider: string, subtitle: string, language: string, forced?: boolean, hi?: boolean): Promise<void>;
|
|
200
|
+
searchMissingMovieSubtitles(movieId?: number): Promise<void>;
|
|
201
|
+
getSeriesHistory(page?: number, pageSize?: number): Promise<{
|
|
202
|
+
data: BazarrHistoryItem[];
|
|
203
|
+
total: number;
|
|
204
|
+
}>;
|
|
205
|
+
getMovieHistory(page?: number, pageSize?: number): Promise<{
|
|
206
|
+
data: BazarrHistoryItem[];
|
|
207
|
+
total: number;
|
|
208
|
+
}>;
|
|
209
|
+
syncSeries(): Promise<void>;
|
|
210
|
+
syncMovies(): Promise<void>;
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=bazarr-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bazarr-client.d.ts","sourceRoot":"","sources":["../src/bazarr-client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,EAAE,EAAE,OAAO,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC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AAE,CAAC;IAKnC,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAKnD,eAAe,CAAC,IAAI,GAAE,MAAU,EAAE,QAAQ,GAAE,MAAW,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAK/G,oBAAoB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAOxF,qBAAqB,CACzB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,OAAe,EACvB,EAAE,GAAE,OAAe,GAClB,OAAO,CAAC,IAAI,CAAC;IAcV,2BAA2B,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ5D,gBAAgB,CAAC,IAAI,GAAE,MAAU,EAAE,QAAQ,GAAE,MAAW,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAKhH,eAAe,CAAC,IAAI,GAAE,MAAU,EAAE,QAAQ,GAAE,MAAW,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAM/G,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAGlC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bazarr API Client
|
|
3
|
+
*
|
|
4
|
+
* Client for interacting with Bazarr subtitle management API.
|
|
5
|
+
* Bazarr is a companion application to Sonarr and Radarr that manages
|
|
6
|
+
* and downloads subtitles based on your requirements.
|
|
7
|
+
*/
|
|
8
|
+
export class BazarrClient {
|
|
9
|
+
config;
|
|
10
|
+
constructor(config) {
|
|
11
|
+
this.config = config;
|
|
12
|
+
}
|
|
13
|
+
async request(endpoint, options = {}) {
|
|
14
|
+
const url = `${this.config.url}/api${endpoint}${endpoint.includes('?') ? '&' : '?'}apikey=${this.config.apiKey}`;
|
|
15
|
+
const response = await fetch(url, {
|
|
16
|
+
...options,
|
|
17
|
+
headers: {
|
|
18
|
+
'Content-Type': 'application/json',
|
|
19
|
+
...options.headers,
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
if (!response.ok) {
|
|
23
|
+
const errorText = await response.text();
|
|
24
|
+
throw new Error(`Bazarr API error: ${response.status} ${response.statusText} - ${errorText}`);
|
|
25
|
+
}
|
|
26
|
+
return response.json();
|
|
27
|
+
}
|
|
28
|
+
// System endpoints
|
|
29
|
+
async getStatus() {
|
|
30
|
+
const result = await this.request('/system/status');
|
|
31
|
+
return result.data;
|
|
32
|
+
}
|
|
33
|
+
async getHealth() {
|
|
34
|
+
const result = await this.request('/system/health');
|
|
35
|
+
return result.data;
|
|
36
|
+
}
|
|
37
|
+
async getLanguages() {
|
|
38
|
+
return this.request('/system/languages');
|
|
39
|
+
}
|
|
40
|
+
async getEnabledLanguages() {
|
|
41
|
+
const languages = await this.getLanguages();
|
|
42
|
+
return languages.filter(lang => lang.enabled);
|
|
43
|
+
}
|
|
44
|
+
async getTasks() {
|
|
45
|
+
const result = await this.request('/system/tasks');
|
|
46
|
+
return result.data;
|
|
47
|
+
}
|
|
48
|
+
async runTask(taskId) {
|
|
49
|
+
await this.request(`/system/tasks?taskid=${taskId}`, { method: 'POST' });
|
|
50
|
+
}
|
|
51
|
+
async getBadges() {
|
|
52
|
+
return this.request('/badges');
|
|
53
|
+
}
|
|
54
|
+
async getProviders() {
|
|
55
|
+
const result = await this.request('/system/providers');
|
|
56
|
+
return result.data;
|
|
57
|
+
}
|
|
58
|
+
// Series endpoints
|
|
59
|
+
async getSeries() {
|
|
60
|
+
const result = await this.request('/series');
|
|
61
|
+
return result.data;
|
|
62
|
+
}
|
|
63
|
+
async getSeriesById(seriesId) {
|
|
64
|
+
const result = await this.request(`/series?seriesid[]=${seriesId}`);
|
|
65
|
+
return result.data[0];
|
|
66
|
+
}
|
|
67
|
+
async getEpisodes(seriesId) {
|
|
68
|
+
const result = await this.request(`/episodes?seriesid[]=${seriesId}`);
|
|
69
|
+
return result.data;
|
|
70
|
+
}
|
|
71
|
+
async getEpisodeById(episodeId) {
|
|
72
|
+
const result = await this.request(`/episodes?episodeid[]=${episodeId}`);
|
|
73
|
+
return result.data[0];
|
|
74
|
+
}
|
|
75
|
+
async getWantedEpisodes(page = 1, pageSize = 50) {
|
|
76
|
+
const start = (page - 1) * pageSize;
|
|
77
|
+
return this.request(`/episodes/wanted?start=${start}&length=${pageSize}`);
|
|
78
|
+
}
|
|
79
|
+
async searchEpisodeSubtitles(episodeId, language) {
|
|
80
|
+
const result = await this.request(`/providers/episodes?episodeid=${episodeId}&language=${language}`);
|
|
81
|
+
return result.data;
|
|
82
|
+
}
|
|
83
|
+
async downloadEpisodeSubtitle(episodeId, provider, subtitle, language, forced = false, hi = false) {
|
|
84
|
+
await this.request('/providers/episodes', {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
body: JSON.stringify({
|
|
87
|
+
episodeid: episodeId,
|
|
88
|
+
provider,
|
|
89
|
+
subtitle,
|
|
90
|
+
language,
|
|
91
|
+
forced,
|
|
92
|
+
hi,
|
|
93
|
+
}),
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
async searchMissingEpisodeSubtitles(seriesId) {
|
|
97
|
+
const endpoint = seriesId
|
|
98
|
+
? `/episodes/subtitles?seriesid=${seriesId}`
|
|
99
|
+
: '/episodes/subtitles';
|
|
100
|
+
await this.request(endpoint, { method: 'POST' });
|
|
101
|
+
}
|
|
102
|
+
// Movie endpoints
|
|
103
|
+
async getMovies() {
|
|
104
|
+
const result = await this.request('/movies');
|
|
105
|
+
return result.data;
|
|
106
|
+
}
|
|
107
|
+
async getMovieById(movieId) {
|
|
108
|
+
const result = await this.request(`/movies?radarrid[]=${movieId}`);
|
|
109
|
+
return result.data[0];
|
|
110
|
+
}
|
|
111
|
+
async getWantedMovies(page = 1, pageSize = 50) {
|
|
112
|
+
const start = (page - 1) * pageSize;
|
|
113
|
+
return this.request(`/movies/wanted?start=${start}&length=${pageSize}`);
|
|
114
|
+
}
|
|
115
|
+
async searchMovieSubtitles(movieId, language) {
|
|
116
|
+
const result = await this.request(`/providers/movies?radarrid=${movieId}&language=${language}`);
|
|
117
|
+
return result.data;
|
|
118
|
+
}
|
|
119
|
+
async downloadMovieSubtitle(movieId, provider, subtitle, language, forced = false, hi = false) {
|
|
120
|
+
await this.request('/providers/movies', {
|
|
121
|
+
method: 'POST',
|
|
122
|
+
body: JSON.stringify({
|
|
123
|
+
radarrid: movieId,
|
|
124
|
+
provider,
|
|
125
|
+
subtitle,
|
|
126
|
+
language,
|
|
127
|
+
forced,
|
|
128
|
+
hi,
|
|
129
|
+
}),
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
async searchMissingMovieSubtitles(movieId) {
|
|
133
|
+
const endpoint = movieId
|
|
134
|
+
? `/movies/subtitles?radarrid=${movieId}`
|
|
135
|
+
: '/movies/subtitles';
|
|
136
|
+
await this.request(endpoint, { method: 'POST' });
|
|
137
|
+
}
|
|
138
|
+
// History endpoints
|
|
139
|
+
async getSeriesHistory(page = 1, pageSize = 50) {
|
|
140
|
+
const start = (page - 1) * pageSize;
|
|
141
|
+
return this.request(`/history/series?start=${start}&length=${pageSize}`);
|
|
142
|
+
}
|
|
143
|
+
async getMovieHistory(page = 1, pageSize = 50) {
|
|
144
|
+
const start = (page - 1) * pageSize;
|
|
145
|
+
return this.request(`/history/movies?start=${start}&length=${pageSize}`);
|
|
146
|
+
}
|
|
147
|
+
// Sync endpoints
|
|
148
|
+
async syncSeries() {
|
|
149
|
+
await this.runTask('update_series');
|
|
150
|
+
}
|
|
151
|
+
async syncMovies() {
|
|
152
|
+
await this.runTask('update_movies');
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
//# sourceMappingURL=bazarr-client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bazarr-client.js","sourceRoot":"","sources":["../src/bazarr-client.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAqKH,MAAM,OAAO,YAAY;IACf,MAAM,CAAe;IAE7B,YAAY,MAAoB;QAC9B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEO,KAAK,CAAC,OAAO,CAAI,QAAgB,EAAE,UAAuB,EAAE;QAClE,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,OAAO,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,UAAU,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;QAEjH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAChC,GAAG,OAAO;YACV,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;gBAClC,GAAG,OAAO,CAAC,OAAO;aACnB;SACF,CAAC,CAAC;QAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CAAC,qBAAqB,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,MAAM,SAAS,EAAE,CAAC,CAAC;QAChG,CAAC;QAED,OAAO,QAAQ,CAAC,IAAI,EAAgB,CAAC;IACvC,CAAC;IAED,mBAAmB;IACnB,KAAK,CAAC,SAAS;QACb,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAyB,gBAAgB,CAAC,CAAC;QAC5E,OAAO,MAAM,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P tools.
|
|
5
|
+
*/
|
|
6
|
+
import { BazarrClient } from "./bazarr-client.js";
|
|
7
|
+
export declare function handleBazarrTool(client: BazarrClient, toolName: string, args: Record<string, unknown>): Promise<string>;
|
|
8
|
+
//# sourceMappingURL=bazarr-handlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bazarr-handlers.d.ts","sourceRoot":"","sources":["../src/bazarr-handlers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC5B,OAAO,CAAC,MAAM,CAAC,CAoYjB"}
|