|
|
@ -124,7 +124,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
_connection = await SqliteExtensions.ConnectToDb(dbFile, Logger).ConfigureAwait(false);
|
|
|
|
_connection = await SqliteExtensions.ConnectToDb(dbFile, Logger).ConfigureAwait(false);
|
|
|
|
|
|
|
|
|
|
|
|
var createMediaStreamsTableCommand
|
|
|
|
var createMediaStreamsTableCommand
|
|
|
|
= "create table if not exists mediastreams (ItemId GUID, StreamIndex INT, StreamType TEXT, Codec TEXT, Language TEXT, ChannelLayout TEXT, Profile TEXT, AspectRatio TEXT, Path TEXT, IsInterlaced BIT, BitRate INT NULL, Channels INT NULL, SampleRate INT NULL, IsDefault BIT, IsForced BIT, IsExternal BIT, Height INT NULL, Width INT NULL, AverageFrameRate FLOAT NULL, RealFrameRate FLOAT NULL, Level FLOAT NULL, PixelFormat TEXT, BitDepth INT NULL, IsAnamorphic BIT NULL, RefFrames INT NULL, IsCabac BIT NULL, CodecTag TEXT NULL, Comment TEXT NULL, NalLengthSize TEXT NULL, PRIMARY KEY (ItemId, StreamIndex))";
|
|
|
|
= "create table if not exists mediastreams (ItemId GUID, StreamIndex INT, StreamType TEXT, Codec TEXT, Language TEXT, ChannelLayout TEXT, Profile TEXT, AspectRatio TEXT, Path TEXT, IsInterlaced BIT, BitRate INT NULL, Channels INT NULL, SampleRate INT NULL, IsDefault BIT, IsForced BIT, IsExternal BIT, Height INT NULL, Width INT NULL, AverageFrameRate FLOAT NULL, RealFrameRate FLOAT NULL, Level FLOAT NULL, PixelFormat TEXT, BitDepth INT NULL, IsAnamorphic BIT NULL, RefFrames INT NULL, CodecTag TEXT NULL, Comment TEXT NULL, NalLengthSize TEXT NULL, PRIMARY KEY (ItemId, StreamIndex))";
|
|
|
|
|
|
|
|
|
|
|
|
string[] queries = {
|
|
|
|
string[] queries = {
|
|
|
|
|
|
|
|
|
|
|
@ -389,7 +389,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
"BitDepth",
|
|
|
|
"BitDepth",
|
|
|
|
"IsAnamorphic",
|
|
|
|
"IsAnamorphic",
|
|
|
|
"RefFrames",
|
|
|
|
"RefFrames",
|
|
|
|
"IsCabac",
|
|
|
|
|
|
|
|
"CodecTag",
|
|
|
|
"CodecTag",
|
|
|
|
"Comment",
|
|
|
|
"Comment",
|
|
|
|
"NalLengthSize"
|
|
|
|
"NalLengthSize"
|
|
|
@ -2890,7 +2889,6 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
_saveStreamCommand.GetParameter(index++).Value = stream.BitDepth;
|
|
|
|
_saveStreamCommand.GetParameter(index++).Value = stream.BitDepth;
|
|
|
|
_saveStreamCommand.GetParameter(index++).Value = stream.IsAnamorphic;
|
|
|
|
_saveStreamCommand.GetParameter(index++).Value = stream.IsAnamorphic;
|
|
|
|
_saveStreamCommand.GetParameter(index++).Value = stream.RefFrames;
|
|
|
|
_saveStreamCommand.GetParameter(index++).Value = stream.RefFrames;
|
|
|
|
_saveStreamCommand.GetParameter(index++).Value = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_saveStreamCommand.GetParameter(index++).Value = stream.CodecTag;
|
|
|
|
_saveStreamCommand.GetParameter(index++).Value = stream.CodecTag;
|
|
|
|
_saveStreamCommand.GetParameter(index++).Value = stream.Comment;
|
|
|
|
_saveStreamCommand.GetParameter(index++).Value = stream.Comment;
|
|
|
@ -3043,21 +3041,19 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
item.RefFrames = reader.GetInt32(24);
|
|
|
|
item.RefFrames = reader.GetInt32(24);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// cabac no longer used
|
|
|
|
if (!reader.IsDBNull(25))
|
|
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(26))
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
item.CodecTag = reader.GetString(26);
|
|
|
|
item.CodecTag = reader.GetString(25);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(27))
|
|
|
|
if (!reader.IsDBNull(26))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
item.Comment = reader.GetString(27);
|
|
|
|
item.Comment = reader.GetString(26);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!reader.IsDBNull(28))
|
|
|
|
if (!reader.IsDBNull(27))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
item.NalLengthSize = reader.GetString(28);
|
|
|
|
item.NalLengthSize = reader.GetString(27);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return item;
|
|
|
|
return item;
|
|
|
|