update handling of deleted recording files

This commit is contained in:
Luke Pulverenti
2016-03-07 21:59:21 -05:00
parent 0a721915a7
commit 3c4b64f653
7 changed files with 55 additions and 40 deletions

View File

@@ -239,11 +239,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
typeof(Year).Name,
typeof(Channel).Name,
typeof(AggregateFolder).Name,
typeof(CollectionFolder).Name,
// LiveTVManager handles recordings
typeof(LiveTvAudioRecording).Name,
typeof(LiveTvVideoRecording).Name
typeof(CollectionFolder).Name
}
});
@@ -279,11 +275,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
_logger.Info("Deleting item from database {0} because path no longer exists. type: {1} path: {2}", libraryItem.Name, libraryItem.GetType().Name, libraryItem.Path ?? string.Empty);
await libraryItem.Delete(new DeleteOptions
{
DeleteFileLocation = false
}).ConfigureAwait(false);
await libraryItem.OnFileDeleted().ConfigureAwait(false);
}
catch (OperationCanceledException)
{