mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Don't try to match a null codec name (#784)
* Don't try to match a null codec name * Add test
This commit is contained in:
@@ -154,6 +154,11 @@ namespace NzbDrone.Core.Parser
|
||||
|
||||
public static Codec ParseCodec(string name, string origName)
|
||||
{
|
||||
if (name.IsNullOrWhiteSpace())
|
||||
{
|
||||
return Codec.Unknown;
|
||||
}
|
||||
|
||||
var match = CodecRegex.Match(name);
|
||||
|
||||
if (!match.Success) { return Codec.Unknown; }
|
||||
|
||||
Reference in New Issue
Block a user