fix: various fixes for new tags feature (#1369)

* fix(backend): fix movie override tags check

* fix(lang): fix 'no tags' and 'anime tags' strings

* fix(logging): correct capitalization of Radarr/Sonarr

* fix(ui): consistently disable tag select / display loading placeholder
This commit is contained in:
TheCatLady
2021-04-05 18:56:21 -04:00
committed by GitHub
parent 7a5c4a30b5
commit b4450a308c
5 changed files with 32 additions and 23 deletions

View File

@@ -361,7 +361,7 @@ export class MediaRequest {
const settings = getSettings();
if (settings.radarr.length === 0 && !settings.radarr[0]) {
logger.info(
'Skipped radarr request as there is no radarr configured',
'Skipped Radarr request as there is no Radarr server configured',
{ label: 'Media Request' }
);
return;
@@ -389,7 +389,9 @@ export class MediaRequest {
logger.info(
`There is no default ${
this.is4k ? '4K ' : ''
}radarr configured. Did you set any of your Radarr servers as default?`,
}Radarr server configured. Did you set any of your ${
this.is4k ? '4K ' : ''
}Radarr servers as default?`,
{ label: 'Media Request' }
);
return;
@@ -420,11 +422,7 @@ export class MediaRequest {
});
}
if (
this.tags &&
(radarrSettings.tags.length !== (this.tags?.length ?? 0) ||
radarrSettings.tags.every((num) => (this.tags ?? []).includes(num)))
) {
if (this.tags && !isEqual(this.tags, radarrSettings.tags)) {
tags = this.tags;
logger.info(`Request has override tags`, {
label: 'Media Request',
@@ -505,7 +503,7 @@ export class MediaRequest {
});
logger.info('Sent request to Radarr', { label: 'Media Request' });
} catch (e) {
const errorMessage = `Request failed to send to radarr: ${e.message}`;
const errorMessage = `Request failed to send to Radarr: ${e.message}`;
logger.error('Request failed to send to Radarr', {
label: 'Media Request',
errorMessage,
@@ -525,7 +523,7 @@ export class MediaRequest {
const settings = getSettings();
if (settings.sonarr.length === 0 && !settings.sonarr[0]) {
logger.info(
'Skipped sonarr request as there is no sonarr configured',
'Skipped Sonarr request as there is no Sonarr server configured',
{ label: 'Media Request' }
);
return;
@@ -553,7 +551,9 @@ export class MediaRequest {
logger.info(
`There is no default ${
this.is4k ? '4K ' : ''
}sonarr configured. Did you set any of your Sonarr servers as default?`,
}Sonarr server configured. Did you set any of your ${
this.is4k ? '4K ' : ''
}Sonarr servers as default?`,
{ label: 'Media Request' }
);
return;
@@ -654,7 +654,7 @@ export class MediaRequest {
tags = this.tags;
logger.info(`Request has override tags`, {
label: 'Media Request',
tags,
tagIds: tags,
});
}
@@ -719,7 +719,7 @@ export class MediaRequest {
});
logger.info('Sent request to Sonarr', { label: 'Media Request' });
} catch (e) {
const errorMessage = `Request failed to send to sonarr: ${e.message}`;
const errorMessage = `Request failed to send to Sonarr: ${e.message}`;
logger.error('Request failed to send to Sonarr', {
label: 'Media Request',
errorMessage,