mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-31 12:58:28 +01:00
Split valid and invalid tests
This commit is contained in:
@@ -22,12 +22,10 @@ namespace MediaBrowser.Common.Providers
|
||||
/// <returns>True if parsing was successful, false otherwise.</returns>
|
||||
public static bool TryFindImdbId(ReadOnlySpan<char> text, [NotNullWhen(true)] out ReadOnlySpan<char> imdbId)
|
||||
{
|
||||
var tt = ImdbPrefix.AsSpan();
|
||||
|
||||
// imdb id is at least 9 chars (tt + 7 numbers)
|
||||
while (text.Length >= 2 + ImdbMinNumbers)
|
||||
{
|
||||
var ttPos = text.IndexOf(tt);
|
||||
var ttPos = text.IndexOf(ImdbPrefix);
|
||||
if (ttPos == -1)
|
||||
{
|
||||
imdbId = default;
|
||||
|
||||
Reference in New Issue
Block a user