aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/Channels/ChannelManager.cs20
-rw-r--r--MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs8
-rw-r--r--MediaBrowser.Server.Implementations/Persistence/BaseSqliteRepository.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs2
-rw-r--r--MediaBrowser.Server.Implementations/Persistence/SqliteUserDataRepository.cs20
5 files changed, 18 insertions, 34 deletions
diff --git a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
index e01468d17..41592865c 100644
--- a/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
+++ b/MediaBrowser.Server.Implementations/Channels/ChannelManager.cs
@@ -1320,20 +1320,14 @@ namespace MediaBrowser.Server.Implementations.Channels
item.Tags = info.Tags;
item.HomePageUrl = info.HomePageUrl;
}
- else
+ else if (info.Type == ChannelItemType.Folder && info.FolderType == ChannelFolderType.Container)
{
- // Can't do this right now due to channels that utilize the server's metadata services
- //if (item.Name != info.Name)
- //{
- // item.Name = info.Name;
- // forceUpdate = true;
- //}
-
- //if (item.CommunityRating != info.CommunityRating)
- //{
- // item.CommunityRating = info.CommunityRating;
- // forceUpdate = true;
- //}
+ // At least update names of container folders
+ if (item.Name != info.Name)
+ {
+ item.Name = info.Name;
+ forceUpdate = true;
+ }
}
var hasArtists = item as IHasArtist;
diff --git a/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs b/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs
index 1bcb02ac3..4f3fe1bf3 100644
--- a/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/MediaSourceManager.cs
@@ -69,14 +69,6 @@ namespace MediaBrowser.Server.Implementations.Library
if (stream.IsTextSubtitleStream)
{
- if (string.Equals(stream.Codec, "ass", StringComparison.OrdinalIgnoreCase))
- {
- return false;
- }
- if (string.Equals(stream.Codec, "ssa", StringComparison.OrdinalIgnoreCase))
- {
- return false;
- }
return true;
}
diff --git a/MediaBrowser.Server.Implementations/Persistence/BaseSqliteRepository.cs b/MediaBrowser.Server.Implementations/Persistence/BaseSqliteRepository.cs
index eec5b4b76..233ab56fe 100644
--- a/MediaBrowser.Server.Implementations/Persistence/BaseSqliteRepository.cs
+++ b/MediaBrowser.Server.Implementations/Persistence/BaseSqliteRepository.cs
@@ -8,7 +8,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
{
public abstract class BaseSqliteRepository : IDisposable
{
- protected readonly SemaphoreSlim WriteLock = new SemaphoreSlim(1, 1);
+ protected SemaphoreSlim WriteLock = new SemaphoreSlim(1, 1);
protected readonly IDbConnector DbConnector;
protected ILogger Logger;
diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
index 6d067e345..d86e52b01 100644
--- a/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
+++ b/MediaBrowser.Server.Implementations/Persistence/SqliteItemRepository.cs
@@ -328,7 +328,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
new MediaStreamColumns(_connection, Logger).AddColumns();
DataExtensions.Attach(_connection, Path.Combine(_config.ApplicationPaths.DataPath, "userdata_v2.db"), "UserDataDb");
- await userDataRepo.Initialize(_connection).ConfigureAwait(false);
+ await userDataRepo.Initialize(_connection, WriteLock).ConfigureAwait(false);
//await Vacuum(_connection).ConfigureAwait(false);
}
diff --git a/MediaBrowser.Server.Implementations/Persistence/SqliteUserDataRepository.cs b/MediaBrowser.Server.Implementations/Persistence/SqliteUserDataRepository.cs
index 812e0aa48..62d9e7634 100644
--- a/MediaBrowser.Server.Implementations/Persistence/SqliteUserDataRepository.cs
+++ b/MediaBrowser.Server.Implementations/Persistence/SqliteUserDataRepository.cs
@@ -56,8 +56,10 @@ namespace MediaBrowser.Server.Implementations.Persistence
/// Opens the connection to the database
/// </summary>
/// <returns>Task.</returns>
- public async Task Initialize(IDbConnection connection)
+ public async Task Initialize(IDbConnection connection, SemaphoreSlim writeLock)
{
+ WriteLock.Dispose();
+ WriteLock = writeLock;
_connection = connection;
string[] queries = {
@@ -438,18 +440,14 @@ namespace MediaBrowser.Server.Implementations.Persistence
return userData;
}
- protected override void CloseConnection()
+ protected override void Dispose(bool dispose)
{
- if (_connection != null)
- {
- if (_connection.IsOpen())
- {
- _connection.Close();
- }
+ // handled by library database
+ }
- _connection.Dispose();
- _connection = null;
- }
+ protected override void CloseConnection()
+ {
+ // handled by library database
}
}
} \ No newline at end of file