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:
Ludvig Lundgren 2021-08-22 00:55:00 +02:00 committed by GitHub
parent 455284a94b
commit fce6c7149a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 594 additions and 5 deletions

View file

@ -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

View file

@ -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"
};

View file

@ -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 {

View file

@ -257,6 +257,7 @@ function FilterActionAddForm({ filter, isOpen, toggle, clients }: props) {
</div>
);
case "RADARR":
case "SONARR":
return (
<div>
<DownloadClientSelect

View file

@ -48,4 +48,5 @@ export const componentMap: any = {
DELUGE_V2: <FormDefaultClientFields />,
QBITTORRENT: <FormDefaultClientFields />,
RADARR: <FormRadarrFields />,
SONARR: <FormRadarrFields />,
};