1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-04 10:02:40 +01:00

Fixed: Invalid qualities messing up the release module and other stuff.

This commit is contained in:
Leonardo Galli 2018-08-09 18:08:12 +02:00
parent 587b49aaba
commit 253546ded0

View File

@ -212,11 +212,15 @@ public static explicit operator int(Quality quality)
return quality.Id;
}
//TODO: Go back to fully parsing the quality from the start!
public static Quality FindByInfo(Source source, Resolution resolution, Modifier modifier)
{
return All.SingleOrDefault(q =>
q.Source == source && ((q.Resolution == resolution) ||
(q.Resolution == Resolution.Unknown)) && (q.Modifier == modifier));
q.Source == source && ((q.Resolution == resolution) ||
(q.Resolution == Resolution.Unknown)) && (q.Modifier == modifier)) ??
All.FirstOrDefault(q => q.Source == source && ((q.Resolution == resolution) ||
(q.Resolution == Resolution.Unknown))) ??
Unknown;
}
}
}