|
|
|
@ -47,7 +47,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
|
|
|
|
|
string[] queries = {
|
|
|
|
|
|
|
|
|
|
"create table if not exists MetadataStatus (ItemId GUID PRIMARY KEY, ItemName TEXT, ItemType TEXT, SeriesName TEXT, DateLastMetadataRefresh datetime, DateLastImagesRefresh datetime, ItemDateModified DateTimeNull)",
|
|
|
|
|
"create table if not exists MetadataStatus (ItemId GUID PRIMARY KEY, DateLastMetadataRefresh datetime, DateLastImagesRefresh datetime, ItemDateModified DateTimeNull)",
|
|
|
|
|
"create index if not exists idx_MetadataStatus on MetadataStatus(ItemId)",
|
|
|
|
|
|
|
|
|
|
//pragmas
|
|
|
|
@ -66,9 +66,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
private static readonly string[] StatusColumns =
|
|
|
|
|
{
|
|
|
|
|
"ItemId",
|
|
|
|
|
"ItemName",
|
|
|
|
|
"ItemType",
|
|
|
|
|
"SeriesName",
|
|
|
|
|
"DateLastMetadataRefresh",
|
|
|
|
|
"DateLastImagesRefresh",
|
|
|
|
|
"ItemDateModified"
|
|
|
|
@ -159,32 +156,17 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(1))
|
|
|
|
|
{
|
|
|
|
|
result.ItemName = reader.GetString(1);
|
|
|
|
|
result.DateLastMetadataRefresh = reader.GetDateTime(1).ToUniversalTime();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(2))
|
|
|
|
|
{
|
|
|
|
|
result.ItemName = reader.GetString(2);
|
|
|
|
|
result.DateLastImagesRefresh = reader.GetDateTime(2).ToUniversalTime();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(3))
|
|
|
|
|
{
|
|
|
|
|
result.SeriesName = reader.GetString(3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(4))
|
|
|
|
|
{
|
|
|
|
|
result.DateLastMetadataRefresh = reader.GetDateTime(4).ToUniversalTime();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(5))
|
|
|
|
|
{
|
|
|
|
|
result.DateLastImagesRefresh = reader.GetDateTime(5).ToUniversalTime();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(6))
|
|
|
|
|
{
|
|
|
|
|
result.ItemDateModified = reader.GetDateTime(6).ToUniversalTime();
|
|
|
|
|
result.ItemDateModified = reader.GetDateTime(3).ToUniversalTime();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
@ -208,12 +190,9 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
transaction = _connection.BeginTransaction();
|
|
|
|
|
|
|
|
|
|
_saveStatusCommand.GetParameter(0).Value = status.ItemId;
|
|
|
|
|
_saveStatusCommand.GetParameter(1).Value = status.ItemName;
|
|
|
|
|
_saveStatusCommand.GetParameter(2).Value = status.ItemType;
|
|
|
|
|
_saveStatusCommand.GetParameter(3).Value = status.SeriesName;
|
|
|
|
|
_saveStatusCommand.GetParameter(4).Value = status.DateLastMetadataRefresh;
|
|
|
|
|
_saveStatusCommand.GetParameter(5).Value = status.DateLastImagesRefresh;
|
|
|
|
|
_saveStatusCommand.GetParameter(6).Value = status.ItemDateModified;
|
|
|
|
|
_saveStatusCommand.GetParameter(1).Value = status.DateLastMetadataRefresh;
|
|
|
|
|
_saveStatusCommand.GetParameter(2).Value = status.DateLastImagesRefresh;
|
|
|
|
|
_saveStatusCommand.GetParameter(3).Value = status.ItemDateModified;
|
|
|
|
|
|
|
|
|
|
_saveStatusCommand.Transaction = transaction;
|
|
|
|
|
|
|
|
|
|