Merge pull request #1468 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2016-02-16 12:16:32 -05:00
commit 25a3207543
19 changed files with 66 additions and 70 deletions

View File

@ -208,7 +208,7 @@ namespace MediaBrowser.Api
foreach (var plugin in result) foreach (var plugin in result)
{ {
var pkg = packages.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i.guid) && new Guid(plugin.Id).Equals(new Guid(i.guid))); var pkg = packages.FirstOrDefault(i => !string.IsNullOrWhiteSpace(i.guid) && string.Equals(i.guid.Replace("-", string.Empty), plugin.Id.Replace("-", string.Empty), StringComparison.OrdinalIgnoreCase));
if (pkg != null) if (pkg != null)
{ {
@ -228,8 +228,9 @@ namespace MediaBrowser.Api
.ToList(); .ToList();
} }
} }
catch catch (Exception ex)
{ {
//Logger.ErrorException("Error getting plugin list", ex);
// Play it safe here // Play it safe here
if (requireAppStoreEnabled) if (requireAppStoreEnabled)
{ {

View File

@ -488,7 +488,9 @@ namespace MediaBrowser.Dlna
var profile = GetProfile(headers) ?? var profile = GetProfile(headers) ??
GetDefaultProfile(); GetDefaultProfile();
return new DescriptionXmlBuilder(profile, serverUuId, serverAddress, _appHost.FriendlyName, serverUuId.GetMD5().ToString("N")).GetXml(); var serverId = _appHost.SystemId;
return new DescriptionXmlBuilder(profile, serverUuId, serverAddress, _appHost.FriendlyName, serverId).GetXml();
} }
public ImageStream GetIcon(string filename) public ImageStream GetIcon(string filename)

View File

@ -157,9 +157,9 @@ namespace MediaBrowser.Dlna.Main
//} //}
var addressString = address.ToString(); var addressString = address.ToString();
var guid = addressString.GetMD5(); var udn = addressString.GetMD5().ToString("N");
var descriptorURI = "/dlna/" + guid.ToString("N") + "/description.xml"; var descriptorURI = "/dlna/" + udn + "/description.xml";
var uri = new Uri(_appHost.GetLocalApiUrl(addressString) + descriptorURI); var uri = new Uri(_appHost.GetLocalApiUrl(addressString) + descriptorURI);
@ -170,12 +170,12 @@ namespace MediaBrowser.Dlna.Main
"urn:schemas-upnp-org:service:ContentDirectory:1", "urn:schemas-upnp-org:service:ContentDirectory:1",
"urn:schemas-upnp-org:service:ConnectionManager:1", "urn:schemas-upnp-org:service:ConnectionManager:1",
"urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1", "urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1",
"uuid:" + guid.ToString("N") "uuid:" + udn
}; };
_ssdpHandler.RegisterNotification(guid, uri, address, services); _ssdpHandler.RegisterNotification(udn, uri, address, services);
_registeredServerIds.Add(guid.ToString("N")); _registeredServerIds.Add(udn);
} }
} }
@ -240,7 +240,7 @@ namespace MediaBrowser.Dlna.Main
{ {
try try
{ {
_ssdpHandler.UnregisterNotification(new Guid(id)); _ssdpHandler.UnregisterNotification(id);
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -122,7 +122,7 @@ namespace MediaBrowser.Dlna.Server
builder.Append("<serialNumber>" + SecurityElement.Escape(_profile.SerialNumber) + "</serialNumber>"); builder.Append("<serialNumber>" + SecurityElement.Escape(_profile.SerialNumber) + "</serialNumber>");
} }
builder.Append("<UDN>uuid:" + SecurityElement.Escape(_serverId) + "</UDN>"); builder.Append("<UDN>uuid:" + SecurityElement.Escape(_serverUdn) + "</UDN>");
builder.Append("<presentationURL>" + SecurityElement.Escape(_serverAddress) + "</presentationURL>"); builder.Append("<presentationURL>" + SecurityElement.Escape(_serverAddress) + "</presentationURL>");
if (!EnableAbsoluteUrls) if (!EnableAbsoluteUrls)

View File

@ -8,10 +8,10 @@ namespace MediaBrowser.Dlna.Server
public readonly Uri Descriptor; public readonly Uri Descriptor;
public readonly string Type; public readonly string Type;
public readonly string USN; public readonly string USN;
public readonly Guid Uuid; public readonly string Uuid;
public readonly IPAddress Address; public readonly IPAddress Address;
public UpnpDevice(Guid aUuid, string aType, Uri aDescriptor, IPAddress address) public UpnpDevice(string aUuid, string aType, Uri aDescriptor, IPAddress address)
{ {
Uuid = aUuid; Uuid = aUuid;
Type = aType; Type = aType;
@ -25,7 +25,7 @@ namespace MediaBrowser.Dlna.Server
} }
else else
{ {
USN = String.Format("uuid:{0}::{1}", Uuid.ToString("N"), Type); USN = String.Format("uuid:{0}::{1}", Uuid, Type);
} }
} }
} }

