mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-01-01 10:32:09 +01:00
Remove invalid scene mappings.
This commit is contained in:
@@ -112,14 +112,20 @@ namespace NzbDrone.Core.DataAugmentation.Scene
|
||||
{
|
||||
_repository.Clear(sceneMappingProvider.GetType().Name);
|
||||
|
||||
foreach (var sceneMapping in mappings)
|
||||
mappings.RemoveAll(sceneMapping =>
|
||||
{
|
||||
if (sceneMapping.ParseTerm.IsNullOrWhiteSpace() ||
|
||||
sceneMapping.SearchTerm.IsNullOrWhiteSpace())
|
||||
{
|
||||
_logger.Warn("Invalid scene mapping found for: {0}, skipping", sceneMapping.TvdbId);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
foreach (var sceneMapping in mappings)
|
||||
{
|
||||
sceneMapping.ParseTerm = sceneMapping.Title.CleanSeriesTitle();
|
||||
sceneMapping.Type = sceneMappingProvider.GetType().Name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user