mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-05 21:37:10 -04:00
add dll config file
This commit is contained in:
parent
9d1b4e1074
commit
2a0280d48d
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.Serialization;
|
||||
@ -127,5 +128,14 @@ namespace Emby.Server.Implementations.Data
|
||||
return stream.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Attach(IDatabaseConnection db, string path, string alias)
|
||||
{
|
||||
var commandText = string.Format("attach ? as {0};", alias);
|
||||
var paramList = new List<object>();
|
||||
paramList.Add(path);
|
||||
|
||||
db.Execute(commandText, paramList.ToArray());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -139,7 +139,7 @@
|
||||
// /// <returns>Task.</returns>
|
||||
// public async Task Initialize(SqliteUserDataRepository userDataRepo)
|
||||
// {
|
||||
// _connection = await CreateConnection(false).ConfigureAwait(false);
|
||||
// _connection = CreateConnection(false);
|
||||
|
||||
// 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, CodecTag TEXT NULL, Comment TEXT NULL, NalLengthSize TEXT NULL, IsAvc BIT NULL, Title TEXT NULL, TimeBase TEXT NULL, CodecTimeBase TEXT NULL, PRIMARY KEY (ItemId, StreamIndex))";
|
||||
@ -168,109 +168,131 @@
|
||||
|
||||
// };
|
||||
|
||||
// _connection.RunQueries(queries, Logger);
|
||||
// _connection.RunQueries(queries);
|
||||
|
||||
// _connection.AddColumn(Logger, "AncestorIds", "AncestorIdText", "Text");
|
||||
// _connection.RunInTransaction(db =>
|
||||
// {
|
||||
// var existingColumnNames = GetColumnNames(db, "AncestorIds");
|
||||
// AddColumn(db, "AncestorIds", "AncestorIdText", "Text", existingColumnNames);
|
||||
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Path", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "StartDate", "DATETIME");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "EndDate", "DATETIME");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ChannelId", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsMovie", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsSports", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsKids", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "CommunityRating", "Float");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "CustomRating", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IndexNumber", "INT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsLocked", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Name", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "OfficialRating", "Text");
|
||||
// existingColumnNames = GetColumnNames(db, "TypedBaseItems");
|
||||
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "MediaType", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Overview", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ParentIndexNumber", "INT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "PremiereDate", "DATETIME");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ProductionYear", "INT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ParentId", "GUID");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Genres", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "SchemaVersion", "INT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "SortName", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "RunTimeTicks", "BIGINT");
|
||||
// AddColumn(db, "TypedBaseItems", "Path", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "StartDate", "DATETIME", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "EndDate", "DATETIME", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ChannelId", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsMovie", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsSports", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsKids", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "CommunityRating", "Float", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "CustomRating", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IndexNumber", "INT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsLocked", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "Name", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "OfficialRating", "Text", existingColumnNames);
|
||||
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "OfficialRatingDescription", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "HomePageUrl", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "VoteCount", "INT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "DisplayMediaType", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "DateCreated", "DATETIME");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "DateModified", "DATETIME");
|
||||
// AddColumn(db, "TypedBaseItems", "MediaType", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "Overview", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ParentIndexNumber", "INT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "PremiereDate", "DATETIME", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ProductionYear", "INT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ParentId", "GUID", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "Genres", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "SchemaVersion", "INT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "SortName", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "RunTimeTicks", "BIGINT", existingColumnNames);
|
||||
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ForcedSortName", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsOffline", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "LocationType", "Text");
|
||||
// AddColumn(db, "TypedBaseItems", "OfficialRatingDescription", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "HomePageUrl", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "VoteCount", "INT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "DisplayMediaType", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "DateCreated", "DATETIME", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "DateModified", "DATETIME", existingColumnNames);
|
||||
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsSeries", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsLive", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsNews", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsPremiere", "BIT");
|
||||
// AddColumn(db, "TypedBaseItems", "ForcedSortName", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsOffline", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "LocationType", "Text", existingColumnNames);
|
||||
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "EpisodeTitle", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsRepeat", "BIT");
|
||||
// AddColumn(db, "TypedBaseItems", "IsSeries", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsLive", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsNews", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsPremiere", "BIT", existingColumnNames);
|
||||
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "PreferredMetadataLanguage", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "PreferredMetadataCountryCode", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsHD", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ExternalEtag", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "DateLastRefreshed", "DATETIME");
|
||||
// AddColumn(db, "TypedBaseItems", "EpisodeTitle", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsRepeat", "BIT", existingColumnNames);
|
||||
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "DateLastSaved", "DATETIME");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsInMixedFolder", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "LockedFields", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Studios", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Audio", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ExternalServiceId", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Tags", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsFolder", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "InheritedParentalRatingValue", "INT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "UnratedType", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "TopParentId", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsItemByName", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "SourceType", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "TrailerTypes", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "CriticRating", "Float");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "CriticRatingSummary", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "InheritedTags", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "CleanName", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "PresentationUniqueKey", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "SlugName", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "OriginalTitle", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "PrimaryVersionId", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "DateLastMediaAdded", "DATETIME");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Album", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "IsVirtualItem", "BIT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "SeriesName", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "UserDataKey", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "SeasonName", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "SeasonId", "GUID");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "SeriesId", "GUID");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "SeriesSortName", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ExternalSeriesId", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ShortOverview", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Tagline", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Keywords", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ProviderIds", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Images", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ProductionLocations", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ThemeSongIds", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ThemeVideoIds", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "TotalBitrate", "INT");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ExtraType", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "Artists", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "AlbumArtists", "Text");
|
||||
// _connection.AddColumn(Logger, "TypedBaseItems", "ExternalId", "Text");
|
||||
// AddColumn(db, "TypedBaseItems", "PreferredMetadataLanguage", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "PreferredMetadataCountryCode", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsHD", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ExternalEtag", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "DateLastRefreshed", "DATETIME", existingColumnNames);
|
||||
|
||||
// _connection.AddColumn(Logger, "ItemValues", "CleanValue", "Text");
|
||||
// AddColumn(db, "TypedBaseItems", "DateLastSaved", "DATETIME", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsInMixedFolder", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "LockedFields", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "Studios", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "Audio", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ExternalServiceId", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "Tags", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsFolder", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "InheritedParentalRatingValue", "INT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "UnratedType", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "TopParentId", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsItemByName", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "SourceType", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "TrailerTypes", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "CriticRating", "Float", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "CriticRatingSummary", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "InheritedTags", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "CleanName", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "PresentationUniqueKey", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "SlugName", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "OriginalTitle", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "PrimaryVersionId", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "DateLastMediaAdded", "DATETIME", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "Album", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "IsVirtualItem", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "SeriesName", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "UserDataKey", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "SeasonName", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "SeasonId", "GUID", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "SeriesId", "GUID", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "SeriesSortName", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ExternalSeriesId", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ShortOverview", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "Tagline", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "Keywords", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ProviderIds", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "Images", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ProductionLocations", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ThemeSongIds", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ThemeVideoIds", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "TotalBitrate", "INT", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ExtraType", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "Artists", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "AlbumArtists", "Text", existingColumnNames);
|
||||
// AddColumn(db, "TypedBaseItems", "ExternalId", "Text", existingColumnNames);
|
||||
|
||||
// _connection.AddColumn(Logger, ChaptersTableName, "ImageDateModified", "DATETIME");
|
||||
// existingColumnNames = GetColumnNames(db, "ItemValues");
|
||||
// AddColumn(db, "ItemValues", "CleanValue", "Text", existingColumnNames);
|
||||
|
||||
// existingColumnNames = GetColumnNames(db, ChaptersTableName);
|
||||
// AddColumn(db, ChaptersTableName, "ImageDateModified", "DATETIME", existingColumnNames);
|
||||
|
||||
// existingColumnNames = GetColumnNames(db, "MediaStreams");
|
||||
// AddColumn(db, "MediaStreams", "IsAvc", "BIT", existingColumnNames);
|
||||
// AddColumn(db, "MediaStreams", "TimeBase", "TEXT", existingColumnNames);
|
||||
// AddColumn(db, "MediaStreams", "CodecTimeBase", "TEXT", existingColumnNames);
|
||||
// AddColumn(db, "MediaStreams", "Title", "TEXT", existingColumnNames);
|
||||
// AddColumn(db, "MediaStreams", "NalLengthSize", "TEXT", existingColumnNames);
|
||||
// AddColumn(db, "MediaStreams", "Comment", "TEXT", existingColumnNames);
|
||||
// AddColumn(db, "MediaStreams", "CodecTag", "TEXT", existingColumnNames);
|
||||
// AddColumn(db, "MediaStreams", "PixelFormat", "TEXT", existingColumnNames);
|
||||
// AddColumn(db, "MediaStreams", "BitDepth", "INT", existingColumnNames);
|
||||
// AddColumn(db, "MediaStreams", "RefFrames", "INT", existingColumnNames);
|
||||
// AddColumn(db, "MediaStreams", "KeyFrames", "TEXT", existingColumnNames);
|
||||
// AddColumn(db, "MediaStreams", "IsAnamorphic", "BIT", existingColumnNames);
|
||||
// });
|
||||
|
||||
// string[] postQueries =
|
||||
|
||||
@ -334,14 +356,12 @@
|
||||
// "create index if not exists idx_ItemValues7 on ItemValues(Type,CleanValue,ItemId)"
|
||||
// };
|
||||
|
||||
// _connection.RunQueries(postQueries, Logger);
|
||||
// _connection.RunQueries(postQueries);
|
||||
|
||||
// PrepareStatements();
|
||||
|
||||
// new MediaStreamColumns(_connection, Logger).AddColumns();
|
||||
|
||||
// DataExtensions.Attach(_connection, Path.Combine(_config.ApplicationPaths.DataPath, "userdata_v2.db"), "UserDataDb");
|
||||
// await userDataRepo.Initialize(_connection, WriteLock).ConfigureAwait(false);
|
||||
// SqliteExtensions.Attach(_connection, Path.Combine(_config.ApplicationPaths.DataPath, "userdata_v2.db"), "UserDataDb");
|
||||
// userDataRepo.Initialize(_connection, WriteLock);
|
||||
// //await Vacuum(_connection).ConfigureAwait(false);
|
||||
// }
|
||||
|
||||
|
@ -1,331 +1,331 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Persistence;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using SQLitePCL.pretty;
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.IO;
|
||||
//using System.Linq;
|
||||
//using System.Threading;
|
||||
//using System.Threading.Tasks;
|
||||
//using MediaBrowser.Common.Configuration;
|
||||
//using MediaBrowser.Controller.Entities;
|
||||
//using MediaBrowser.Controller.Persistence;
|
||||
//using MediaBrowser.Model.Logging;
|
||||
//using SQLitePCL.pretty;
|
||||
|
||||
namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
public class SqliteUserDataRepository : BaseSqliteRepository, IUserDataRepository
|
||||
{
|
||||
private SQLiteDatabaseConnection _connection;
|
||||
//namespace Emby.Server.Implementations.Data
|
||||
//{
|
||||
// public class SqliteUserDataRepository : BaseSqliteRepository, IUserDataRepository
|
||||
// {
|
||||
// private SQLiteDatabaseConnection _connection;
|
||||
|
||||
public SqliteUserDataRepository(ILogger logger, IApplicationPaths appPaths)
|
||||
: base(logger)
|
||||
{
|
||||
DbFilePath = Path.Combine(appPaths.DataPath, "userdata_v2.db");
|
||||
}
|
||||
// public SqliteUserDataRepository(ILogger logger, IApplicationPaths appPaths)
|
||||
// : base(logger)
|
||||
// {
|
||||
// DbFilePath = Path.Combine(appPaths.DataPath, "userdata_v2.db");
|
||||
// }
|
||||
|
||||
protected override bool EnableConnectionPooling
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
// protected override bool EnableConnectionPooling
|
||||
// {
|
||||
// get { return false; }
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the repository
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return "SQLite";
|
||||
}
|
||||
}
|
||||
// /// <summary>
|
||||
// /// Gets the name of the repository
|
||||
// /// </summary>
|
||||
// /// <value>The name.</value>
|
||||
// public string Name
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return "SQLite";
|
||||
// }
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Opens the connection to the database
|
||||
/// </summary>
|
||||
/// <returns>Task.</returns>
|
||||
public void Initialize(SQLiteDatabaseConnection connection, ReaderWriterLockSlim writeLock)
|
||||
{
|
||||
WriteLock.Dispose();
|
||||
WriteLock = writeLock;
|
||||
_connection = connection;
|
||||
// /// <summary>
|
||||
// /// Opens the connection to the database
|
||||
// /// </summary>
|
||||
// /// <returns>Task.</returns>
|
||||
// public void Initialize(SQLiteDatabaseConnection connection, ReaderWriterLockSlim writeLock)
|
||||
// {
|
||||
// WriteLock.Dispose();
|
||||
// WriteLock = writeLock;
|
||||
// _connection = connection;
|
||||
|
||||
string[] queries = {
|
||||
// string[] queries = {
|
||||
|
||||
"create table if not exists UserDataDb.userdata (key nvarchar, userId GUID, rating float null, played bit, playCount int, isFavorite bit, playbackPositionTicks bigint, lastPlayedDate datetime null)",
|
||||
// "create table if not exists UserDataDb.userdata (key nvarchar, userId GUID, rating float null, played bit, playCount int, isFavorite bit, playbackPositionTicks bigint, lastPlayedDate datetime null)",
|
||||
|
||||
"drop index if exists UserDataDb.idx_userdata",
|
||||
"drop index if exists UserDataDb.idx_userdata1",
|
||||
"drop index if exists UserDataDb.idx_userdata2",
|
||||
"drop index if exists UserDataDb.userdataindex1",
|
||||
// "drop index if exists UserDataDb.idx_userdata",
|
||||
// "drop index if exists UserDataDb.idx_userdata1",
|
||||
// "drop index if exists UserDataDb.idx_userdata2",
|
||||
// "drop index if exists UserDataDb.userdataindex1",
|
||||
|
||||
"create unique index if not exists UserDataDb.userdataindex on userdata (key, userId)",
|
||||
"create index if not exists UserDataDb.userdataindex2 on userdata (key, userId, played)",
|
||||
"create index if not exists UserDataDb.userdataindex3 on userdata (key, userId, playbackPositionTicks)",
|
||||
"create index if not exists UserDataDb.userdataindex4 on userdata (key, userId, isFavorite)",
|
||||
// "create unique index if not exists UserDataDb.userdataindex on userdata (key, userId)",
|
||||
// "create index if not exists UserDataDb.userdataindex2 on userdata (key, userId, played)",
|
||||
// "create index if not exists UserDataDb.userdataindex3 on userdata (key, userId, playbackPositionTicks)",
|
||||
// "create index if not exists UserDataDb.userdataindex4 on userdata (key, userId, isFavorite)",
|
||||
|
||||
//pragmas
|
||||
"pragma temp_store = memory",
|
||||
// //pragmas
|
||||
// "pragma temp_store = memory",
|
||||
|
||||
"pragma shrink_memory"
|
||||
};
|
||||
// "pragma shrink_memory"
|
||||
// };
|
||||
|
||||
_connection.RunQueries(queries);
|
||||
// _connection.RunQueries(queries);
|
||||
|
||||
connection.RunInTransaction(db =>
|
||||
{
|
||||
var existingColumnNames = GetColumnNames(db, "userdata");
|
||||
// connection.RunInTransaction(db =>
|
||||
// {
|
||||
// var existingColumnNames = GetColumnNames(db, "userdata");
|
||||
|
||||
AddColumn(db, "userdata", "AudioStreamIndex", "int", existingColumnNames);
|
||||
AddColumn(db, "userdata", "SubtitleStreamIndex", "int", existingColumnNames);
|
||||
});
|
||||
}
|
||||
// AddColumn(db, "userdata", "AudioStreamIndex", "int", existingColumnNames);
|
||||
// AddColumn(db, "userdata", "SubtitleStreamIndex", "int", existingColumnNames);
|
||||
// });
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Saves the user data.
|
||||
/// </summary>
|
||||
/// <param name="userId">The user id.</param>
|
||||
/// <param name="key">The key.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">userData
|
||||
/// or
|
||||
/// cancellationToken
|
||||
/// or
|
||||
/// userId
|
||||
/// or
|
||||
/// userDataId</exception>
|
||||
public Task SaveUserData(Guid userId, string key, UserItemData userData, CancellationToken cancellationToken)
|
||||
{
|
||||
if (userData == null)
|
||||
{
|
||||
throw new ArgumentNullException("userData");
|
||||
}
|
||||
if (userId == Guid.Empty)
|
||||
{
|
||||
throw new ArgumentNullException("userId");
|
||||
}
|
||||
if (string.IsNullOrEmpty(key))
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
// /// <summary>
|
||||
// /// Saves the user data.
|
||||
// /// </summary>
|
||||
// /// <param name="userId">The user id.</param>
|
||||
// /// <param name="key">The key.</param>
|
||||
// /// <param name="userData">The user data.</param>
|
||||
// /// <param name="cancellationToken">The cancellation token.</param>
|
||||
// /// <returns>Task.</returns>
|
||||
// /// <exception cref="System.ArgumentNullException">userData
|
||||
// /// or
|
||||
// /// cancellationToken
|
||||
// /// or
|
||||
// /// userId
|
||||
// /// or
|
||||
// /// userDataId</exception>
|
||||
// public Task SaveUserData(Guid userId, string key, UserItemData userData, CancellationToken cancellationToken)
|
||||
// {
|
||||
// if (userData == null)
|
||||
// {
|
||||
// throw new ArgumentNullException("userData");
|
||||
// }
|
||||
// if (userId == Guid.Empty)
|
||||
// {
|
||||
// throw new ArgumentNullException("userId");
|
||||
// }
|
||||
// if (string.IsNullOrEmpty(key))
|
||||
// {
|
||||
// throw new ArgumentNullException("key");
|
||||
// }
|
||||
|
||||
return PersistUserData(userId, key, userData, cancellationToken);
|
||||
}
|
||||
// return PersistUserData(userId, key, userData, cancellationToken);
|
||||
// }
|
||||
|
||||
public Task SaveAllUserData(Guid userId, IEnumerable<UserItemData> userData, CancellationToken cancellationToken)
|
||||
{
|
||||
if (userData == null)
|
||||
{
|
||||
throw new ArgumentNullException("userData");
|
||||
}
|
||||
if (userId == Guid.Empty)
|
||||
{
|
||||
throw new ArgumentNullException("userId");
|
||||
}
|
||||
// public Task SaveAllUserData(Guid userId, IEnumerable<UserItemData> userData, CancellationToken cancellationToken)
|
||||
// {
|
||||
// if (userData == null)
|
||||
// {
|
||||
// throw new ArgumentNullException("userData");
|
||||
// }
|
||||
// if (userId == Guid.Empty)
|
||||
// {
|
||||
// throw new ArgumentNullException("userId");
|
||||
// }
|
||||
|
||||
return PersistAllUserData(userId, userData.ToList(), cancellationToken);
|
||||
}
|
||||
// return PersistAllUserData(userId, userData.ToList(), cancellationToken);
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Persists the user data.
|
||||
/// </summary>
|
||||
/// <param name="userId">The user id.</param>
|
||||
/// <param name="key">The key.</param>
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
public async Task PersistUserData(Guid userId, string key, UserItemData userData, CancellationToken cancellationToken)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
// /// <summary>
|
||||
// /// Persists the user data.
|
||||
// /// </summary>
|
||||
// /// <param name="userId">The user id.</param>
|
||||
// /// <param name="key">The key.</param>
|
||||
// /// <param name="userData">The user data.</param>
|
||||
// /// <param name="cancellationToken">The cancellation token.</param>
|
||||
// /// <returns>Task.</returns>
|
||||
// public async Task PersistUserData(Guid userId, string key, UserItemData userData, CancellationToken cancellationToken)
|
||||
// {
|
||||
// cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
using (WriteLock.Write())
|
||||
{
|
||||
_connection.RunInTransaction(db =>
|
||||
{
|
||||
SaveUserData(db, userId, key, userData);
|
||||
});
|
||||
}
|
||||
}
|
||||
// using (WriteLock.Write())
|
||||
// {
|
||||
// _connection.RunInTransaction(db =>
|
||||
// {
|
||||
// SaveUserData(db, userId, key, userData);
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
private void SaveUserData(IDatabaseConnection db, Guid userId, string key, UserItemData userData)
|
||||
{
|
||||
var paramList = new List<object>();
|
||||
var commandText = "replace into userdata (key, userId, rating,played,playCount,isFavorite,playbackPositionTicks,lastPlayedDate,AudioStreamIndex,SubtitleStreamIndex) values (?, ?, ?,?,?,?,?,?,?,?)";
|
||||
// private void SaveUserData(IDatabaseConnection db, Guid userId, string key, UserItemData userData)
|
||||
// {
|
||||
// var paramList = new List<object>();
|
||||
// var commandText = "replace into userdata (key, userId, rating,played,playCount,isFavorite,playbackPositionTicks,lastPlayedDate,AudioStreamIndex,SubtitleStreamIndex) values (?, ?, ?,?,?,?,?,?,?,?)";
|
||||
|
||||
paramList.Add(key);
|
||||
paramList.Add(userId.ToGuidParamValue());
|
||||
paramList.Add(userData.Rating);
|
||||
paramList.Add(userData.Played);
|
||||
paramList.Add(userData.PlayCount);
|
||||
paramList.Add(userData.IsFavorite);
|
||||
paramList.Add(userData.PlaybackPositionTicks);
|
||||
// paramList.Add(key);
|
||||
// paramList.Add(userId.ToGuidParamValue());
|
||||
// paramList.Add(userData.Rating);
|
||||
// paramList.Add(userData.Played);
|
||||
// paramList.Add(userData.PlayCount);
|
||||
// paramList.Add(userData.IsFavorite);
|
||||
// paramList.Add(userData.PlaybackPositionTicks);
|
||||
|
||||
if (userData.LastPlayedDate.HasValue)
|
||||
{
|
||||
paramList.Add(userData.LastPlayedDate.Value.ToDateTimeParamValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
paramList.Add(null);
|
||||
}
|
||||
paramList.Add(userData.AudioStreamIndex);
|
||||
paramList.Add(userData.SubtitleStreamIndex);
|
||||
// if (userData.LastPlayedDate.HasValue)
|
||||
// {
|
||||
// paramList.Add(userData.LastPlayedDate.Value.ToDateTimeParamValue());
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// paramList.Add(null);
|
||||
// }
|
||||
// paramList.Add(userData.AudioStreamIndex);
|
||||
// paramList.Add(userData.SubtitleStreamIndex);
|
||||
|
||||
db.Execute(commandText, paramList.ToArray());
|
||||
}
|
||||
// db.Execute(commandText, paramList.ToArray());
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Persist all user data for the specified user
|
||||
/// </summary>
|
||||
private async Task PersistAllUserData(Guid userId, List<UserItemData> userDataList, CancellationToken cancellationToken)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
// /// <summary>
|
||||
// /// Persist all user data for the specified user
|
||||
// /// </summary>
|
||||
// private async Task PersistAllUserData(Guid userId, List<UserItemData> userDataList, CancellationToken cancellationToken)
|
||||
// {
|
||||
// cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
using (WriteLock.Write())
|
||||
{
|
||||
_connection.RunInTransaction(db =>
|
||||
{
|
||||
foreach (var userItemData in userDataList)
|
||||
{
|
||||
SaveUserData(db, userId, userItemData.Key, userItemData);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
// using (WriteLock.Write())
|
||||
// {
|
||||
// _connection.RunInTransaction(db =>
|
||||
// {
|
||||
// foreach (var userItemData in userDataList)
|
||||
// {
|
||||
// SaveUserData(db, userId, userItemData.Key, userItemData);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user data.
|
||||
/// </summary>
|
||||
/// <param name="userId">The user id.</param>
|
||||
/// <param name="key">The key.</param>
|
||||
/// <returns>Task{UserItemData}.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">
|
||||
/// userId
|
||||
/// or
|
||||
/// key
|
||||
/// </exception>
|
||||
public UserItemData GetUserData(Guid userId, string key)
|
||||
{
|
||||
if (userId == Guid.Empty)
|
||||
{
|
||||
throw new ArgumentNullException("userId");
|
||||
}
|
||||
if (string.IsNullOrEmpty(key))
|
||||
{
|
||||
throw new ArgumentNullException("key");
|
||||
}
|
||||
// /// <summary>
|
||||
// /// Gets the user data.
|
||||
// /// </summary>
|
||||
// /// <param name="userId">The user id.</param>
|
||||
// /// <param name="key">The key.</param>
|
||||
// /// <returns>Task{UserItemData}.</returns>
|
||||
// /// <exception cref="System.ArgumentNullException">
|
||||
// /// userId
|
||||
// /// or
|
||||
// /// key
|
||||
// /// </exception>
|
||||
// public UserItemData GetUserData(Guid userId, string key)
|
||||
// {
|
||||
// if (userId == Guid.Empty)
|
||||
// {
|
||||
// throw new ArgumentNullException("userId");
|
||||
// }
|
||||
// if (string.IsNullOrEmpty(key))
|
||||
// {
|
||||
// throw new ArgumentNullException("key");
|
||||
// }
|
||||
|
||||
var commandText = "select key,userid,rating,played,playCount,isFavorite,playbackPositionTicks,lastPlayedDate,AudioStreamIndex,SubtitleStreamIndex from userdata where key = ? and userId=?";
|
||||
// var commandText = "select key,userid,rating,played,playCount,isFavorite,playbackPositionTicks,lastPlayedDate,AudioStreamIndex,SubtitleStreamIndex from userdata where key = ? and userId=?";
|
||||
|
||||
var paramList = new List<object>();
|
||||
paramList.Add(key);
|
||||
paramList.Add(userId.ToGuidParamValue());
|
||||
// var paramList = new List<object>();
|
||||
// paramList.Add(key);
|
||||
// paramList.Add(userId.ToGuidParamValue());
|
||||
|
||||
foreach (var row in _connection.Query(commandText, paramList.ToArray()))
|
||||
{
|
||||
return ReadRow(row);
|
||||
}
|
||||
// foreach (var row in _connection.Query(commandText, paramList.ToArray()))
|
||||
// {
|
||||
// return ReadRow(row);
|
||||
// }
|
||||
|
||||
return null;
|
||||
}
|
||||
// return null;
|
||||
// }
|
||||
|
||||
public UserItemData GetUserData(Guid userId, List<string> keys)
|
||||
{
|
||||
if (userId == Guid.Empty)
|
||||
{
|
||||
throw new ArgumentNullException("userId");
|
||||
}
|
||||
if (keys == null)
|
||||
{
|
||||
throw new ArgumentNullException("keys");
|
||||
}
|
||||
// public UserItemData GetUserData(Guid userId, List<string> keys)
|
||||
// {
|
||||
// if (userId == Guid.Empty)
|
||||
// {
|
||||
// throw new ArgumentNullException("userId");
|
||||
// }
|
||||
// if (keys == null)
|
||||
// {
|
||||
// throw new ArgumentNullException("keys");
|
||||
// }
|
||||
|
||||
if (keys.Count == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
// if (keys.Count == 0)
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
return GetUserData(userId, keys[0]);
|
||||
}
|
||||
// return GetUserData(userId, keys[0]);
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Return all user-data associated with the given user
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<UserItemData> GetAllUserData(Guid userId)
|
||||
{
|
||||
if (userId == Guid.Empty)
|
||||
{
|
||||
throw new ArgumentNullException("userId");
|
||||
}
|
||||
// /// <summary>
|
||||
// /// Return all user-data associated with the given user
|
||||
// /// </summary>
|
||||
// /// <param name="userId"></param>
|
||||
// /// <returns></returns>
|
||||
// public IEnumerable<UserItemData> GetAllUserData(Guid userId)
|
||||
// {
|
||||
// if (userId == Guid.Empty)
|
||||
// {
|
||||
// throw new ArgumentNullException("userId");
|
||||
// }
|
||||
|
||||
var list = new List<UserItemData>();
|
||||
// var list = new List<UserItemData>();
|
||||
|
||||
using (WriteLock.Read())
|
||||
{
|
||||
var commandText = "select key,userid,rating,played,playCount,isFavorite,playbackPositionTicks,lastPlayedDate,AudioStreamIndex,SubtitleStreamIndex from userdata where userId=?";
|
||||
// using (WriteLock.Read())
|
||||
// {
|
||||
// var commandText = "select key,userid,rating,played,playCount,isFavorite,playbackPositionTicks,lastPlayedDate,AudioStreamIndex,SubtitleStreamIndex from userdata where userId=?";
|
||||
|
||||
var paramList = new List<object>();
|
||||
paramList.Add(userId.ToGuidParamValue());
|
||||
// var paramList = new List<object>();
|
||||
// paramList.Add(userId.ToGuidParamValue());
|
||||
|
||||
foreach (var row in _connection.Query(commandText, paramList.ToArray()))
|
||||
{
|
||||
list.Add(ReadRow(row));
|
||||
}
|
||||
}
|
||||
// foreach (var row in _connection.Query(commandText, paramList.ToArray()))
|
||||
// {
|
||||
// list.Add(ReadRow(row));
|
||||
// }
|
||||
// }
|
||||
|
||||
return list;
|
||||
}
|
||||
// return list;
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Read a row from the specified reader into the provided userData object
|
||||
/// </summary>
|
||||
/// <param name="reader"></param>
|
||||
private UserItemData ReadRow(IReadOnlyList<IResultSetValue> reader)
|
||||
{
|
||||
var userData = new UserItemData();
|
||||
// /// <summary>
|
||||
// /// Read a row from the specified reader into the provided userData object
|
||||
// /// </summary>
|
||||
// /// <param name="reader"></param>
|
||||
// private UserItemData ReadRow(IReadOnlyList<IResultSetValue> reader)
|
||||
// {
|
||||
// var userData = new UserItemData();
|
||||
|
||||
userData.Key = reader[0].ToString();
|
||||
userData.UserId = reader[1].ReadGuid();
|
||||
// userData.Key = reader[0].ToString();
|
||||
// userData.UserId = reader[1].ReadGuid();
|
||||
|
||||
if (reader[2].SQLiteType != SQLiteType.Null)
|
||||
{
|
||||
userData.Rating = reader[2].ToDouble();
|
||||
}
|
||||
// if (reader[2].SQLiteType != SQLiteType.Null)
|
||||
// {
|
||||
// userData.Rating = reader[2].ToDouble();
|
||||
// }
|
||||
|
||||
userData.Played = reader[3].ToBool();
|
||||
userData.PlayCount = reader[4].ToInt();
|
||||
userData.IsFavorite = reader[5].ToBool();
|
||||
userData.PlaybackPositionTicks = reader[6].ToInt64();
|
||||
// userData.Played = reader[3].ToBool();
|
||||
// userData.PlayCount = reader[4].ToInt();
|
||||
// userData.IsFavorite = reader[5].ToBool();
|
||||
// userData.PlaybackPositionTicks = reader[6].ToInt64();
|
||||
|
||||
if (reader[7].SQLiteType != SQLiteType.Null)
|
||||
{
|
||||
userData.LastPlayedDate = reader[7].ReadDateTime();
|
||||
}
|
||||
// if (reader[7].SQLiteType != SQLiteType.Null)
|
||||
// {
|
||||
// userData.LastPlayedDate = reader[7].ReadDateTime();
|
||||
// }
|
||||
|
||||
if (reader[8].SQLiteType != SQLiteType.Null)
|
||||
{
|
||||
userData.AudioStreamIndex = reader[8].ToInt();
|
||||
}
|
||||
// if (reader[8].SQLiteType != SQLiteType.Null)
|
||||
// {
|
||||
// userData.AudioStreamIndex = reader[8].ToInt();
|
||||
// }
|
||||
|
||||
if (reader[9].SQLiteType != SQLiteType.Null)
|
||||
{
|
||||
userData.SubtitleStreamIndex = reader[9].ToInt();
|
||||
}
|
||||
// if (reader[9].SQLiteType != SQLiteType.Null)
|
||||
// {
|
||||
// userData.SubtitleStreamIndex = reader[9].ToInt();
|
||||
// }
|
||||
|
||||
return userData;
|
||||
}
|
||||
// return userData;
|
||||
// }
|
||||
|
||||
protected override void Dispose(bool dispose)
|
||||
{
|
||||
// handled by library database
|
||||
}
|
||||
// protected override void Dispose(bool dispose)
|
||||
// {
|
||||
// // handled by library database
|
||||
// }
|
||||
|
||||
protected override void CloseConnection()
|
||||
{
|
||||
// handled by library database
|
||||
}
|
||||
}
|
||||
}
|
||||
// protected override void CloseConnection()
|
||||
// {
|
||||
// // handled by library database
|
||||
// }
|
||||
// }
|
||||
//}
|
@ -230,6 +230,10 @@
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
<None Include="SQLitePCLRaw.provider.sqlite3.dll.config">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="System.Data.SQLite.dll.config">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<SubType>Designer</SubType>
|
||||
|
@ -0,0 +1,3 @@
|
||||
<configuration>
|
||||
<dllmap dll="sqlite3" target="libsqlite3.so" os="linux"/>
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user