install service with Emby name

pull/702/head
Luke Pulverenti 10 years ago
parent 25e325481d
commit d0c9273d67

@ -277,7 +277,7 @@ namespace MediaBrowser.Model.Configuration
{ {
new ImageOption new ImageOption
{ {
Limit = 3, Limit = 2,
MinWidth = 1280, MinWidth = 1280,
Type = ImageType.Backdrop Type = ImageType.Backdrop
}, },
@ -304,7 +304,7 @@ namespace MediaBrowser.Model.Configuration
new ImageOption new ImageOption
{ {
Limit = 1, Limit = 0,
Type = ImageType.Banner Type = ImageType.Banner
}, },
@ -374,7 +374,7 @@ namespace MediaBrowser.Model.Configuration
{ {
new ImageOption new ImageOption
{ {
Limit = 1, Limit = 0,
MinWidth = 1280, MinWidth = 1280,
Type = ImageType.Backdrop Type = ImageType.Backdrop
}, },
@ -414,6 +414,14 @@ namespace MediaBrowser.Model.Configuration
{ {
Limit = 0, Limit = 0,
Type = ImageType.Art Type = ImageType.Art
},
// Don't download this by default
// Generally not used
new ImageOption
{
Limit = 0,
Type = ImageType.Logo
} }
} }
}, },

@ -7,6 +7,7 @@ using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Dto; using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Providers; using MediaBrowser.Model.Providers;
using MediaBrowser.Providers.TV;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
@ -16,7 +17,6 @@ using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Xml; using System.Xml;
using MediaBrowser.Providers.TV;
namespace MediaBrowser.Providers.Music namespace MediaBrowser.Providers.Music
{ {

@ -84,13 +84,13 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
return new[] return new[]
{ {
"http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20150331-git-5cba529-win64-static.7z", "http://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20150331-git-5cba529-win64-static.7z",
"https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/ffmpeg/windows/ffmpeg-20150331-git-5cba529-win64-static.7z" "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20150331-git-5cba529-win64-static.7z"
}; };
case Architecture.X86: case Architecture.X86:
return new[] return new[]
{ {
"http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20150331-git-5cba529-win32-static.7z", "http://ffmpeg.zeranoe.com/builds/win32/static/ffmpeg-20150331-git-5cba529-win32-static.7z",
"https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/ffmpeg/windows/ffmpeg-20150331-git-5cba529-win32-static.7z" "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/windows/ffmpeg-20150331-git-5cba529-win32-static.7z"
}; };
} }
break; break;
@ -102,12 +102,12 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
case Architecture.X86_X64: case Architecture.X86_X64:
return new[] return new[]
{ {
"https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/ffmpeg/osx/ffmpeg-x64-2.5.3.7z" "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/osx/ffmpeg-x64-2.5.3.7z"
}; };
case Architecture.X86: case Architecture.X86:
return new[] return new[]
{ {
"https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/ffmpeg/osx/ffmpeg-x86-2.5.3.7z" "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/osx/ffmpeg-x86-2.5.3.7z"
}; };
} }
break; break;
@ -119,12 +119,12 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
case Architecture.X86_X64: case Architecture.X86_X64:
return new[] return new[]
{ {
"https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/ffmpeg/linux/ffmpeg-2.6.1-64bit-static.7z" "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-2.6.1-64bit-static.7z"
}; };
case Architecture.X86: case Architecture.X86:
return new[] return new[]
{ {
"https://github.com/MediaBrowser/MediaBrowser.Resources/raw/master/ffmpeg/linux/ffmpeg-2.6.1-32bit-static.7z" "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-2.6.1-32bit-static.7z"
}; };
} }
break; break;

@ -13,7 +13,7 @@
</nlog> </nlog>
<appSettings> <appSettings>
<add key="DebugProgramDataPath" value="..\..\..\ProgramData-Server" /> <add key="DebugProgramDataPath" value="..\..\..\ProgramData-Server" />
<add key="ReleaseProgramDataPath" value="%ApplicationData%\MediaBrowser-Server" /> <add key="ReleaseProgramDataPath" value=".." />
<add key="ClientSettingsProvider.ServiceUri" value="" /> <add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings> </appSettings>
<startup useLegacyV2RuntimeActivationPolicy="true"> <startup useLegacyV2RuntimeActivationPolicy="true">

