1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

Fixed: Metadata files not being created after rescan

Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick 2020-03-11 22:09:08 -04:00
parent 5128481b23
commit 363be4ca34
4 changed files with 14 additions and 7 deletions

View File

@ -186,8 +186,11 @@ public void Handle(MovieRenamedEvent message)
} }
public void Handle(MediaCoversUpdatedEvent message) public void Handle(MediaCoversUpdatedEvent message)
{
if (message.Updated)
{ {
BroadcastResourceChange(ModelAction.Updated, message.Movie.Id); BroadcastResourceChange(ModelAction.Updated, message.Movie.Id);
} }
} }
} }
}

View File

@ -191,10 +191,8 @@ private void EnsureResizedCovers(Movie movie, MediaCover cover, bool forceResize
public void HandleAsync(MovieUpdatedEvent message) public void HandleAsync(MovieUpdatedEvent message)
{ {
var updated = EnsureCovers(message.Movie); var updated = EnsureCovers(message.Movie);
if (updated)
{ _eventAggregator.PublishEvent(new MediaCoversUpdatedEvent(message.Movie, updated));
_eventAggregator.PublishEvent(new MediaCoversUpdatedEvent(message.Movie));
}
} }
public void HandleAsync(MovieDeletedEvent message) public void HandleAsync(MovieDeletedEvent message)

View File

@ -6,10 +6,13 @@ namespace NzbDrone.Core.MediaCover
public class MediaCoversUpdatedEvent : IEvent public class MediaCoversUpdatedEvent : IEvent
{ {
public Movie Movie { get; set; } public Movie Movie { get; set; }
public bool Updated { get; set; }
public MediaCoversUpdatedEvent(Movie movie)
public MediaCoversUpdatedEvent(Movie movie, bool updated)
{ {
Movie = movie; Movie = movie;
Updated = updated;
} }
} }
} }

View File

@ -218,8 +218,11 @@ public void Handle(MovieRenamedEvent message)
} }
public void Handle(MediaCoversUpdatedEvent message) public void Handle(MediaCoversUpdatedEvent message)
{
if (message.Updated)
{ {
BroadcastResourceChange(ModelAction.Updated, message.Movie.Id); BroadcastResourceChange(ModelAction.Updated, message.Movie.Id);
} }
} }
} }
}