mirror of
https://github.com/Readarr/Readarr
synced 2025-12-24 17:24:13 +01:00
New: Make monitoring existing books on an import list optional
This commit is contained in:
parent
33e5351add
commit
b05bd685bc
6 changed files with 38 additions and 3 deletions
|
|
@ -73,6 +73,7 @@ function EditImportListModalContent(props) {
|
|||
name,
|
||||
enableAutomaticAdd,
|
||||
shouldMonitor,
|
||||
shouldMonitorExisting,
|
||||
shouldSearch,
|
||||
rootFolderPath,
|
||||
qualityProfileId,
|
||||
|
|
@ -167,6 +168,20 @@ function EditImportListModalContent(props) {
|
|||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('ShouldMonitorExisting')}
|
||||
</FormLabel>
|
||||
|
||||
<FormInputGroup
|
||||
type={inputTypes.CHECK}
|
||||
name="shouldMonitorExisting"
|
||||
helpText={translate('ShouldMonitorExistingHelpText')}
|
||||
{...shouldMonitorExisting}
|
||||
onChange={onInputChange}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
<FormGroup>
|
||||
<FormLabel>
|
||||
{translate('SearchForNewItems')}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(17)]
|
||||
public class ImportListMonitorExisting : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Alter.Table("ImportLists").AddColumn("ShouldMonitorExisting").AsInt32().WithDefaultValue(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ public class ImportListDefinition : ProviderDefinition
|
|||
{
|
||||
public bool EnableAutomaticAdd { get; set; }
|
||||
public ImportListMonitorType ShouldMonitor { get; set; }
|
||||
public bool ShouldMonitorExisting { get; set; }
|
||||
public bool ShouldSearch { get; set; }
|
||||
public int ProfileId { get; set; }
|
||||
public int MetadataProfileId { get; set; }
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ private void ProcessBookReport(ImportListDefinition importList, ImportListItemIn
|
|||
{
|
||||
_logger.Debug("{0} [{1}] Rejected, Book Exists in DB. Ensuring Book and Author monitored.", report.EditionGoodreadsId, report.Book);
|
||||
|
||||
if (importList.ShouldMonitor != ImportListMonitorType.None)
|
||||
if (importList.ShouldMonitorExisting && importList.ShouldMonitor != ImportListMonitorType.None)
|
||||
{
|
||||
if (!existingBook.Monitored)
|
||||
{
|
||||
|
|
@ -307,7 +307,7 @@ private Author ProcessAuthorReport(ImportListDefinition importList, ImportListIt
|
|||
{
|
||||
_logger.Debug("{0} [{1}] Rejected, Author Exists in DB. Ensuring Author monitored", report.AuthorGoodreadsId, report.Author);
|
||||
|
||||
if (!existingAuthor.Monitored)
|
||||
if (importList.ShouldMonitorExisting && !existingAuthor.Monitored)
|
||||
{
|
||||
existingAuthor.Monitored = true;
|
||||
_authorService.UpdateAuthor(existingAuthor);
|
||||
|
|
|
|||
|
|
@ -569,7 +569,9 @@
|
|||
"SetPermissionsLinuxHelpTextWarning": "If you're unsure what these settings do, do not alter them.",
|
||||
"Settings": "Settings",
|
||||
"ShortDateFormat": "Short Date Format",
|
||||
"ShouldMonitorHelpText": "Monitor authors and books added from this list",
|
||||
"ShouldMonitorHelpText": "Monitor new authors and books added from this list",
|
||||
"ShouldMonitorExisting": "Monitor existing books",
|
||||
"ShouldMonitorExistingHelpText": "Automatically monitor books on this list which are already in Readarr",
|
||||
"ShouldSearchHelpText": "Search indexers for newly added items. Use with caution for large lists.",
|
||||
"ShowBanners": "Show Banners",
|
||||
"ShowBannersHelpText": "Show banners instead of names",
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ public class ImportListResource : ProviderResource<ImportListResource>
|
|||
{
|
||||
public bool EnableAutomaticAdd { get; set; }
|
||||
public ImportListMonitorType ShouldMonitor { get; set; }
|
||||
public bool ShouldMonitorExisting { get; set; }
|
||||
public bool ShouldSearch { get; set; }
|
||||
public string RootFolderPath { get; set; }
|
||||
public int QualityProfileId { get; set; }
|
||||
|
|
@ -27,6 +28,7 @@ public override ImportListResource ToResource(ImportListDefinition definition)
|
|||
|
||||
resource.EnableAutomaticAdd = definition.EnableAutomaticAdd;
|
||||
resource.ShouldMonitor = definition.ShouldMonitor;
|
||||
resource.ShouldMonitorExisting = definition.ShouldMonitorExisting;
|
||||
resource.ShouldSearch = definition.ShouldSearch;
|
||||
resource.RootFolderPath = definition.RootFolderPath;
|
||||
resource.QualityProfileId = definition.ProfileId;
|
||||
|
|
@ -48,6 +50,7 @@ public override ImportListDefinition ToModel(ImportListResource resource)
|
|||
|
||||
definition.EnableAutomaticAdd = resource.EnableAutomaticAdd;
|
||||
definition.ShouldMonitor = resource.ShouldMonitor;
|
||||
definition.ShouldMonitorExisting = resource.ShouldMonitorExisting;
|
||||
definition.ShouldSearch = resource.ShouldSearch;
|
||||
definition.RootFolderPath = resource.RootFolderPath;
|
||||
definition.ProfileId = resource.QualityProfileId;
|
||||
|
|
|
|||
Loading…
Reference in a new issue