aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/SqliteItemRepository.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-12-24 02:41:53 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-12-24 02:41:53 -0500
commitb23bdfe9f21aeb48ec83c20166cbc1132162362f (patch)
tree3ce55dff298dec37e03d3ad66deac3dfd40a55c7 /Emby.Server.Implementations/Data/SqliteItemRepository.cs
parente265d8efec50128c7db990a6d62c7ac39adcda3c (diff)
add content type error handling
Diffstat (limited to 'Emby.Server.Implementations/Data/SqliteItemRepository.cs')
-rw-r--r--Emby.Server.Implementations/Data/SqliteItemRepository.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
index 8e6a277a4..8c16216b9 100644
--- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs
+++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs
@@ -5267,11 +5267,19 @@ namespace Emby.Server.Implementations.Data
{
foreach (var pair in values)
{
+ var itemValue = pair.Item2;
+
+ // Don't save if invalid
+ if (string.IsNullOrWhiteSpace(itemValue))
+ {
+ continue;
+ }
+
statement.Reset();
statement.TryBind("@ItemId", itemId.ToGuidParamValue());
statement.TryBind("@Type", pair.Item1);
- statement.TryBind("@Value", pair.Item2);
+ statement.TryBind("@Value", itemValue);
if (pair.Item2 == null)
{