aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Emby.Server.Core/ApplicationHost.cs4
-rw-r--r--Emby.Server.Implementations/Data/BaseSqliteRepository.cs5
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs18
-rw-r--r--MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs6
-rw-r--r--MediaBrowser.Controller/Entities/Movies/BoxSet.cs5
-rw-r--r--MediaBrowser.ServerApplication/Updates/ApplicationUpdater.cs12
6 files changed, 46 insertions, 4 deletions
diff --git a/Emby.Server.Core/ApplicationHost.cs b/Emby.Server.Core/ApplicationHost.cs
index 3b3313169..a0a7416e7 100644
--- a/Emby.Server.Core/ApplicationHost.cs
+++ b/Emby.Server.Core/ApplicationHost.cs
@@ -548,6 +548,8 @@ namespace Emby.Server.Core
RegisterSingleInstance(UserDataManager);
UserRepository = GetUserRepository();
+ // This is only needed for disposal purposes. If removing this, make sure to have the manager handle disposing it
+ RegisterSingleInstance(UserRepository);
var displayPreferencesRepo = new SqliteDisplayPreferencesRepository(LogManager.GetLogger("SqliteDisplayPreferencesRepository"), JsonSerializer, ApplicationPaths, MemoryStreamFactory);
DisplayPreferencesRepository = displayPreferencesRepo;
@@ -678,6 +680,8 @@ namespace Emby.Server.Core
var sharingRepo = new SharingRepository(LogManager.GetLogger("SharingRepository"), ApplicationPaths);
sharingRepo.Initialize();
+ // This is only needed for disposal purposes. If removing this, make sure to have the manager handle disposing it
+ RegisterSingleInstance<ISharingRepository>(sharingRepo);
RegisterSingleInstance<ISharingManager>(new SharingManager(sharingRepo, ServerConfigurationManager, LibraryManager, this));
var activityLogRepo = GetActivityLogRepository();
diff --git a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs b/Emby.Server.Implementations/Data/BaseSqliteRepository.cs
index 206422176..64a0d889e 100644
--- a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs
+++ b/Emby.Server.Implementations/Data/BaseSqliteRepository.cs
@@ -286,7 +286,10 @@ namespace Emby.Server.Implementations.Data
{
if (_connection != null)
{
- _connection.Close();
+ using (_connection)
+ {
+
+ }
_connection = null;
}
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index d0c473777..8e6c1263d 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -1504,6 +1504,20 @@ namespace Emby.Server.Implementations.Dto
}
}
+ private BaseItem GetImageDisplayParent(BaseItem item)
+ {
+ var musicAlbum = item as MusicAlbum;
+ if (musicAlbum != null)
+ {
+ var artist = musicAlbum.MusicArtist;
+ if (artist != null)
+ {
+ return artist;
+ }
+ }
+ return item.GetParent();
+ }
+
private void AddInheritedImages(BaseItemDto dto, BaseItem item, DtoOptions options, BaseItem owner)
{
if (!item.SupportsInheritedParentImages)
@@ -1528,7 +1542,7 @@ namespace Emby.Server.Implementations.Dto
var isFirst = true;
while (((!dto.HasLogo && logoLimit > 0) || (!dto.HasArtImage && artLimit > 0) || (!dto.HasThumb && thumbLimit > 0) || parent is Series) &&
- (parent = parent ?? (isFirst ? item.GetParent() ?? owner : parent)) != null)
+ (parent = parent ?? (isFirst ? GetImageDisplayParent(item) ?? owner : parent)) != null)
{
if (parent == null)
{
@@ -1585,7 +1599,7 @@ namespace Emby.Server.Implementations.Dto
break;
}
- parent = parent.GetParent();
+ parent = GetImageDisplayParent(parent);
}
}
diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
index 569b422cb..ffdbba6f2 100644
--- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
+++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs
@@ -33,6 +33,12 @@ namespace MediaBrowser.Controller.Entities.Audio
}
[IgnoreDataMember]
+ public override bool SupportsInheritedParentImages
+ {
+ get { return true; }
+ }
+
+ [IgnoreDataMember]
public MusicArtist MusicArtist
{
get
diff --git a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs
index 52fb7e281..3e6c88a85 100644
--- a/MediaBrowser.Controller/Entities/Movies/BoxSet.cs
+++ b/MediaBrowser.Controller/Entities/Movies/BoxSet.cs
@@ -202,5 +202,10 @@ namespace MediaBrowser.Controller.Entities.Movies
return false;
}
+
+ public override bool IsVisibleStandalone(User user)
+ {
+ return IsVisible(user);
+ }
}
}
diff --git a/MediaBrowser.ServerApplication/Updates/ApplicationUpdater.cs b/MediaBrowser.ServerApplication/Updates/ApplicationUpdater.cs
index 97537b27d..aa8679bd5 100644
--- a/MediaBrowser.ServerApplication/Updates/ApplicationUpdater.cs
+++ b/MediaBrowser.ServerApplication/Updates/ApplicationUpdater.cs
@@ -47,7 +47,17 @@ namespace MediaBrowser.ServerApplication.Updates
product, archive, Process.GetCurrentProcess().Id, version, restartServiceName ?? string.Empty, appPaths.ProgramDataPath, MainStartup.ApplicationPath, systemPath);
logger.Info("Args: {0}", args);
- Process.Start(tempUpdater, args);
+
+ Process.Start(new ProcessStartInfo
+ {
+ FileName = tempUpdater,
+ Arguments = args,
+ UseShellExecute = false,
+ CreateNoWindow = true,
+ ErrorDialog = false,
+ WindowStyle = ProcessWindowStyle.Hidden,
+ WorkingDirectory = Path.GetDirectoryName(tempUpdater)
+ });
// That's it. The installer will do the work once we exit
}