mirror of
https://github.com/lidarr/Lidarr
synced 2025-01-30 19:02:06 +00:00
Remove invalid scene mappings.
This commit is contained in:
parent
b4e8a39c2c
commit
23daae05cc
1 changed files with 7 additions and 1 deletions
|
@ -112,14 +112,20 @@ private void UpdateMappings()
|
|||
{
|
||||
_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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue