Rename retroApplyTags to tagExisting across frontend and backend for consistent terminology.

This commit is contained in:
scphantm 2026-04-23 00:01:25 -04:00
parent e7642c5092
commit 68c3400bb0
No known key found for this signature in database
GPG key ID: 3512C53D8C6FC41E
13 changed files with 39 additions and 38 deletions

View file

@ -78,7 +78,7 @@ function EditImportListModalContent({
qualityProfileId,
searchOnAdd,
tags,
retroApplyTags,
tagExisting,
fields,
} = item;
@ -258,13 +258,13 @@ function EditImportListModalContent({
</FormGroup>
<FormGroup>
<FormLabel>{translate('RadarrRetroactiveApply')}</FormLabel>
<FormLabel>{translate('TagExisting')}</FormLabel>
<FormInputGroup
type={inputTypes.CHECK}
name="retroApplyTags"
helpText={translate('RetroApplyListTagsHelpText')}
{...retroApplyTags}
name="tagExisting"
helpText={translate('TagExistingHelpText')}
{...tagExisting}
onChange={handleInputChange}
/>
</FormGroup>

View file

@ -18,7 +18,7 @@ interface SavePayload {
qualityProfileId?: number;
minimumAvailability?: string;
rootFolderPath?: string;
retroApplyTags?: boolean;
tagExisting?: boolean;
}
interface ManageImportListsEditModalContentProps {
@ -63,7 +63,7 @@ function ManageImportListsEditModalContent(
);
const [minimumAvailability, setMinimumAvailability] = useState(NO_CHANGE);
const [rootFolderPath, setRootFolderPath] = useState(NO_CHANGE);
const [retroApplyTags, setRetroApplyTags] = useState(NO_CHANGE);
const [tagExisting, setTagExisting] = useState(NO_CHANGE);
const save = useCallback(() => {
let hasChanges = false;
const payload: SavePayload = {};
@ -92,9 +92,9 @@ function ManageImportListsEditModalContent(
hasChanges = true;
payload.rootFolderPath = rootFolderPath;
}
if (retroApplyTags !== NO_CHANGE) {
if (tagExisting !== NO_CHANGE) {
hasChanges = true;
payload.retroApplyTags = retroApplyTags === 'enabled';
payload.tagExisting = tagExisting === 'enabled';
}
if (hasChanges) {
@ -108,7 +108,7 @@ function ManageImportListsEditModalContent(
qualityProfileId,
minimumAvailability,
rootFolderPath,
retroApplyTags,
tagExisting,
onSavePress,
onModalClose,
]);
@ -130,8 +130,8 @@ function ManageImportListsEditModalContent(
case 'rootFolderPath':
setRootFolderPath(value as string);
break;
case 'retroApplyTags':
setRetroApplyTags(value as string);
case 'tagExisting':
setTagExisting(value as string);
break;
default:
console.warn(`EditImportListModalContent Unknown Input: '${name}'`);
@ -210,12 +210,12 @@ function ManageImportListsEditModalContent(
</FormGroup>
<FormGroup>
<FormLabel>{translate('RetroApplyTags')}</FormLabel>
<FormLabel>{translate('TagExisting')}</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
name="retroApplyTags"
value={retroApplyTags}
name="tagExisting"
value={tagExisting}
values={enableOptions}
onChange={onInputChange}
/>

View file

@ -83,8 +83,8 @@ const COLUMNS = [
isVisible: true,
},
{
name: 'retroApplyTags',
label: () => translate('RetroApplyTags'),
name: 'tagExisting',
label: () => translate('TagExisting'),
isSortable: true,
isVisible: true,
},

View file

@ -5,6 +5,7 @@
.minimumAvailability,
.qualityProfileId,
.rootFolderPath,
.tagExisting,
.implementation {
composes: cell from '~Components/Table/Cells/TableRowCell.css';

View file

@ -8,6 +8,7 @@ interface CssExports {
'name': string;
'qualityProfileId': string;
'rootFolderPath': string;
'tagExisting': string;
'tags': string;
}
export const cssExports: CssExports;

View file

@ -19,7 +19,7 @@ interface ManageImportListsModalRowProps {
minimumAvailability: string;
implementation: string;
tags: number[];
retroApplyTags: boolean;
tagExisting: boolean;
enabled: boolean;
enableAuto: boolean;
columns: Column[];
@ -39,7 +39,7 @@ function ManageImportListsModalRow(props: ManageImportListsModalRowProps) {
enabled,
enableAuto,
tags,
retroApplyTags,
tagExisting,
onSelectedChange,
} = props;
@ -94,8 +94,8 @@ function ManageImportListsModalRow(props: ManageImportListsModalRowProps) {
<MovieTagList tags={tags} />
</TableRowCell>
<TableRowCell className={styles.enabled}>
{retroApplyTags ? translate('Yes') : translate('No')}
<TableRowCell className={styles.tagExisting}>
{tagExisting ? translate('Yes') : translate('No')}
</TableRowCell>
</TableRow>
);

View file

@ -15,7 +15,7 @@ interface ImportList extends Provider {
minRefreshInterval: string;
name: string;
tags: number[];
retroApplyTags: boolean;
tagExisting: boolean;
}
export default ImportList;

View file

@ -4,10 +4,10 @@
namespace NzbDrone.Core.Datastore.Migration;
[Migration(243)]
public class add_retroapply_to_importlists : NzbDroneMigrationBase
public class add_tag_existing_to_importlists : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Alter.Table("ImportLists").AddColumn("RetroApplyTags").AsBoolean().WithDefaultValue(false);
Alter.Table("ImportLists").AddColumn("TagExisting").AsBoolean().WithDefaultValue(false);
}
}

View file

@ -16,7 +16,7 @@ public class ImportListDefinition : ProviderDefinition, IEquatable<ImportListDef
public int QualityProfileId { get; set; }
public string RootFolderPath { get; set; }
public bool SearchOnAdd { get; set; }
public bool RetroApplyTags { get; set; }
public bool TagExisting { get; set; }
[MemberwiseEqualityIgnore]
public override bool Enable => Enabled;

View file

@ -81,10 +81,10 @@ private void ProcessMovieReport(ImportListDefinition importList, ImportListMovie
return;
}
// Check to see if movie in DB and maybe apply retro-tags
// Check to see if movie in DB and maybe apply tags
if (dbMovies.Contains(report.TmdbId))
{
RetroApplyTags(importList, report);
TagExisting(importList, report);
_logger.Debug("{0} [{1}] Rejected, Movie Exists in DB", report.TmdbId, report.Title);
return;
}
@ -130,9 +130,9 @@ private void ProcessMovieReport(ImportListDefinition importList, ImportListMovie
}
}
private void RetroApplyTags(ImportListDefinition importList, ImportListMovie report)
private void TagExisting(ImportListDefinition importList, ImportListMovie report)
{
if (importList.RetroApplyTags)
if (importList.TagExisting)
{
var movie = _movieService.FindByTmdbId(report.TmdbId);
@ -145,7 +145,7 @@ private void RetroApplyTags(ImportListDefinition importList, ImportListMovie rep
if (preCount != movie.Tags.Count)
{
_movieService.UpdateMovie(movie);
_logger.Debug("{0} [{1}] Retro-Actively added tags to movie", report.TmdbId, report.Title);
_logger.Debug("{0} [{1}] Tagged existing movie", report.TmdbId, report.Title);
}
}
}

View file

@ -1547,7 +1547,6 @@
"QueueLoadError": "Failed to load Queue",
"Queued": "Queued",
"QuickImport": "Move Automatically",
"RadarrRetroactiveApply": "Retro-Apply Tags",
"RadarrTags": "{appName} Tags",
"Rating": "Rating",
"Ratings": "Ratings",
@ -1698,8 +1697,8 @@
"Result": "Result",
"Retention": "Retention",
"RetentionHelpText": "Usenet only: Set to zero to set for unlimited retention",
"RetroApplyListTagsHelpText": "Retro-Actively apply tags to movies already in Radarr",
"RetroApplyTags": "Retro-Actively Apply Tags",
"TagExistingHelpText": "Tag existing movies in {appName}",
"TagExisting": "Tag Existing",
"RetryingDownloadOn": "Retrying download on {date} at {time}",
"RootFolder": "Root Folder",
"RootFolderCheckMultipleMessage": "Multiple root folders are missing: {rootFolderPaths}",

View file

@ -11,7 +11,7 @@ public class ImportListBulkResource : ProviderBulkResource<ImportListBulkResourc
public string RootFolderPath { get; set; }
public int? QualityProfileId { get; set; }
public MovieStatusType? MinimumAvailability { get; set; }
public bool? RetroApplyTags { get; set; }
public bool? TagExisting { get; set; }
}
public class ImportListBulkResourceMapper : ProviderBulkResourceMapper<ImportListBulkResource, ImportListDefinition>
@ -30,7 +30,7 @@ public override List<ImportListDefinition> UpdateModel(ImportListBulkResource re
existing.RootFolderPath = resource.RootFolderPath ?? existing.RootFolderPath;
existing.QualityProfileId = resource.QualityProfileId ?? existing.QualityProfileId;
existing.MinimumAvailability = resource.MinimumAvailability ?? existing.MinimumAvailability;
existing.RetroApplyTags = resource.RetroApplyTags ?? existing.RetroApplyTags;
existing.TagExisting = resource.TagExisting ?? existing.TagExisting;
});
return existingDefinitions;

View file

@ -16,7 +16,7 @@ public class ImportListResource : ProviderResource<ImportListResource>
public ImportListType ListType { get; set; }
public int ListOrder { get; set; }
public TimeSpan MinRefreshInterval { get; set; }
public bool RetroApplyTags { get; set; }
public bool TagExisting { get; set; }
}
public class ImportListResourceMapper : ProviderResourceMapper<ImportListResource, ImportListDefinition>
@ -40,7 +40,7 @@ public override ImportListResource ToResource(ImportListDefinition definition)
resource.ListType = definition.ListType;
resource.ListOrder = (int)definition.ListType;
resource.MinRefreshInterval = definition.MinRefreshInterval;
resource.RetroApplyTags = definition.RetroApplyTags;
resource.TagExisting = definition.TagExisting;
return resource;
}
@ -63,7 +63,7 @@ public override ImportListDefinition ToModel(ImportListResource resource, Import
definition.MinimumAvailability = resource.MinimumAvailability;
definition.ListType = resource.ListType;
definition.MinRefreshInterval = resource.MinRefreshInterval;
definition.RetroApplyTags = resource.RetroApplyTags;
definition.TagExisting = resource.TagExisting;
return definition;
}