aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-08-12 15:11:45 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-08-12 15:11:45 -0400
commitd9ee4f81fdd161af7bd27f5dba420341e266262d (patch)
treef74660527e1d373293c66764db5e29250ced0957 /MediaBrowser.Server.Implementations
parent75513170751d0213fc0e6c9121c383f83c14ed06 (diff)
rework storage of PresentationUniqueKey
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs11
-rw-r--r--MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs2
2 files changed, 10 insertions, 3 deletions
diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
index 0836560fc..c01261d73 100644
--- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
+++ b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
@@ -412,7 +412,8 @@ namespace MediaBrowser.Server.Implementations.Persistence
"SeasonName",
"SeasonId",
"SeriesId",
- "SeriesSortName"
+ "SeriesSortName",
+ "PresentationUniqueKey"
};
private readonly string[] _mediaStreamSaveColumns =
@@ -918,7 +919,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
_saveItemCommand.GetParameter(index++).Value = GetCleanValue(item.Name);
}
- _saveItemCommand.GetParameter(index++).Value = item.PresentationUniqueKey;
+ _saveItemCommand.GetParameter(index++).Value = item.GetPresentationUniqueKey();
_saveItemCommand.GetParameter(index++).Value = item.SlugName;
_saveItemCommand.GetParameter(index++).Value = item.OriginalTitle;
@@ -1454,6 +1455,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
}
index++;
+ if (!reader.IsDBNull(index))
+ {
+ item.PresentationUniqueKey = reader.GetString(index);
+ }
+ index++;
+
return item;
}
diff --git a/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs b/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs
index ddc1de9cd..03e8a9178 100644
--- a/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs
+++ b/MediaBrowser.Server.Implementations/TV/TVSeriesManager.cs
@@ -152,7 +152,7 @@ namespace MediaBrowser.Server.Implementations.TV
{
return series.Id.ToString("N");
}
- return series.PresentationUniqueKey;
+ return series.GetPresentationUniqueKey();
}
/// <summary>