feat: radarr edit/create modal/backend functionality

This commit is contained in:
sct
2020-11-02 12:11:28 +00:00
parent e032e385a5
commit c4ac357ef4
14 changed files with 968 additions and 16 deletions

View File

@@ -116,6 +116,9 @@ components:
activeProfileId:
type: number
example: 1
activeProfileName:
type: string
example: 720p/1080p
activeDirectory:
type: string
example: '/movies'
@@ -125,16 +128,21 @@ components:
minimumAvailability:
type: string
example: 'In Cinema'
isDefault:
type: boolean
example: false
required:
- name
- hostname
- port
- apiKey
- useSsl
- activeProfile
- activeProfileId
- activeProfileName
- activeDirectory
- is4k
- minimumAvailability
- isDefault
SonarrSettings:
type: object
properties:
@@ -162,12 +170,18 @@ components:
activeProfileId:
type: number
example: 1
activeProfileName:
type: string
example: 720p/1080p
activeDirectory:
type: string
example: '/tv/'
activeAnimeProfileId:
type: number
nullable: true
activeAnimeProfileName:
type: string
example: 720p/1080p
activeAnimeDirectory:
type: string
nullable: true
@@ -177,6 +191,9 @@ components:
enableSeasonFolders:
type: boolean
example: false
isDefault:
type: boolean
example: false
required:
- name
- hostname
@@ -184,9 +201,11 @@ components:
- apiKey
- useSsl
- activeProfileId
- activeProfileName
- activeDirectory
- is4k
- enableSeasonFolders
- isDefault
PublicSettings:
type: object
properties:
@@ -704,6 +723,15 @@ components:
type: string
twitterId:
type: string
ServiceProfile:
type: object
properties:
id:
type: number
example: 1
name:
type: string
example: 720p/1080p
securitySchemes:
cookieAuth:
@@ -877,6 +905,50 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/RadarrSettings'
/settings/radarr/test:
post:
summary: Test radarr configuration
description: Test if the provided Radarr congifuration values are valid. Returns profiles and root folders on success
tags:
- settings
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
hostname:
type: string
example: '127.0.0.1'
port:
type: number
example: 7878
apiKey:
type: string
example: yourapikey
useSsl:
type: boolean
example: false
baseUrl:
type: string
required:
- hostname
- port
- apiKey
- useSsl
responses:
'200':
description: Succesfully connected to Radarr instance
content:
application/json:
schema:
type: object
properties:
profiles:
type: array
items:
$ref: '#/components/schemas/ServiceProfile'
/settings/radarr/{radarrId}:
put:
summary: Update existing radarr instance
@@ -922,6 +994,28 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/RadarrSettings'
/settings/radarr/{radarrId}/profiles:
get:
summary: Retrieve available profiles for the Radarr instance
description: Returns an array of profile available on the Radarr server instance in JSON format
tags:
- settings
parameters:
- in: path
name: radarrId
required: true
schema:
type: integer
description: Radarr Instance ID
responses:
'200':
description: Returned list of profiles
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ServiceProfile'
/settings/sonarr:
get:
summary: Get all sonarr settings