Merge branch 'master' into userdb-efcore

# Conflicts:
#	Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs
#	Emby.Server.Implementations/Library/UserManager.cs
#	Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs
#	Emby.Server.Implementations/Sorting/IsPlayedComparer.cs
#	Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs
#	Emby.Server.Implementations/TV/TVSeriesManager.cs
#	Jellyfin.Server.Implementations/Users/DefaultAuthenticationProvider.cs
This commit is contained in:
Patrick Barron
2020-06-04 16:39:50 -04:00
334 changed files with 2011 additions and 1689 deletions

View File

@@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -33,7 +35,7 @@ using SQLitePCL.pretty;
namespace Emby.Server.Implementations.Data
{
/// <summary>
/// Class SQLiteItemRepository
/// Class SQLiteItemRepository.
/// </summary>
public class SqliteItemRepository : BaseSqliteRepository, IItemRepository
{
@@ -1141,24 +1143,24 @@ namespace Emby.Server.Implementations.Data
public string ToValueString(ItemImageInfo image)
{
var delimeter = "*";
const string Delimeter = "*";
var path = image.Path;
if (path == null)
{
path = string.Empty;
}
var path = image.Path ?? string.Empty;
var hash = image.BlurHash ?? string.Empty;
return GetPathToSave(path) +
delimeter +
Delimeter +
image.DateModified.Ticks.ToString(CultureInfo.InvariantCulture) +
delimeter +
Delimeter +
image.Type +
delimeter +
Delimeter +
image.Width.ToString(CultureInfo.InvariantCulture) +
delimeter +
image.Height.ToString(CultureInfo.InvariantCulture);
Delimeter +
image.Height.ToString(CultureInfo.InvariantCulture) +
Delimeter +
// Replace delimiters with other characters.
// This can be removed when we migrate to a proper DB.
hash.Replace('*', '/').Replace('|', '\\');
}
public ItemImageInfo ItemImageInfoFromValueString(string value)
@@ -1192,6 +1194,11 @@ namespace Emby.Server.Implementations.Data
image.Width = width;
image.Height = height;
}
if (parts.Length >= 6)
{
image.BlurHash = parts[5].Replace('/', '*').Replace('\\', '|');
}
}
return image;
@@ -1971,6 +1978,7 @@ namespace Emby.Server.Implementations.Data
/// Gets the chapter.
/// </summary>
/// <param name="reader">The reader.</param>
/// <param name="item">The item.</param>
/// <returns>ChapterInfo.</returns>
private ChapterInfo GetChapter(IReadOnlyList<IResultSetValue> reader, BaseItem item)
{