to remove movies from Trakt Collection when they are removed from Radarr Add OnDelete Notification to TraktConnection to remove movies from Trakt Collection when they are removed from Radarr skip the deleteHandler if the delete Event was triggered for reason: Upgrade change migration from 180 to 182 since 180 and 181 are already in plan to be used address comments regarding helpText for OnDelete and move check for OnUpgrade deletion reason into trakt connection OnDelete handler reuse TraktCollectMoviesResource for OnDelete trakt api should just ignore the other properties anyway add WithDefaultValue to migration add unit test case for onDelete to fix unit testcase for onDeletepull/4949/head
parent
261e598c99
commit
e033ce1eff
@ -0,0 +1,14 @@
|
||||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(182)]
|
||||
public class on_delete_notification : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Alter.Table("Notifications").AddColumn("OnDelete").AsBoolean().WithDefaultValue(false);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
using System.Collections.Generic;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
using NzbDrone.Core.Movies;
|
||||
|
||||
namespace NzbDrone.Core.Notifications
|
||||
{
|
||||
public class DeleteMessage
|
||||
{
|
||||
public string Message { get; set; }
|
||||
public Movie Movie { get; set; }
|
||||
public MovieFile MovieFile { get; set; }
|
||||
|
||||
public DeleteMediaFileReason Reason { get; set; }
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return Message;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue