mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-01 04:08:45 -05:00
feat(servarr): auto fill base url when testing service if missing (#1995)
* feat(servarr): auto fill base url when testing service if missing This will fill the base URL of the *arr service only if it's missing and the base URL hasn't been provided beforehand * fix(servarr): replace redundant check * fix(servarr): suggested changes
This commit is contained in:
committed by
GitHub
parent
54e9071e90
commit
739f667b54
@@ -42,6 +42,7 @@ sonarrRoutes.post('/test', async (req, res, next) => {
|
||||
url: SonarrAPI.buildUrl(req.body, '/api/v3'),
|
||||
});
|
||||
|
||||
const { urlBase } = await sonarr.getSystemStatus();
|
||||
const profiles = await sonarr.getProfiles();
|
||||
const folders = await sonarr.getRootFolders();
|
||||
const languageProfiles = await sonarr.getLanguageProfiles();
|
||||
@@ -55,6 +56,10 @@ sonarrRoutes.post('/test', async (req, res, next) => {
|
||||
})),
|
||||
languageProfiles,
|
||||
tags,
|
||||
urlBase:
|
||||
req.body.baseUrl && req.body.baseUrl !== '/'
|
||||
? req.body.baseUrl
|
||||
: urlBase,
|
||||
});
|
||||
} catch (e) {
|
||||
logger.error('Failed to test Sonarr', {
|
||||
|
||||
Reference in New Issue
Block a user