mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 04:59:35 -07:00
New: Make monitoring existing albums on an import list optional
(cherry picked from commit b05bd685bc1bbd04d4b25b83a9fdd4ab3c4651ee) (cherry picked from commit efa7465666e89e18b757585dd509fd039428156c)
This commit is contained in:
parent
94499b4ae0
commit
926a921240
6 changed files with 43 additions and 4 deletions
|
@ -75,6 +75,7 @@ function EditImportListModalContent(props) {
|
||||||
name,
|
name,
|
||||||
enableAutomaticAdd,
|
enableAutomaticAdd,
|
||||||
shouldMonitor,
|
shouldMonitor,
|
||||||
|
shouldMonitorExisting,
|
||||||
shouldSearch,
|
shouldSearch,
|
||||||
rootFolderPath,
|
rootFolderPath,
|
||||||
monitorNewItems,
|
monitorNewItems,
|
||||||
|
@ -173,12 +174,28 @@ function EditImportListModalContent(props) {
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<FormLabel>Search for New Items</FormLabel>
|
<FormLabel>
|
||||||
|
{translate('ShouldMonitorExisting')}
|
||||||
|
</FormLabel>
|
||||||
|
|
||||||
|
<FormInputGroup
|
||||||
|
type={inputTypes.CHECK}
|
||||||
|
name="shouldMonitorExisting"
|
||||||
|
helpText={translate('ShouldMonitorExistingHelpText')}
|
||||||
|
{...shouldMonitorExisting}
|
||||||
|
onChange={onInputChange}
|
||||||
|
/>
|
||||||
|
</FormGroup>
|
||||||
|
|
||||||
|
<FormGroup>
|
||||||
|
<FormLabel>
|
||||||
|
{translate('ShouldSearch')}
|
||||||
|
</FormLabel>
|
||||||
|
|
||||||
<FormInputGroup
|
<FormInputGroup
|
||||||
type={inputTypes.CHECK}
|
type={inputTypes.CHECK}
|
||||||
name="shouldSearch"
|
name="shouldSearch"
|
||||||
helpText={'Search indexers for newly added items. Use with caution for large lists.'}
|
helpText={translate('ShouldSearchHelpText')}
|
||||||
{...shouldSearch}
|
{...shouldSearch}
|
||||||
onChange={onInputChange}
|
onChange={onInputChange}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -7,6 +7,7 @@ namespace Lidarr.Api.V1.ImportLists
|
||||||
{
|
{
|
||||||
public bool EnableAutomaticAdd { get; set; }
|
public bool EnableAutomaticAdd { get; set; }
|
||||||
public ImportListMonitorType ShouldMonitor { get; set; }
|
public ImportListMonitorType ShouldMonitor { get; set; }
|
||||||
|
public bool ShouldMonitorExisting { get; set; }
|
||||||
public bool ShouldSearch { get; set; }
|
public bool ShouldSearch { get; set; }
|
||||||
public string RootFolderPath { get; set; }
|
public string RootFolderPath { get; set; }
|
||||||
public NewItemMonitorTypes MonitorNewItems { get; set; }
|
public NewItemMonitorTypes MonitorNewItems { get; set; }
|
||||||
|
@ -29,6 +30,7 @@ namespace Lidarr.Api.V1.ImportLists
|
||||||
|
|
||||||
resource.EnableAutomaticAdd = definition.EnableAutomaticAdd;
|
resource.EnableAutomaticAdd = definition.EnableAutomaticAdd;
|
||||||
resource.ShouldMonitor = definition.ShouldMonitor;
|
resource.ShouldMonitor = definition.ShouldMonitor;
|
||||||
|
resource.ShouldMonitorExisting = definition.ShouldMonitorExisting;
|
||||||
resource.ShouldSearch = definition.ShouldSearch;
|
resource.ShouldSearch = definition.ShouldSearch;
|
||||||
resource.RootFolderPath = definition.RootFolderPath;
|
resource.RootFolderPath = definition.RootFolderPath;
|
||||||
resource.MonitorNewItems = definition.MonitorNewItems;
|
resource.MonitorNewItems = definition.MonitorNewItems;
|
||||||
|
@ -51,6 +53,7 @@ namespace Lidarr.Api.V1.ImportLists
|
||||||
|
|
||||||
definition.EnableAutomaticAdd = resource.EnableAutomaticAdd;
|
definition.EnableAutomaticAdd = resource.EnableAutomaticAdd;
|
||||||
definition.ShouldMonitor = resource.ShouldMonitor;
|
definition.ShouldMonitor = resource.ShouldMonitor;
|
||||||
|
definition.ShouldMonitorExisting = resource.ShouldMonitorExisting;
|
||||||
definition.ShouldSearch = resource.ShouldSearch;
|
definition.ShouldSearch = resource.ShouldSearch;
|
||||||
definition.RootFolderPath = resource.RootFolderPath;
|
definition.RootFolderPath = resource.RootFolderPath;
|
||||||
definition.MonitorNewItems = resource.MonitorNewItems;
|
definition.MonitorNewItems = resource.MonitorNewItems;
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
using FluentMigrator;
|
||||||
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.Datastore.Migration
|
||||||
|
{
|
||||||
|
[Migration(58)]
|
||||||
|
public class ImportListMonitorExisting : NzbDroneMigrationBase
|
||||||
|
{
|
||||||
|
protected override void MainDbUpgrade()
|
||||||
|
{
|
||||||
|
Alter.Table("ImportLists").AddColumn("ShouldMonitorExisting").AsInt32().WithDefaultValue(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ namespace NzbDrone.Core.ImportLists
|
||||||
{
|
{
|
||||||
public bool EnableAutomaticAdd { get; set; }
|
public bool EnableAutomaticAdd { get; set; }
|
||||||
public ImportListMonitorType ShouldMonitor { get; set; }
|
public ImportListMonitorType ShouldMonitor { get; set; }
|
||||||
|
public bool ShouldMonitorExisting { get; set; }
|
||||||
public NewItemMonitorTypes MonitorNewItems { get; set; }
|
public NewItemMonitorTypes MonitorNewItems { get; set; }
|
||||||
public bool ShouldSearch { get; set; }
|
public bool ShouldSearch { get; set; }
|
||||||
public int ProfileId { get; set; }
|
public int ProfileId { get; set; }
|
||||||
|
|
|
@ -184,7 +184,7 @@ namespace NzbDrone.Core.ImportLists
|
||||||
{
|
{
|
||||||
_logger.Debug("{0} [{1}] Rejected, Album Exists in DB. Ensuring Album and Artist monitored.", report.AlbumMusicBrainzId, report.Album);
|
_logger.Debug("{0} [{1}] Rejected, Album Exists in DB. Ensuring Album and Artist monitored.", report.AlbumMusicBrainzId, report.Album);
|
||||||
|
|
||||||
if (importList.ShouldMonitor != ImportListMonitorType.None)
|
if (importList.ShouldMonitorExisting && importList.ShouldMonitor != ImportListMonitorType.None)
|
||||||
{
|
{
|
||||||
if (!existingAlbum.Monitored)
|
if (!existingAlbum.Monitored)
|
||||||
{
|
{
|
||||||
|
@ -288,7 +288,7 @@ namespace NzbDrone.Core.ImportLists
|
||||||
{
|
{
|
||||||
_logger.Debug("{0} [{1}] Rejected, artist exists in DB. Ensuring artist monitored", report.ArtistMusicBrainzId, report.Artist);
|
_logger.Debug("{0} [{1}] Rejected, artist exists in DB. Ensuring artist monitored", report.ArtistMusicBrainzId, report.Artist);
|
||||||
|
|
||||||
if (!existingArtist.Monitored)
|
if (importList.ShouldMonitorExisting && !existingArtist.Monitored)
|
||||||
{
|
{
|
||||||
existingArtist.Monitored = true;
|
existingArtist.Monitored = true;
|
||||||
_artistService.UpdateArtist(existingArtist);
|
_artistService.UpdateArtist(existingArtist);
|
||||||
|
|
|
@ -551,6 +551,10 @@
|
||||||
"Settings": "Settings",
|
"Settings": "Settings",
|
||||||
"ShortDateFormat": "Short Date Format",
|
"ShortDateFormat": "Short Date Format",
|
||||||
"ShouldMonitorHelpText": "Monitor artists and albums added from this list",
|
"ShouldMonitorHelpText": "Monitor artists and albums added from this list",
|
||||||
|
"ShouldMonitorExisting": "Monitor existing albums",
|
||||||
|
"ShouldMonitorExistingHelpText": "Automatically monitor albums on this list which are already in Lidarr",
|
||||||
|
"ShouldSearch": "Search for New Items",
|
||||||
|
"ShouldSearchHelpText": "Search indexers for newly added items. Use with caution for large lists.",
|
||||||
"ShowAlbumCount": "Show Album Count",
|
"ShowAlbumCount": "Show Album Count",
|
||||||
"ShowBanners": "Show Banners",
|
"ShowBanners": "Show Banners",
|
||||||
"ShowBannersHelpText": "Show banners instead of names",
|
"ShowBannersHelpText": "Show banners instead of names",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue