mirror of
https://github.com/Radarr/Radarr
synced 2024-12-25 01:11:43 +00:00
Added parser for parsing the Quality of an Episode sent to SAB (So we get the proper quality)
This commit is contained in:
parent
70fd11231d
commit
fd038891fb
1 changed files with 26 additions and 0 deletions
|
@ -171,6 +171,32 @@ internal static QualityTypes ParseQuality(string name)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static QualityTypes ParseDroneQuality(string name)
|
||||||
|
{
|
||||||
|
var result = QualityTypes.Unknown;
|
||||||
|
|
||||||
|
if (name.Contains("[TV]"))
|
||||||
|
return QualityTypes.TV;
|
||||||
|
|
||||||
|
if (name.Contains("[DVD]"))
|
||||||
|
return QualityTypes.DVD;
|
||||||
|
|
||||||
|
if (name.Contains("[BDRip]"))
|
||||||
|
return QualityTypes.BDRip;
|
||||||
|
|
||||||
|
if (name.Contains("[HDTV]"))
|
||||||
|
return QualityTypes.HDTV;
|
||||||
|
|
||||||
|
if (name.Contains("[WEBDL]"))
|
||||||
|
return QualityTypes.WEBDL;
|
||||||
|
|
||||||
|
if (name.Contains("[Bluray]"))
|
||||||
|
return QualityTypes.Bluray;
|
||||||
|
|
||||||
|
//If it's unknown let the "regular" quality parse have a go
|
||||||
|
return ParseQuality(name);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Normalizes the title. removing all non-word characters as well as common tokens
|
/// Normalizes the title. removing all non-word characters as well as common tokens
|
||||||
/// such as 'the' and 'and'
|
/// such as 'the' and 'and'
|
||||||
|
|
Loading…
Reference in a new issue