The Free Software Media System - Server Backend & API
SqliteItemRepository: Parse ChannelId directly from utf-8 data
Bond_00934313ef2165b
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.csindex 694805ebe9..8d220c807e 100644--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs@@ -1,6 +1,7 @@#pragma warning disable CS1591using System;+using System.Buffers.Text;using System.Collections.Generic;using System.Globalization;using System.IO;@@ -1311,7 +1312,14 @@ namespace Emby.Server.Implementations.Dataif (!reader.IsDBNull(index)){- item.ChannelId = new Guid(reader.GetString(index));+ if (!Utf8Parser.TryParse(reader[index].ToBlob(), out Guid value, out _, standardFormat: 'N'))+ {+ var str = reader.GetString(index);+ Logger.LogWarning("{ChannelId} isn't in the expected format", str);+ value = new Guid(str);+ }++ item.ChannelId = value;}index++;