@ -1,4 +1,5 @@
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using System.Linq;
using System.ServiceProcess; using System.ServiceProcess;
namespace MediaBrowser.ServerApplication namespace MediaBrowser.ServerApplication
@ -8,8 +9,25 @@ namespace MediaBrowser.ServerApplication
/// </summary> /// </summary>
public class BackgroundService : ServiceBase public class BackgroundService : ServiceBase
{ {
public static string Name = "MediaBrowser"; public static string Name = "Emby";
public static string DisplayName = "Media Browser"; public static string DisplayName = "Emby Server";
public static string GetExistingServiceName()
{
try
{
if (ServiceController.GetServices().Any(s => s.ServiceName == "MediaBrowser"))
{
return "MediaBrowser";
}
}
catch
{
return "MediaBrowser";
}
return Name;
}
private readonly ILogger _logger; private readonly ILogger _logger;
@ -24,7 +42,7 @@ namespace MediaBrowser.ServerApplication
CanStop = true; CanStop = true;
ServiceName = Name; ServiceName = GetExistingServiceName();
} }
/// <summary> /// <summary>

@ -22,7 +22,7 @@ namespace MediaBrowser.ServerApplication
DelayedAutoStart = true, DelayedAutoStart = true,
Description = "The windows background service for Media Browser Server.", Description = "The windows background service for Emby Server.",
// Will ensure the network is available // Will ensure the network is available
ServicesDependedOn = new[] { "LanmanServer", "Tcpip" } ServicesDependedOn = new[] { "LanmanServer", "Tcpip" }

@ -370,7 +370,8 @@ namespace MediaBrowser.ServerApplication
private static void RunServiceInstallationIfNeeded(string applicationPath) private static void RunServiceInstallationIfNeeded(string applicationPath)
{ {
var ctl = ServiceController.GetServices().FirstOrDefault(s => s.ServiceName == BackgroundService.Name); var serviceName = BackgroundService.GetExistingServiceName();
var ctl = ServiceController.GetServices().FirstOrDefault(s => s.ServiceName == serviceName);
if (ctl == null) if (ctl == null)
{ {
@ -476,7 +477,7 @@ namespace MediaBrowser.ServerApplication
// Update is there - execute update // Update is there - execute update
try try
{ {
var serviceName = _isRunningAsService ? BackgroundService.Name : string.Empty; var serviceName = _isRunningAsService ? BackgroundService.GetExistingServiceName() : string.Empty;
new ApplicationUpdater().UpdateApplication(appPaths, updateArchive, logger, serviceName); new ApplicationUpdater().UpdateApplication(appPaths, updateArchive, logger, serviceName);
// And just let the app exit so it can update // And just let the app exit so it can update
@ -539,7 +540,7 @@ namespace MediaBrowser.ServerApplication
private static void ShutdownWindowsService() private static void ShutdownWindowsService()
{ {
_logger.Info("Stopping background service"); _logger.Info("Stopping background service");
var service = new ServiceController(BackgroundService.Name); var service = new ServiceController(BackgroundService.GetExistingServiceName());
service.Refresh(); service.Refresh();

@ -18,17 +18,32 @@ namespace MediaBrowser.ServerApplication.Native
{ {
var shortcutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), "Media Browser 3", "Media Browser Server.lnk"); var shortcutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), "Media Browser 3", "Media Browser Server.lnk");
if (!Directory.Exists(Path.GetDirectoryName(shortcutPath)))
{
shortcutPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.StartMenu), "Emby", "Emby Server.lnk");
}
var startupPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup); var startupPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
// Remove lnk from old name
try
{
fileSystem.DeleteFile(Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "Media Browser Server.lnk"));
}
catch
{
}
if (autorun) if (autorun)
{ {
//Copy our shortut into the startup folder for this user //Copy our shortut into the startup folder for this user
File.Copy(shortcutPath, Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "MBstartup.lnk"), true); File.Copy(shortcutPath, Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "Emby Server.lnk"), true);
} }
else else
{ {
//Remove our shortcut from the startup folder for this user //Remove our shortcut from the startup folder for this user
fileSystem.DeleteFile(Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "MBstartup.lnk")); fileSystem.DeleteFile(Path.Combine(startupPath, Path.GetFileName(shortcutPath) ?? "Emby Server.lnk"));
} }
} }
} }

Loading…
Cancel
Save