mirror of
https://github.com/Radarr/Radarr
synced 2026-05-07 10:10:59 +02:00
Rename retroApplyTags to tagExisting across frontend and backend for consistent terminology.
This commit is contained in:
parent
e7642c5092
commit
68c3400bb0
13 changed files with 39 additions and 38 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ const COLUMNS = [
|
|||
isVisible: true,
|
||||
},
|
||||
{
|
||||
name: 'retroApplyTags',
|
||||
label: () => translate('RetroApplyTags'),
|
||||
name: 'tagExisting',
|
||||
label: () => translate('TagExisting'),
|
||||
isSortable: true,
|
||||
isVisible: true,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
.minimumAvailability,
|
||||
.qualityProfileId,
|
||||
.rootFolderPath,
|
||||
.tagExisting,
|
||||
.implementation {
|
||||
composes: cell from '~Components/Table/Cells/TableRowCell.css';
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ interface CssExports {
|
|||
'name': string;
|
||||
'qualityProfileId': string;
|
||||
'rootFolderPath': string;
|
||||
'tagExisting': string;
|
||||
'tags': string;
|
||||
}
|
||||
export const cssExports: CssExports;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ interface ImportList extends Provider {
|
|||
minRefreshInterval: string;
|
||||
name: string;
|
||||
tags: number[];
|
||||
retroApplyTags: boolean;
|
||||
tagExisting: boolean;
|
||||
}
|
||||
|
||||
export default ImportList;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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}",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue