Skip to content

Commit

Permalink
fix m2ts files not showing up under dlna
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Jun 8, 2018
1 parent 1c9f6d7 commit ca54000
Show file tree
Hide file tree
Showing 56 changed files with 110 additions and 222 deletions.
4 changes: 2 additions & 2 deletions BDInfo/BDInfo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="MediaBrowser.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Model, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
2 changes: 1 addition & 1 deletion BDInfo/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.Common" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.47-beta" targetFramework="net47" />
</packages>
4 changes: 2 additions & 2 deletions DvdLib/DvdLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
<Compile Include="Ifo\VideoAttributes.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Reference Include="MediaBrowser.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Model, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
2 changes: 1 addition & 1 deletion DvdLib/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.Common" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.47-beta" targetFramework="net47" />
</packages>
6 changes: 6 additions & 0 deletions Emby.Dlna/Didl/DidlBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,12 @@ private void AddVideoResource(DlnaOptions options, XmlWriter writer, BaseItem vi
});
}

if (string.Equals(Path.GetExtension(video.Path), ".m2ts", StringComparison.OrdinalIgnoreCase))
{
var a = 1;
var b = a;
}

var targetWidth = streamInfo.TargetWidth;
var targetHeight = streamInfo.TargetHeight;

Expand Down
6 changes: 3 additions & 3 deletions Emby.Dlna/Emby.Dlna.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@
</ItemGroup>
<ItemGroup>
<Reference Include="MediaBrowser.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Controller, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Model, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
4 changes: 2 additions & 2 deletions Emby.Dlna/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.Common" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.47-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.47-beta" targetFramework="net47" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.0" targetFramework="net47" />
</packages>
6 changes: 3 additions & 3 deletions Emby.Drawing.ImageMagick/Emby.Drawing.ImageMagick.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
<HintPath>..\packages\ImageMagickSharp.1.0.0.19\lib\net45\ImageMagickSharp.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Controller, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Model, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
4 changes: 2 additions & 2 deletions Emby.Drawing.ImageMagick/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ImageMagickSharp" version="1.0.0.19" targetFramework="net452" />
<package id="MediaBrowser.Common" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.47-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.47-beta" targetFramework="net47" />
</packages>
6 changes: 3 additions & 3 deletions Emby.Drawing.Skia/Emby.Drawing.Skia.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
<Compile Include="StripCollageBuilder.cs" />
<Compile Include="UnplayedCountIndicator.cs" />
<Reference Include="MediaBrowser.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Controller, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Model, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
4 changes: 2 additions & 2 deletions Emby.Drawing.Skia/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.Common" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.47-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.47-beta" targetFramework="net47" />
<package id="SkiaSharp" version="1.58.1" targetFramework="portable45-net45+win8" requireReinstallation="true" />
</packages>
6 changes: 3 additions & 3 deletions Emby.Drawing/Emby.Drawing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
</ItemGroup>
<ItemGroup>
<Reference Include="MediaBrowser.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Controller, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Model, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
4 changes: 2 additions & 2 deletions Emby.Drawing/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.Common" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.47-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.47-beta" targetFramework="net47" />
</packages>
6 changes: 3 additions & 3 deletions Emby.Photos/Emby.Photos.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="MediaBrowser.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Controller, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Model, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
</Reference>
<Reference Include="TagLib.Portable">
<HintPath>..\ThirdParty\taglib\TagLib.Portable.dll</HintPath>
Expand Down
4 changes: 2 additions & 2 deletions Emby.Photos/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="MediaBrowser.Common" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.47-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.47-beta" targetFramework="net47" />
</packages>
49 changes: 10 additions & 39 deletions Emby.Server.Implementations/ApplicationHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -978,7 +978,16 @@ protected void RegisterResources()
CertificateInfo = GetCertificateInfo(true);
Certificate = GetCertificate(CertificateInfo);

HttpServer = CreateServer(this, LogManager, ServerConfigurationManager, NetworkManager, streamHelper, "Emby", "web/index.html", TextEncoding, SocketFactory, CryptographyProvider, JsonSerializer, XmlSerializer, EnvironmentInfo, Certificate, FileSystemManager, SupportsDualModeSockets);
HttpServer = new HttpListenerHost(this,
LogManager.GetLogger("HttpServer"),
ServerConfigurationManager,
"web/index.html",
NetworkManager,
TextEncoding,
JsonSerializer,
XmlSerializer,
GetParseFn);

HttpServer.GlobalResponse = LocalizationManager.GetLocalizedString("StartupEmbyServerIsLoading");
RegisterSingleInstance(HttpServer);

Expand Down Expand Up @@ -1082,44 +1091,6 @@ protected void RegisterResources()
((UserManager)UserManager).Initialize();
}

