remove redundant code
This commit is contained in:
parent
c0feb3694b
commit
ad3e835bcf
|
@ -86,13 +86,6 @@ namespace MediaBrowser.Common.Extensions
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index < span.Length - 1 && span[index] == _separator)
|
|
||||||
{
|
|
||||||
Current = span.Slice(0, index);
|
|
||||||
_str = span[(index + 1)..];
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Current = span.Slice(0, index);
|
Current = span.Slice(0, index);
|
||||||
_str = span[(index + 1)..];
|
_str = span[(index + 1)..];
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -96,7 +96,7 @@ namespace Jellyfin.Server.Implementations.Tests.Data
|
||||||
[MemberData(nameof(ItemImageInfoFromValueString_Valid_TestData))]
|
[MemberData(nameof(ItemImageInfoFromValueString_Valid_TestData))]
|
||||||
public void ItemImageInfoFromValueString_Valid_Success(string value, ItemImageInfo expected)
|
public void ItemImageInfoFromValueString_Valid_Success(string value, ItemImageInfo expected)
|
||||||
{
|
{
|
||||||
var result = _sqliteItemRepository.ItemImageInfoFromValueString(value.AsSpan());
|
var result = _sqliteItemRepository.ItemImageInfoFromValueString(value);
|
||||||
Assert.Equal(expected.Path, result.Path);
|
Assert.Equal(expected.Path, result.Path);
|
||||||
Assert.Equal(expected.Type, result.Type);
|
Assert.Equal(expected.Type, result.Type);
|
||||||
Assert.Equal(expected.DateModified, result.DateModified);
|
Assert.Equal(expected.DateModified, result.DateModified);
|
||||||
|
@ -111,7 +111,7 @@ namespace Jellyfin.Server.Implementations.Tests.Data
|
||||||
[InlineData("https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg*0")]
|
[InlineData("https://image.tmdb.org/t/p/original/zhB5CHEgqqh4wnEqDNJLfWXJlcL.jpg*0")]
|
||||||
public void ItemImageInfoFromValueString_Invalid_Null(string value)
|
public void ItemImageInfoFromValueString_Invalid_Null(string value)
|
||||||
{
|
{
|
||||||
Assert.Null(_sqliteItemRepository.ItemImageInfoFromValueString(value.AsSpan()));
|
Assert.Null(_sqliteItemRepository.ItemImageInfoFromValueString(value));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IEnumerable<object[]> DeserializeImages_Valid_TestData()
|
public static IEnumerable<object[]> DeserializeImages_Valid_TestData()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user