diff --git a/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs b/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs
index dcc9744136..5da1ae2dce 100644
--- a/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs
+++ b/Emby.Common.Implementations/EnvironmentInfo/EnvironmentInfo.cs
@@ -12,7 +12,7 @@ namespace Emby.Common.Implementations.EnvironmentInfo
public MediaBrowser.Model.System.Architecture? CustomArchitecture { get; set; }
public MediaBrowser.Model.System.OperatingSystem? CustomOperatingSystem { get; set; }
- public MediaBrowser.Model.System.OperatingSystem OperatingSystem
+ public virtual MediaBrowser.Model.System.OperatingSystem OperatingSystem
{
get
{
diff --git a/Emby.Dlna/Profiles/WdtvLiveProfile.cs b/Emby.Dlna/Profiles/WdtvLiveProfile.cs
index 6cef2d9659..7568825922 100644
--- a/Emby.Dlna/Profiles/WdtvLiveProfile.cs
+++ b/Emby.Dlna/Profiles/WdtvLiveProfile.cs
@@ -125,8 +125,7 @@ namespace Emby.Dlna.Profiles
new DirectPlayProfile
{
- Container = "flac",
- AudioCodec = "flac",
+ Container = "flac,ac3",
Type = DlnaProfileType.Audio
},
diff --git a/Emby.Dlna/Profiles/Xml/WDTV Live.xml b/Emby.Dlna/Profiles/Xml/WDTV Live.xml
index 1cf3ef5973..775d253028 100644
--- a/Emby.Dlna/Profiles/Xml/WDTV Live.xml
+++ b/Emby.Dlna/Profiles/Xml/WDTV Live.xml
@@ -45,7 +45,7 @@
-
+
diff --git a/Emby.Dlna/Ssdp/DeviceDiscovery.cs b/Emby.Dlna/Ssdp/DeviceDiscovery.cs
index 7852669c9d..bd5ad31c24 100644
--- a/Emby.Dlna/Ssdp/DeviceDiscovery.cs
+++ b/Emby.Dlna/Ssdp/DeviceDiscovery.cs
@@ -19,13 +19,12 @@ using Rssdp.Infrastructure;
namespace Emby.Dlna.Ssdp
{
- public class DeviceDiscovery : IDeviceDiscovery, IDisposable
+ public class DeviceDiscovery : IDeviceDiscovery
{
private bool _disposed;
private readonly ILogger _logger;
private readonly IServerConfigurationManager _config;
- private readonly CancellationTokenSource _tokenSource;
public event EventHandler> DeviceDiscovered;
public event EventHandler> DeviceLeft;
@@ -37,8 +36,6 @@ namespace Emby.Dlna.Ssdp
public DeviceDiscovery(ILogger logger, IServerConfigurationManager config, ISocketFactory socketFactory, ITimerFactory timerFactory)
{
- _tokenSource = new CancellationTokenSource();
-
_logger = logger;
_config = config;
_socketFactory = socketFactory;
@@ -59,39 +56,10 @@ namespace Emby.Dlna.Ssdp
_deviceLocator.DeviceAvailable += deviceLocator_DeviceAvailable;
_deviceLocator.DeviceUnavailable += _DeviceLocator_DeviceUnavailable;
- // Perform a search so we don't have to wait for devices to broadcast notifications
- // again to get any results right away (notifications are broadcast periodically).
- StartAsyncSearch();
- }
+ var dueTime = TimeSpan.FromSeconds(5);
+ var interval = TimeSpan.FromSeconds(_config.GetDlnaConfiguration().ClientDiscoveryIntervalSeconds);
- private void StartAsyncSearch()
- {
- Task.Factory.StartNew(async (o) =>
- {
- while (!_tokenSource.IsCancellationRequested)
- {
- try
- {
- // Enable listening for notifications (optional)
- _deviceLocator.StartListeningForNotifications();
-
- await _deviceLocator.SearchAsync(_tokenSource.Token).ConfigureAwait(false);
-
- var delay = _config.GetDlnaConfiguration().ClientDiscoveryIntervalSeconds * 1000;
-
- await Task.Delay(delay, _tokenSource.Token).ConfigureAwait(false);
- }
- catch (OperationCanceledException)
- {
-
- }
- catch (Exception ex)
- {
- _logger.ErrorException("Error searching for devices", ex);
- }
- }
-
- }, CancellationToken.None, TaskCreationOptions.LongRunning);
+ _deviceLocator.RestartBroadcastTimer(dueTime, interval);
}
// Process each found device in the event handler
@@ -141,7 +109,11 @@ namespace Emby.Dlna.Ssdp
if (!_disposed)
{
_disposed = true;
- _tokenSource.Cancel();
+ if (_deviceLocator != null)
+ {
+ _deviceLocator.Dispose();
+ _deviceLocator = null;
+ }
}
}
}
diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
index 89ef87c8ef..1ec5dd1d58 100644
--- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
+++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs
@@ -2092,13 +2092,6 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
writer.WriteElementString("credits", person);
}
- var rt = item.GetProviderId(MetadataProviders.RottenTomatoes);
-
- if (!string.IsNullOrEmpty(rt))
- {
- writer.WriteElementString("rottentomatoesid", rt);
- }
-
var tmdbCollection = item.GetProviderId(MetadataProviders.TmdbCollection);
if (!string.IsNullOrEmpty(tmdbCollection))
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
index e59a8f93c0..613a30b1da 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs
@@ -365,7 +365,6 @@ namespace Emby.Server.Implementations.LiveTv
}
}
- _logger.Info("Live stream info: {0}", _jsonSerializer.SerializeToString(info));
Normalize(info, service, isVideo);
return new Tuple(info, directStreamProvider);
diff --git a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
index dd95660c78..747e0fdd31 100644
--- a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
+++ b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs
@@ -154,6 +154,7 @@ namespace Emby.Server.Implementations.LiveTv
_logger.ErrorException("Error probing live tv stream", ex);
}
+ _logger.Info("Live stream info: {0}", _jsonSerializer.SerializeToString(stream));
return new Tuple(stream, directStreamProvider);
}
diff --git a/MediaBrowser.Model/Entities/MetadataProviders.cs b/MediaBrowser.Model/Entities/MetadataProviders.cs
index 1e7bde934d..efd4339d5c 100644
--- a/MediaBrowser.Model/Entities/MetadataProviders.cs
+++ b/MediaBrowser.Model/Entities/MetadataProviders.cs
@@ -24,10 +24,6 @@ namespace MediaBrowser.Model.Entities
///
Tvcom = 5,
///
- /// The rotten tomatoes
- ///
- RottenTomatoes = 6,
- ///
/// Tmdb Collection Id
///
TmdbCollection = 7,
diff --git a/MediaBrowser.Model/System/IEnvironmentInfo.cs b/MediaBrowser.Model/System/IEnvironmentInfo.cs
index abe39fa03d..2c57df97ca 100644
--- a/MediaBrowser.Model/System/IEnvironmentInfo.cs
+++ b/MediaBrowser.Model/System/IEnvironmentInfo.cs
@@ -17,6 +17,7 @@ namespace MediaBrowser.Model.System
{
Windows,
Linux,
- OSX
+ OSX,
+ BSD
}
}
diff --git a/MediaBrowser.Providers/Music/AudioDbAlbumProvider.cs b/MediaBrowser.Providers/Music/AudioDbAlbumProvider.cs
index 3f969b609a..96eab63cda 100644
--- a/MediaBrowser.Providers/Music/AudioDbAlbumProvider.cs
+++ b/MediaBrowser.Providers/Music/AudioDbAlbumProvider.cs
@@ -142,7 +142,7 @@ namespace MediaBrowser.Providers.Music
if (fileInfo.Exists)
{
- if ((DateTime.UtcNow - _fileSystem.GetLastWriteTimeUtc(fileInfo)).TotalDays <= 7)
+ if ((DateTime.UtcNow - _fileSystem.GetLastWriteTimeUtc(fileInfo)).TotalDays <= 3)
{
return _cachedTask;
}
diff --git a/MediaBrowser.Server.Mono/Program.cs b/MediaBrowser.Server.Mono/Program.cs
index 8100dec8d7..4790378a97 100644
--- a/MediaBrowser.Server.Mono/Program.cs
+++ b/MediaBrowser.Server.Mono/Program.cs
@@ -319,5 +319,18 @@ namespace MediaBrowser.Server.Mono
{
return Syscall.getuid().ToString(CultureInfo.InvariantCulture);
}
+
+ public override Model.System.OperatingSystem OperatingSystem
+ {
+ get
+ {
+ if (IsBsd)
+ {
+ return Model.System.OperatingSystem.BSD;
+ }
+
+ return base.OperatingSystem;
+ }
+ }
}
}
diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs
index 91c23f871a..c6cdeb3542 100644
--- a/MediaBrowser.WebDashboard/Api/DashboardService.cs
+++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs
@@ -139,6 +139,23 @@ namespace MediaBrowser.WebDashboard.Api
_memoryStreamFactory = memoryStreamFactory;
}
+ ///
+ /// Gets the dashboard UI path.
+ ///
+ /// The dashboard UI path.
+ public string DashboardUIPath
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(_serverConfigurationManager.Configuration.DashboardSourcePath))
+ {
+ return _serverConfigurationManager.Configuration.DashboardSourcePath;
+ }
+
+ return Path.Combine(_serverConfigurationManager.ApplicationPaths.ApplicationResourcesPath, "dashboard-ui");
+ }
+ }
+
public object Get(GetFavIcon request)
{
return Get(new GetDashboardResource
@@ -176,7 +193,7 @@ namespace MediaBrowser.WebDashboard.Api
if (plugin != null && stream != null)
{
- return _resultFactory.GetStaticResult(Request, plugin.Version.ToString().GetMD5(), null, null, MimeTypes.GetMimeType("page.html"), () => GetPackageCreator().ModifyHtml("dummy.html", stream, null, _appHost.ApplicationVersion.ToString(), null));
+ return _resultFactory.GetStaticResult(Request, plugin.Version.ToString().GetMD5(), null, null, MimeTypes.GetMimeType("page.html"), () => GetPackageCreator(DashboardUIPath).ModifyHtml("dummy.html", stream, null, _appHost.ApplicationVersion.ToString(), null));
}
throw new ResourceNotFoundException();
@@ -274,9 +291,11 @@ namespace MediaBrowser.WebDashboard.Api
path = path.Replace("bower_components" + _appHost.ApplicationVersion, "bower_components", StringComparison.OrdinalIgnoreCase);
var contentType = MimeTypes.GetMimeType(path);
+ var basePath = DashboardUIPath;
// Bounce them to the startup wizard if it hasn't been completed yet
- if (!_serverConfigurationManager.Configuration.IsStartupWizardCompleted && path.IndexOf("wizard", StringComparison.OrdinalIgnoreCase) == -1 && GetPackageCreator().IsCoreHtml(path))
+ if (!_serverConfigurationManager.Configuration.IsStartupWizardCompleted &&
+ path.IndexOf("wizard", StringComparison.OrdinalIgnoreCase) == -1 && GetPackageCreator(basePath).IsCoreHtml(path))
{
// But don't redirect if an html import is being requested.
if (path.IndexOf("bower_components", StringComparison.OrdinalIgnoreCase) == -1)
@@ -296,7 +315,7 @@ namespace MediaBrowser.WebDashboard.Api
!contentType.StartsWith("image/", StringComparison.OrdinalIgnoreCase) &&
!contentType.StartsWith("font/", StringComparison.OrdinalIgnoreCase))
{
- var stream = await GetResourceStream(path, localizationCulture).ConfigureAwait(false);
+ var stream = await GetResourceStream(basePath, path, localizationCulture).ConfigureAwait(false);
return _resultFactory.GetResult(stream, contentType);
}
@@ -311,7 +330,7 @@ namespace MediaBrowser.WebDashboard.Api
var cacheKey = (_appHost.ApplicationVersion + (localizationCulture ?? string.Empty) + path).GetMD5();
- return await _resultFactory.GetStaticResult(Request, cacheKey, null, cacheDuration, contentType, () => GetResourceStream(path, localizationCulture)).ConfigureAwait(false);
+ return await _resultFactory.GetStaticResult(Request, cacheKey, null, cacheDuration, contentType, () => GetResourceStream(basePath, path, localizationCulture)).ConfigureAwait(false);
}
private string GetLocalizationCulture()
@@ -322,86 +341,72 @@ namespace MediaBrowser.WebDashboard.Api
///
/// Gets the resource stream.
///
- /// The path.
- /// The localization culture.
- /// Task{Stream}.
- private Task GetResourceStream(string path, string localizationCulture)
+ private Task GetResourceStream(string basePath, string virtualPath, string localizationCulture)
{
- return GetPackageCreator()
- .GetResource(path, null, localizationCulture, _appHost.ApplicationVersion.ToString());
+ return GetPackageCreator(basePath)
+ .GetResource(virtualPath, null, localizationCulture, _appHost.ApplicationVersion.ToString());
}
- private PackageCreator GetPackageCreator()
+ private PackageCreator GetPackageCreator(string basePath)
{
- return new PackageCreator(_fileSystem, _logger, _serverConfigurationManager, _memoryStreamFactory);
+ return new PackageCreator(basePath, _fileSystem, _logger, _serverConfigurationManager, _memoryStreamFactory);
}
public async Task