New: Use release quality source if not in downloaded file and resolution matches

Co-Authored-By: taloth <taloth@users.noreply.github.com>
Co-Authored-By: Mark McDowall <markus101@users.noreply.github.com>
This commit is contained in:
Qstick
2020-08-15 21:54:20 -04:00
parent a6d509c871
commit 28177eb042
37 changed files with 600 additions and 306 deletions
@@ -62,6 +62,17 @@ namespace NzbDrone.Common.Extensions
return string.Equals(firstPath.CleanFilePath(), secondPath.CleanFilePath(), comparison.Value);
}
public static string GetPathExtension(this string path)
{
var idx = path.LastIndexOf('.');
if (idx == -1 || idx == path.Length - 1)
{
return string.Empty;
}
return path.Substring(idx);
}
public static string GetRelativePath(this string parentPath, string childPath)
{
if (!parentPath.IsParentPath(childPath))