mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-01 04:34:26 -04:00
Changed '\d' to '[0-9]'.
This commit is contained in:
parent
92f273cb0c
commit
d30fd3b3d2
@ -39,7 +39,7 @@ namespace Emby.Server.Implementations.Library
|
|||||||
// for imdbid we also accept pattern matching
|
// for imdbid we also accept pattern matching
|
||||||
if (string.Equals(attrib, "imdbid", StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(attrib, "imdbid", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
var m = Regex.Match(str, "tt\\d{7,8}", RegexOptions.IgnoreCase);
|
var m = Regex.Match(str, "tt([0-9]{7,8})", RegexOptions.IgnoreCase);
|
||||||
return m.Success ? m.Value : null;
|
return m.Success ? m.Value : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||||||
protected void ParseProviderLinks(T item, string xml)
|
protected void ParseProviderLinks(T item, string xml)
|
||||||
{
|
{
|
||||||
// Look for a match for the Regex pattern "tt" followed by 7 or 8 digits
|
// Look for a match for the Regex pattern "tt" followed by 7 or 8 digits
|
||||||
var m = Regex.Match(xml, @"tt(\d{7,8})", RegexOptions.IgnoreCase);
|
var m = Regex.Match(xml, "tt([0-9]{7,8})", RegexOptions.IgnoreCase);
|
||||||
if (m.Success)
|
if (m.Success)
|
||||||
{
|
{
|
||||||
item.SetProviderId(MetadataProviders.Imdb, m.Value);
|
item.SetProviderId(MetadataProviders.Imdb, m.Value);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user