public static IHttpServer CreateServer(IServerApplicationHost applicationHost,
ILogManager logManager,
IServerConfigurationManager config,
INetworkManager networkmanager,
IStreamHelper streamProvider,
string serverName,
string defaultRedirectpath,
ITextEncoding textEncoding,
ISocketFactory socketFactory,
ICryptoProvider cryptoProvider,
IJsonSerializer json,
IXmlSerializer xml,
IEnvironmentInfo environment,
X509Certificate certificate,
IFileSystem fileSystem,
bool enableDualModeSockets)
{
var logger = logManager.GetLogger("HttpServer");

return new HttpListenerHost(applicationHost,
logger,
config,
serverName,
defaultRedirectpath,
networkmanager,
streamProvider,
textEncoding,
socketFactory,
cryptoProvider,
json,
xml,
environment,
certificate,
GetParseFn,
enableDualModeSockets,
fileSystem);
}

private static Func<string, object> GetParseFn(Type propertyType)
{
return s => JsvReader.GetParseFn(propertyType)(s);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -614,13 +614,13 @@
<HintPath>..\packages\Emby.XmlTv.1.0.14\lib\portable-net45+netstandard2.0+win8\Emby.XmlTv.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Controller, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
</Reference>
<Reference Include="MediaBrowser.Model, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Common.3.3.46-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.47-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Win32.Primitives, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Win32.Primitives.4.3.0\lib\net46\Microsoft.Win32.Primitives.dll</HintPath>
Expand Down
19 changes: 2 additions & 17 deletions Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,14 @@ public class HttpListenerHost : IHttpServer, IDisposable

private readonly IServerConfigurationManager _config;
private readonly INetworkManager _networkManager;
private readonly IStreamHelper _streamHelper;

private readonly IServerApplicationHost _appHost;

private readonly ITextEncoding _textEncoding;
private readonly ISocketFactory _socketFactory;
private readonly ICryptoProvider _cryptoProvider;

private readonly IFileSystem _fileSystem;
private readonly IJsonSerializer _jsonSerializer;
private readonly IXmlSerializer _xmlSerializer;
private readonly X509Certificate _certificate;
private readonly IEnvironmentInfo _environment;
private readonly Func<Type, Func<string, object>> _funcParseFn;
private readonly bool _enableDualModeSockets;

public Action<IRequest, IResponse, object>[] ResponseFilters { get; set; }

Expand All @@ -71,28 +64,20 @@ public class HttpListenerHost : IHttpServer, IDisposable
public HttpListenerHost(IServerApplicationHost applicationHost,
ILogger logger,
IServerConfigurationManager config,
string serviceName,
string defaultRedirectPath, INetworkManager networkManager, IStreamHelper streamHelper, ITextEncoding textEncoding, ISocketFactory socketFactory, ICryptoProvider cryptoProvider, IJsonSerializer jsonSerializer, IXmlSerializer xmlSerializer, IEnvironmentInfo environment, X509Certificate certificate, Func<Type, Func<string, object>> funcParseFn, bool enableDualModeSockets, IFileSystem fileSystem)
string defaultRedirectPath, INetworkManager networkManager, ITextEncoding textEncoding, IJsonSerializer jsonSerializer, IXmlSerializer xmlSerializer, Func<Type, Func<string, object>> funcParseFn)
{
Instance = this;

_appHost = applicationHost;
DefaultRedirectPath = defaultRedirectPath;
_networkManager = networkManager;
_streamHelper = streamHelper;
_textEncoding = textEncoding;
_socketFactory = socketFactory;
_cryptoProvider = cryptoProvider;
_jsonSerializer = jsonSerializer;
_xmlSerializer = xmlSerializer;
_environment = environment;
_certificate = certificate;
_funcParseFn = funcParseFn;
_enableDualModeSockets = enableDualModeSockets;
_fileSystem = fileSystem;
_config = config;

_logger = logger;
_funcParseFn = funcParseFn;

ResponseFilters = new Action<IRequest, IResponse, object>[] { };
}
Expand Down
4 changes: 2 additions & 2 deletions Emby.Server.Implementations/packages.config
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Emby.XmlTv" version="1.0.14" targetFramework="net46" />
<package id="MediaBrowser.Common" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.47-beta" targetFramework="net47" />
<package id="MediaBrowser.Naming" version="1.1.5-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.46-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.47-beta" targetFramework="net47" />
<package id="Microsoft.NETCore.Platforms" version="2.1.0" targetFramework="net47" />
<package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net47" />
<package id="NETStandard.Library" version="2.0.3" targetFramework="net47" />
Expand Down
Loading

0 comments on commit ca54000

Please sign in to comment.