mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
Remove extra capture group from regex
https://regex101.com/r/bn9IOy/11/
This commit is contained in:
parent
12c43cd769
commit
c05e8088d6
@ -139,7 +139,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
|
|
||||||
var required = codec == Codec.Encoder ? requiredEncoders : requiredDecoders;
|
var required = codec == Codec.Encoder ? requiredEncoders : requiredDecoders;
|
||||||
|
|
||||||
Regex regex = new Regex(@"\s\S{6}\s(?<codec>(\w|-)+)\s{3}");
|
Regex regex = new Regex(@"\s\S{6}\s(?<codec>[\w|-]+)\s{3}");
|
||||||
|
|
||||||
MatchCollection matches = regex.Matches(output);
|
MatchCollection matches = regex.Matches(output);
|
||||||
|
|
||||||
@ -147,8 +147,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
.Select(x => x.Groups["codec"].Value)
|
.Select(x => x.Groups["codec"].Value)
|
||||||
.Where(x => required.Contains(x));
|
.Where(x => required.Contains(x));
|
||||||
|
|
||||||
//var found = required.Where(x => output.IndexOf(x, StringComparison.OrdinalIgnoreCase) != -1);
|
|
||||||
|
|
||||||
_logger.LogInformation("Available {Codec}: {Codecs}", codecstr, found);
|
_logger.LogInformation("Available {Codec}: {Codecs}", codecstr, found);
|
||||||
|
|
||||||
return found;
|
return found;
|
||||||
|
Loading…
Reference in New Issue
Block a user