View File

@ -36,7 +36,7 @@ namespace MediaBrowser.Dlna.Ssdp
private Timer _notificationTimer; private Timer _notificationTimer;
private bool _isDisposed; private bool _isDisposed;
private readonly ConcurrentDictionary<Guid, List<UpnpDevice>> _devices = new ConcurrentDictionary<Guid, List<UpnpDevice>>(); private readonly ConcurrentDictionary<string, List<UpnpDevice>> _devices = new ConcurrentDictionary<string, List<UpnpDevice>>();
private readonly IApplicationHost _appHost; private readonly IApplicationHost _appHost;
@ -451,7 +451,7 @@ namespace MediaBrowser.Dlna.Ssdp
SendDatagram(msg, _ssdpEndp, new IPEndPoint(dev.Address, 0), true); SendDatagram(msg, _ssdpEndp, new IPEndPoint(dev.Address, 0), true);
} }
public void RegisterNotification(Guid uuid, Uri descriptionUri, IPAddress address, IEnumerable<string> services) public void RegisterNotification(string uuid, Uri descriptionUri, IPAddress address, IEnumerable<string> services)
{ {
var list = _devices.GetOrAdd(uuid, new List<UpnpDevice>()); var list = _devices.GetOrAdd(uuid, new List<UpnpDevice>());
@ -461,7 +461,7 @@ namespace MediaBrowser.Dlna.Ssdp
_logger.Debug("Registered mount {0} at {1}", uuid, descriptionUri); _logger.Debug("Registered mount {0} at {1}", uuid, descriptionUri);
} }
public void UnregisterNotification(Guid uuid) public void UnregisterNotification(string uuid)
{ {
List<UpnpDevice> dl; List<UpnpDevice> dl;
if (_devices.TryRemove(uuid, out dl)) if (_devices.TryRemove(uuid, out dl))

View File

@ -42,8 +42,6 @@ namespace MediaBrowser.Model.Configuration
public bool IncludeTrailersInSuggestions { get; set; } public bool IncludeTrailersInSuggestions { get; set; }
public bool EnableCinemaMode { get; set; }
public string[] LatestItemsExcludes { get; set; } public string[] LatestItemsExcludes { get; set; }
public string[] PlainFolderViews { get; set; } public string[] PlainFolderViews { get; set; }
@ -64,7 +62,6 @@ namespace MediaBrowser.Model.Configuration
PlainFolderViews = new string[] { }; PlainFolderViews = new string[] { };
IncludeTrailersInSuggestions = true; IncludeTrailersInSuggestions = true;
EnableCinemaMode = true;
GroupedFolders = new string[] { }; GroupedFolders = new string[] { };
} }

View File

