mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
Feature: Sonarr (#14)
* feat: add sonarr download client * feat(web): add sonarr download client and actions * feat: add sonarr to filter actions
This commit is contained in:
parent
455284a94b
commit
fce6c7149a
15 changed files with 594 additions and 5 deletions
|
@ -316,6 +316,7 @@ function ListItem({ action, clients, filterID, idx }: ListItemProps) {
|
|||
</div>
|
||||
);
|
||||
case "RADARR":
|
||||
case "SONARR":
|
||||
return (
|
||||
<div className="mt-6 grid grid-cols-12 gap-6">
|
||||
<DownloadClientSelect
|
||||
|
|
|
@ -73,12 +73,14 @@ export const DownloadClientTypeOptions: radioFieldsetOption[] = [
|
|||
{label: "Deluge", description: "Add torrents directly to Deluge", value: DOWNLOAD_CLIENT_TYPES.DelugeV1},
|
||||
{label: "Deluge 2", description: "Add torrents directly to Deluge 2", value: DOWNLOAD_CLIENT_TYPES.DelugeV2},
|
||||
{label: "Radarr", description: "Send to Radarr and let it decide", value: DOWNLOAD_CLIENT_TYPES.Radarr},
|
||||
{label: "Sonarr", description: "Send to Sonarr and let it decide", value: DOWNLOAD_CLIENT_TYPES.Sonarr},
|
||||
];
|
||||
export const DownloadClientTypeNameMap = {
|
||||
"DELUGE_V1": "Deluge v1",
|
||||
"DELUGE_V2": "Deluge v2",
|
||||
"QBITTORRENT": "qBittorrent",
|
||||
"RADARR": "Radarr",
|
||||
"SONARR": "Sonarr"
|
||||
};
|
||||
|
||||
export const ActionTypeOptions: radioFieldsetOption[] = [
|
||||
|
@ -89,6 +91,7 @@ export const ActionTypeOptions: radioFieldsetOption[] = [
|
|||
{label: "Deluge", description: "Add torrents directly to Deluge", value: "DELUGE_V1"},
|
||||
{label: "Deluge v2", description: "Add torrents directly to Deluge 2", value: "DELUGE_V2"},
|
||||
{label: "Radarr", description: "Send to Radarr and let it decide", value: DOWNLOAD_CLIENT_TYPES.Radarr},
|
||||
{label: "Sonarr", description: "Send to Sonarr and let it decide", value: DOWNLOAD_CLIENT_TYPES.Sonarr},
|
||||
];
|
||||
|
||||
export const ActionTypeNameMap = {
|
||||
|
@ -98,5 +101,6 @@ export const ActionTypeNameMap = {
|
|||
"DELUGE_V1": "Deluge v1",
|
||||
"DELUGE_V2": "Deluge v2",
|
||||
"QBITTORRENT": "qBittorrent",
|
||||
"RADARR": "Radarr"
|
||||
"RADARR": "Radarr",
|
||||
"SONARR": "Sonarr"
|
||||
};
|
||||
|
|
|
@ -64,17 +64,18 @@ export interface Filter {
|
|||
indexers: Indexer[];
|
||||
}
|
||||
|
||||
export type ActionType = 'TEST' | 'EXEC' | 'WATCH_FOLDER' | 'QBITTORRENT' | 'DELUGE_V1' | 'DELUGE_V2' | 'RADARR';
|
||||
export const ACTIONTYPES: ActionType[] = ['TEST', 'EXEC' , 'WATCH_FOLDER' , 'QBITTORRENT' , 'DELUGE_V1', 'DELUGE_V2', 'RADARR'];
|
||||
export type ActionType = 'TEST' | 'EXEC' | 'WATCH_FOLDER' | 'QBITTORRENT' | 'DELUGE_V1' | 'DELUGE_V2' | 'RADARR' | 'SONARR';
|
||||
export const ACTIONTYPES: ActionType[] = ['TEST', 'EXEC' , 'WATCH_FOLDER' , 'QBITTORRENT' , 'DELUGE_V1', 'DELUGE_V2', 'RADARR', 'SONARR'];
|
||||
|
||||
|
||||
export type DownloadClientType = 'QBITTORRENT' | 'DELUGE_V1' | 'DELUGE_V2' | 'RADARR';
|
||||
export type DownloadClientType = 'QBITTORRENT' | 'DELUGE_V1' | 'DELUGE_V2' | 'RADARR' | 'SONARR';
|
||||
|
||||
export enum DOWNLOAD_CLIENT_TYPES {
|
||||
qBittorrent = 'QBITTORRENT',
|
||||
DelugeV1 = 'DELUGE_V1',
|
||||
DelugeV2 = 'DELUGE_V2',
|
||||
Radarr = 'RADARR'
|
||||
Radarr = 'RADARR',
|
||||
Sonarr = 'SONARR'
|
||||
}
|
||||
|
||||
export interface DownloadClient {
|
||||
|
|
|
@ -257,6 +257,7 @@ function FilterActionAddForm({ filter, isOpen, toggle, clients }: props) {
|
|||
</div>
|
||||
);
|
||||
case "RADARR":
|
||||
case "SONARR":
|
||||
return (
|
||||
<div>
|
||||
<DownloadClientSelect
|
||||
|
|
|
@ -48,4 +48,5 @@ export const componentMap: any = {
|
|||
DELUGE_V2: <FormDefaultClientFields />,
|
||||
QBITTORRENT: <FormDefaultClientFields />,
|
||||
RADARR: <FormRadarrFields />,
|
||||
SONARR: <FormRadarrFields />,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue