|
|
|
@ -257,7 +257,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
_connection.AddColumn(Logger, "TypedBaseItems", "TrailerTypes", "Text");
|
|
|
|
|
_connection.AddColumn(Logger, "TypedBaseItems", "CriticRating", "Float");
|
|
|
|
|
_connection.AddColumn(Logger, "TypedBaseItems", "CriticRatingSummary", "Text");
|
|
|
|
|
_connection.AddColumn(Logger, "TypedBaseItems", "DateModifiedDuringLastRefresh", "DATETIME");
|
|
|
|
|
_connection.AddColumn(Logger, "TypedBaseItems", "InheritedTags", "Text");
|
|
|
|
|
_connection.AddColumn(Logger, "TypedBaseItems", "CleanName", "Text");
|
|
|
|
|
_connection.AddColumn(Logger, "TypedBaseItems", "PresentationUniqueKey", "Text");
|
|
|
|
@ -402,7 +401,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
"Tags",
|
|
|
|
|
"SourceType",
|
|
|
|
|
"TrailerTypes",
|
|
|
|
|
"DateModifiedDuringLastRefresh",
|
|
|
|
|
"OriginalTitle",
|
|
|
|
|
"PrimaryVersionId",
|
|
|
|
|
"DateLastMediaAdded",
|
|
|
|
@ -523,7 +521,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
"TrailerTypes",
|
|
|
|
|
"CriticRating",
|
|
|
|
|
"CriticRatingSummary",
|
|
|
|
|
"DateModifiedDuringLastRefresh",
|
|
|
|
|
"InheritedTags",
|
|
|
|
|
"CleanName",
|
|
|
|
|
"PresentationUniqueKey",
|
|
|
|
@ -902,15 +899,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
_saveItemCommand.GetParameter(index++).Value = item.CriticRating;
|
|
|
|
|
_saveItemCommand.GetParameter(index++).Value = item.CriticRatingSummary;
|
|
|
|
|
|
|
|
|
|
if (!item.DateModifiedDuringLastRefresh.HasValue || item.DateModifiedDuringLastRefresh.Value == default(DateTime))
|
|
|
|
|
{
|
|
|
|
|
_saveItemCommand.GetParameter(index++).Value = null;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_saveItemCommand.GetParameter(index++).Value = item.DateModifiedDuringLastRefresh.Value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var inheritedTags = item.GetInheritedTags();
|
|
|
|
|
if (inheritedTags.Count > 0)
|
|
|
|
|
{
|
|
|
|
@ -1370,88 +1358,101 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(51))
|
|
|
|
|
{
|
|
|
|
|
item.DateModifiedDuringLastRefresh = reader.GetDateTime(51).ToUniversalTime();
|
|
|
|
|
}
|
|
|
|
|
var index = 51;
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(52))
|
|
|
|
|
if (!reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
item.OriginalTitle = reader.GetString(52);
|
|
|
|
|
item.OriginalTitle = reader.GetString(index);
|
|
|
|
|
}
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
var video = item as Video;
|
|
|
|
|
if (video != null)
|
|
|
|
|
{
|
|
|
|
|
if (!reader.IsDBNull(53))
|
|
|
|
|
if (!reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
video.PrimaryVersionId = reader.GetString(53);
|
|
|
|
|
video.PrimaryVersionId = reader.GetString(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
var folder = item as Folder;
|
|
|
|
|
if (folder != null && !reader.IsDBNull(54))
|
|
|
|
|
if (folder != null && !reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
folder.DateLastMediaAdded = reader.GetDateTime(54).ToUniversalTime();
|
|
|
|
|
folder.DateLastMediaAdded = reader.GetDateTime(index).ToUniversalTime();
|
|
|
|
|
}
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(55))
|
|
|
|
|
if (!reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
item.Album = reader.GetString(55);
|
|
|
|
|
item.Album = reader.GetString(index);
|
|
|
|
|
}
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(56))
|
|
|
|
|
if (!reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
item.CriticRating = reader.GetFloat(56);
|
|
|
|
|
item.CriticRating = reader.GetFloat(index);
|
|
|
|
|
}
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(57))
|
|
|
|
|
if (!reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
item.CriticRatingSummary = reader.GetString(57);
|
|
|
|
|
item.CriticRatingSummary = reader.GetString(index);
|
|
|
|
|
}
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(58))
|
|
|
|
|
if (!reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
item.IsVirtualItem = reader.GetBoolean(58);
|
|
|
|
|
item.IsVirtualItem = reader.GetBoolean(index);
|
|
|
|
|
}
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
var hasSeries = item as IHasSeries;
|
|
|
|
|
if (hasSeries != null)
|
|
|
|
|
{
|
|
|
|
|
if (!reader.IsDBNull(59))
|
|
|
|
|
if (!reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
hasSeries.SeriesName = reader.GetString(59);
|
|
|
|
|
hasSeries.SeriesName = reader.GetString(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
var episode = item as Episode;
|
|
|
|
|
if (episode != null)
|
|
|
|
|
{
|
|
|
|
|
if (!reader.IsDBNull(60))
|
|
|
|
|
if (!reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
episode.SeasonName = reader.GetString(60);
|
|
|
|
|
episode.SeasonName = reader.GetString(index);
|
|
|
|
|
}
|
|
|
|
|
if (!reader.IsDBNull(61))
|
|
|
|
|
index++;
|
|
|
|
|
if (!reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
episode.SeasonId = reader.GetGuid(61);
|
|
|
|
|
episode.SeasonId = reader.GetGuid(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
index++;
|
|
|
|
|
}
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
if (hasSeries != null)
|
|
|
|
|
{
|
|
|
|
|
if (!reader.IsDBNull(62))
|
|
|
|
|
if (!reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
hasSeries.SeriesId = reader.GetGuid(62);
|
|
|
|
|
hasSeries.SeriesId = reader.GetGuid(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
if (hasSeries != null)
|
|
|
|
|
{
|
|
|
|
|
if (!reader.IsDBNull(63))
|
|
|
|
|
if (!reader.IsDBNull(index))
|
|
|
|
|
{
|
|
|
|
|
hasSeries.SeriesSortName = reader.GetString(63);
|
|
|
|
|
hasSeries.SeriesSortName = reader.GetString(index);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|
}
|
|
|
|
|