@ -18,7 +18,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
private readonly IHttpClient _httpClient; private readonly IHttpClient _httpClient;
private readonly IUserManager _userManager; private readonly IUserManager _userManager;
private readonly ILogger _logger; private readonly ILogger _logger;
private const string MbAdminUrl = "https://www.mb3admin.com/admin/"; private const string MbAdminUrl = "http://www.mb3admin.com/admin/";
public UsageReporter(IApplicationHost applicationHost, IHttpClient httpClient, IUserManager userManager, ILogger logger) public UsageReporter(IApplicationHost applicationHost, IHttpClient httpClient, IUserManager userManager, ILogger logger)
{ {

View File

@ -61,6 +61,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
if (!hasOptions.Options.ContainsKey("Server")) if (!hasOptions.Options.ContainsKey("Server"))
{ {
hasOptions.Options["Server"] = "Mono-HTTPAPI/1.1, UPnP/1.0 DLNADOC/1.50"; hasOptions.Options["Server"] = "Mono-HTTPAPI/1.1, UPnP/1.0 DLNADOC/1.50";
//hasOptions.Options["Server"] = "Mono-HTTPAPI/1.1";
} }
// Content length has to be explicitly set on on HttpListenerResponse or it won't be happy // Content length has to be explicitly set on on HttpListenerResponse or it won't be happy

View File

@ -91,6 +91,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
// Important - don't await the log task or we won't be able to kill ffmpeg when the user stops playback // Important - don't await the log task or we won't be able to kill ffmpeg when the user stops playback
StartStreamingLog(process.StandardError.BaseStream, _logFileStream); StartStreamingLog(process.StandardError.BaseStream, _logFileStream);
onStarted();
// Wait for the file to exist before proceeeding // Wait for the file to exist before proceeeding
while (!_hasExited) while (!_hasExited)
{ {

View File

@ -41,29 +41,21 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.SatIp
void _deviceDiscovery_DeviceDiscovered(object sender, SsdpMessageEventArgs e) void _deviceDiscovery_DeviceDiscovered(object sender, SsdpMessageEventArgs e)
{ {
//string server = null; string st = null;
//if (e.Headers.TryGetValue("SERVER", out server) && server.IndexOf("HDHomeRun", StringComparison.OrdinalIgnoreCase) != -1) if (e.Headers.TryGetValue("ST", out st) && string.Equals(st, "urn:ses-com:device:SatIPServer:1", StringComparison.OrdinalIgnoreCase))
//{ {
// string location; string location;
// if (e.Headers.TryGetValue("Location", out location)) if (e.Headers.TryGetValue("Location", out location) && !string.IsNullOrWhiteSpace(location))
// { {
// //_logger.Debug("HdHomerun found at {0}", location); _logger.Debug("SAT IP found at {0}", location);
// // Just get the beginning of the url // Just get the beginning of the url
// Uri uri; AddDevice(location);
// if (Uri.TryCreate(location, UriKind.Absolute, out uri)) }
// { }
// var apiUrl = location.Replace(uri.LocalPath, String.Empty, StringComparison.OrdinalIgnoreCase)
// .TrimEnd('/');
// //_logger.Debug("HdHomerun api url: {0}", apiUrl);
// AddDevice(apiUrl);
// }
// }
//}
} }
private async void AddDevice(string url) private async void AddDevice(string location)
{ {
await _semaphore.WaitAsync().ConfigureAwait(false); await _semaphore.WaitAsync().ConfigureAwait(false);
@ -71,24 +63,24 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.SatIp
{ {
var options = GetConfiguration(); var options = GetConfiguration();
if (options.TunerHosts.Any(i => //if (options.TunerHosts.Any(i =>
string.Equals(i.Type, SatIpHost.DeviceType, StringComparison.OrdinalIgnoreCase) && // string.Equals(i.Type, SatIpHost.DeviceType, StringComparison.OrdinalIgnoreCase) &&
UriEquals(i.Url, url))) // UriEquals(i.Url, url)))
{ //{
return; // return;
} //}
// Strip off the port //// Strip off the port
url = new Uri(url).GetComponents(UriComponents.AbsoluteUri & ~UriComponents.Port, UriFormat.UriEscaped).TrimEnd('/'); //url = new Uri(url).GetComponents(UriComponents.AbsoluteUri & ~UriComponents.Port, UriFormat.UriEscaped).TrimEnd('/');
await TestUrl(url).ConfigureAwait(false); //await TestUrl(url).ConfigureAwait(false);
await _liveTvManager.SaveTunerHost(new TunerHostInfo //await _liveTvManager.SaveTunerHost(new TunerHostInfo
{ //{
Type = SatIpHost.DeviceType, // Type = SatIpHost.DeviceType,
Url = url // Url = url
}).ConfigureAwait(false); //}).ConfigureAwait(false);
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -45,8 +45,9 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\CommonIO.1.0.0.7\lib\net45\CommonIO.dll</HintPath> <HintPath>..\packages\CommonIO.1.0.0.7\lib\net45\CommonIO.dll</HintPath>
</Reference> </Reference>
<Reference Include="Emby.XmlTv"> <Reference Include="Emby.XmlTv, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Emby.XmlTv.1.0.0.46\lib\net45\Emby.XmlTv.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Emby.XmlTv.1.0.0.48\lib\net45\Emby.XmlTv.dll</HintPath>
</Reference> </Reference>
<Reference Include="Interfaces.IO"> <Reference Include="Interfaces.IO">
<HintPath>..\packages\Interfaces.IO.1.0.0.5\lib\portable-net45+sl4+wp71+win8+wpa81\Interfaces.IO.dll</HintPath> <HintPath>..\packages\Interfaces.IO.1.0.0.5\lib\portable-net45+sl4+wp71+win8+wpa81\Interfaces.IO.dll</HintPath>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="CommonIO" version="1.0.0.7" targetFramework="net45" /> <package id="CommonIO" version="1.0.0.7" targetFramework="net45" />
<package id="Emby.XmlTv" version="1.0.0.46" targetFramework="net45" /> <package id="Emby.XmlTv" version="1.0.0.48" targetFramework="net45" />
<package id="Interfaces.IO" version="1.0.0.5" targetFramework="net45" /> <package id="Interfaces.IO" version="1.0.0.5" targetFramework="net45" />
<package id="MediaBrowser.Naming" version="1.0.0.47" targetFramework="net45" /> <package id="MediaBrowser.Naming" version="1.0.0.47" targetFramework="net45" />
<package id="Mono.Nat" version="1.2.24.0" targetFramework="net45" /> <package id="Mono.Nat" version="1.2.24.0" targetFramework="net45" />

View File

@ -33,7 +33,7 @@ namespace MediaBrowser.Server.Startup.Common.FFMpeg
case OperatingSystem.Linux: case OperatingSystem.Linux:
info.ArchiveType = "7z"; info.ArchiveType = "7z";
info.Version = "20150917"; info.Version = "20160215";
break; break;
case OperatingSystem.Osx: case OperatingSystem.Osx:
@ -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/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-2.8.0-64bit-static.7z" "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-git-20160215-64bit-static.7z"
}; };
case Architecture.X86: case Architecture.X86:
return new[] return new[]
{ {
"https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-2.8.0-32bit-static.7z" "https://github.com/MediaBrowser/Emby.Resources/raw/master/ffmpeg/linux/ffmpeg-git-20160215-32bit-static.7z"
}; };
case Architecture.Arm: case Architecture.Arm:
return new[] return new[]

View File

@ -113,6 +113,9 @@
<Content Include="dashboard-ui\components\filterdialog\filterdialog.template.html"> <Content Include="dashboard-ui\components\filterdialog\filterdialog.template.html">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="dashboard-ui\components\filterdialog\style.css">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\components\guestinviter\guestinviter.js"> <Content Include="dashboard-ui\components\guestinviter\guestinviter.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
@ -511,9 +514,6 @@
<Content Include="dashboard-ui\scripts\photos.js"> <Content Include="dashboard-ui\scripts\photos.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="dashboard-ui\scripts\queryfilters.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="dashboard-ui\scripts\registrationservices.js"> <Content Include="dashboard-ui\scripts\registrationservices.js">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata> <metadata>
<id>MediaBrowser.Common.Internal</id> <id>MediaBrowser.Common.Internal</id>
<version>3.0.641</version> <version>3.0.642</version>
<title>MediaBrowser.Common.Internal</title> <title>MediaBrowser.Common.Internal</title>
<authors>Luke</authors> <authors>Luke</authors>
<owners>ebr,Luke,scottisafool</owners> <owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains common components shared by Emby Theater and Emby Server. Not intended for plugin developer consumption.</description> <description>Contains common components shared by Emby Theater and Emby Server. Not intended for plugin developer consumption.</description>
<copyright>Copyright © Emby 2013</copyright> <copyright>Copyright © Emby 2013</copyright>
<dependencies> <dependencies>
<dependency id="MediaBrowser.Common" version="3.0.641" /> <dependency id="MediaBrowser.Common" version="3.0.642" />
<dependency id="NLog" version="4.2.3" /> <dependency id="NLog" version="4.2.3" />
<dependency id="SimpleInjector" version="3.1.2" /> <dependency id="SimpleInjector" version="3.1.2" />
</dependencies> </dependencies>

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata> <metadata>
<id>MediaBrowser.Common</id> <id>MediaBrowser.Common</id>
<version>3.0.641</version> <version>3.0.642</version>
<title>MediaBrowser.Common</title> <title>MediaBrowser.Common</title>
<authors>Emby Team</authors> <authors>Emby Team</authors>
<owners>ebr,Luke,scottisafool</owners> <owners>ebr,Luke,scottisafool</owners>

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata> <metadata>
<id>MediaBrowser.Model.Signed</id> <id>MediaBrowser.Model.Signed</id>
<version>3.0.641</version> <version>3.0.642</version>
<title>MediaBrowser.Model - Signed Edition</title> <title>MediaBrowser.Model - Signed Edition</title>
<authors>Emby Team</authors> <authors>Emby Team</authors>
<owners>ebr,Luke,scottisafool</owners> <owners>ebr,Luke,scottisafool</owners>

View File

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata> <metadata>
<id>MediaBrowser.Server.Core</id> <id>MediaBrowser.Server.Core</id>
<version>3.0.641</version> <version>3.0.642</version>
<title>Media Browser.Server.Core</title> <title>Media Browser.Server.Core</title>
<authors>Emby Team</authors> <authors>Emby Team</authors>
<owners>ebr,Luke,scottisafool</owners> <owners>ebr,Luke,scottisafool</owners>
@ -12,7 +12,7 @@
<description>Contains core components required to build plugins for Emby Server.</description> <description>Contains core components required to build plugins for Emby Server.</description>
<copyright>Copyright © Emby 2013</copyright> <copyright>Copyright © Emby 2013</copyright>
<dependencies> <dependencies>
<dependency id="MediaBrowser.Common" version="3.0.641" /> <dependency id="MediaBrowser.Common" version="3.0.642" />
<dependency id="Interfaces.IO" version="1.0.0.5" /> <dependency id="Interfaces.IO" version="1.0.0.5" />
</dependencies> </dependencies>
</metadata> </metadata>