Add Lidarr/Readarr backend support

- Add MUSIC and BOOK to MediaType enum
- Add permission flags for music/book requests
- Create Lidarr API adapter (artist/album search, add, remove)
- Create Readarr API adapter (book/author search, add, remove)
- Add Lidarr/Readarr settings interfaces and routes
- Add music and book API routes for search/detail
- Register all new routes in main router and settings router
This commit is contained in:
root
2026-04-03 21:05:21 -05:00
parent dc40ca413c
commit 1cf0d541d6
11 changed files with 985 additions and 0 deletions

View File

@@ -102,6 +102,16 @@ export interface SonarrSettings extends DVRSettings {
monitorNewItems: 'all' | 'none';
}
export interface LidarrSettings extends DVRSettings {
activeMetadataProfileId: number;
activeMetadataProfileName: string;
}
export interface ReadarrSettings extends DVRSettings {
activeMetadataProfileId: number;
activeMetadataProfileName: string;
}
interface Quota {
quotaLimit?: number;
quotaDays?: number;
@@ -137,6 +147,8 @@ export interface MainSettings {
defaultQuotas: {
movie: Quota;
tv: Quota;
music: Quota;
book: Quota;
};
hideAvailable: boolean;
hideBlocklisted: boolean;
@@ -368,6 +380,8 @@ export interface AllSettings {
tautulli: TautulliSettings;
radarr: RadarrSettings[];
sonarr: SonarrSettings[];
lidarr: LidarrSettings[];
readarr: ReadarrSettings[];
public: PublicSettings;
notifications: NotificationSettings;
jobs: Record<JobId, JobSettings>;
@@ -398,6 +412,8 @@ class Settings {
defaultQuotas: {
movie: {},
tv: {},
music: {},
book: {},
},
hideAvailable: false,
hideBlocklisted: false,
@@ -441,6 +457,8 @@ class Settings {
},
radarr: [],
sonarr: [],
lidarr: [],
readarr: [],
public: {
initialized: false,
},
@@ -673,6 +691,22 @@ class Settings {
this.data.sonarr = data;
}
get lidarr(): LidarrSettings[] {
return this.data.lidarr;
}
set lidarr(data: LidarrSettings[]) {
this.data.lidarr = data;
}
get readarr(): ReadarrSettings[] {
return this.data.readarr;
}
set readarr(data: ReadarrSettings[]) {
this.data.readarr = data;
}
get public(): PublicSettings {
return this.data.public;
}