mirror of
https://github.com/Radarr/Radarr.git
synced 2025-04-23 22:17:15 -04:00
Movie updates already done in MovieControllerWithSignalR
This commit is contained in:
parent
e8afde2e90
commit
a962de776b
3 changed files with 3 additions and 26 deletions
|
@ -20,6 +20,7 @@ namespace NzbDrone.Core.MediaFiles.Events
|
|||
ImportedMovie = importedMovie;
|
||||
OldFiles = oldFiles;
|
||||
NewDownload = newDownload;
|
||||
|
||||
if (downloadClientItem != null)
|
||||
{
|
||||
DownloadClientInfo = downloadClientItem.DownloadClientInfo;
|
||||
|
|
|
@ -5,14 +5,12 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using FluentValidation;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Datastore.Events;
|
||||
using NzbDrone.Core.DecisionEngine.Specifications;
|
||||
using NzbDrone.Core.Languages;
|
||||
using NzbDrone.Core.MediaCover;
|
||||
using NzbDrone.Core.MediaFiles;
|
||||
using NzbDrone.Core.MediaFiles.Events;
|
||||
using NzbDrone.Core.Messaging.Commands;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
|
@ -33,8 +31,6 @@ namespace Radarr.Api.V3.Movies
|
|||
{
|
||||
[V3ApiController]
|
||||
public class MovieController : RestControllerWithSignalR<MovieResource, Movie>,
|
||||
IHandle<MovieFileImportedEvent>,
|
||||
IHandle<MovieFileDeletedEvent>,
|
||||
IHandle<MovieUpdatedEvent>,
|
||||
IHandle<MovieEditedEvent>,
|
||||
IHandle<MoviesDeletedEvent>,
|
||||
|
@ -51,7 +47,6 @@ namespace Radarr.Api.V3.Movies
|
|||
private readonly IRootFolderService _rootFolderService;
|
||||
private readonly IUpgradableSpecification _qualityUpgradableSpecification;
|
||||
private readonly IConfigService _configService;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public MovieController(IBroadcastSignalRMessage signalRBroadcaster,
|
||||
IMovieService moviesService,
|
||||
|
@ -72,8 +67,7 @@ namespace Radarr.Api.V3.Movies
|
|||
SystemFolderValidator systemFolderValidator,
|
||||
QualityProfileExistsValidator qualityProfileExistsValidator,
|
||||
RootFolderExistsValidator rootFolderExistsValidator,
|
||||
MovieFolderAsRootFolderValidator movieFolderAsRootFolderValidator,
|
||||
Logger logger)
|
||||
MovieFolderAsRootFolderValidator movieFolderAsRootFolderValidator)
|
||||
: base(signalRBroadcaster)
|
||||
{
|
||||
_moviesService = moviesService;
|
||||
|
@ -85,7 +79,6 @@ namespace Radarr.Api.V3.Movies
|
|||
_coverMapper = coverMapper;
|
||||
_commandQueueManager = commandQueueManager;
|
||||
_rootFolderService = rootFolderService;
|
||||
_logger = logger;
|
||||
|
||||
SharedValidator.RuleFor(s => s.Path).Cascade(CascadeMode.Stop)
|
||||
.IsValidPath()
|
||||
|
@ -327,23 +320,6 @@ namespace Radarr.Api.V3.Movies
|
|||
resource.SizeOnDisk = movieStatistics.SizeOnDisk;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public void Handle(MovieFileImportedEvent message)
|
||||
{
|
||||
BroadcastResourceChange(ModelAction.Updated, message.MovieInfo.Movie.Id);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public void Handle(MovieFileDeletedEvent message)
|
||||
{
|
||||
if (message.Reason == DeleteMediaFileReason.Upgrade)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
BroadcastResourceChange(ModelAction.Updated, message.MovieFile.MovieId);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public void Handle(MovieUpdatedEvent message)
|
||||
{
|
||||
|
|
|
@ -153,7 +153,7 @@ namespace Radarr.Api.V3.Movies
|
|||
[NonAction]
|
||||
public void Handle(MovieFileImportedEvent message)
|
||||
{
|
||||
BroadcastResourceChange(ModelAction.Updated, message.MovieInfo.Movie.Id);
|
||||
BroadcastResourceChange(ModelAction.Updated, message.ImportedMovie.Movie.Id);
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue