Skip to content

Commit

Permalink
rework width/height properties
Browse files Browse the repository at this point in the history
  • Loading branch information
LukePulverenti committed Jun 15, 2018
1 parent 78d72fc commit 08eba08
Show file tree
Hide file tree
Showing 88 changed files with 380 additions and 326 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.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.50-beta" targetFramework="net47" />
</packages>
8 changes: 1 addition & 7 deletions Emby.Dlna/Didl/DidlBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,19 +205,13 @@ private void AddVideoResource(DlnaOptions options, XmlWriter writer, BaseItem vi
streamInfo = new StreamBuilder(_mediaEncoder, GetStreamBuilderLogger(options)).BuildVideoItem(new VideoOptions
{
ItemId = video.Id,
MediaSources = sources.ToArray(sources.Count),
MediaSources = sources.ToArray(),
Profile = _profile,
DeviceId = deviceId,
MaxBitrate = _profile.MaxStreamingBitrate
});
}

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
2 changes: 1 addition & 1 deletion Emby.Dlna/DlnaManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public DeviceProfile GetProfile(IDictionary<string, string> headers)
}
else
{
var headerString = string.Join(", ", headers.Select(i => string.Format("{0}={1}", i.Key, i.Value)).ToArray(headers.Count));
var headerString = string.Join(", ", headers.Select(i => string.Format("{0}={1}", i.Key, i.Value)).ToArray());
_logger.Debug("No matching device profile found. {0}", headerString);
}

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.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
Expand Down
2 changes: 1 addition & 1 deletion Emby.Dlna/PlayTo/PlayToController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ private PlaylistItem GetPlaylistItem(BaseItem item, List<MediaSourceInfo> mediaS
StreamInfo = new StreamBuilder(_mediaEncoder, GetStreamBuilderLogger()).BuildVideoItem(new VideoOptions
{
ItemId = item.Id,
MediaSources = mediaSources.ToArray(mediaSources.Count),
MediaSources = mediaSources.ToArray(),
Profile = profile,
DeviceId = deviceId,
MaxBitrate = profile.MaxStreamingBitrate,
Expand Down
2 changes: 1 addition & 1 deletion Emby.Dlna/Server/DescriptionXmlBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ private string GetFriendlyName()
}
}

var characters = characterList.ToArray(characterList.Count);
var characters = characterList.ToArray();

var serverName = new string(characters);

Expand Down
2 changes: 1 addition & 1 deletion Emby.Dlna/Service/BaseControlHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private void LogResponse(ControlResponse response)
}

var originalHeaders = response.Headers;
var headers = string.Join(", ", originalHeaders.Select(i => string.Format("{0}={1}", i.Key, i.Value)).ToArray(originalHeaders.Count));
var headers = string.Join(", ", originalHeaders.Select(i => string.Format("{0}={1}", i.Key, i.Value)).ToArray());
//builder.Append(response.Xml);

Logger.Debug("Control response. Headers: {0}", headers);
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.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.50-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.50-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.50-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.50-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Common.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Controller.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Server.Core.3.3.50-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.49-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
<HintPath>..\packages\MediaBrowser.Common.3.3.50-beta\lib\netstandard2.0\MediaBrowser.Model.dll</HintPath>
</Reference>
<Reference Include="TagLib.Portable">
<HintPath>..\ThirdParty\taglib\TagLib.Portable.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion Emby.Photos/PhotoProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public Task<ItemUpdateType> FetchAsync(Photo item, MetadataRefreshOptions option
}
}

if (!item.Width.HasValue || !item.Height.HasValue)
if (item.Width <= 0 || item.Height <= 0)
{
var img = item.GetImageInfo(ImageType.Primary, 0);

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.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.49-beta" targetFramework="net47" />
<package id="MediaBrowser.Common" version="3.3.50-beta" targetFramework="net47" />
<package id="MediaBrowser.Server.Core" version="3.3.50-beta" targetFramework="net47" />
</packages>
25 changes: 6 additions & 19 deletions Emby.Server.Implementations/Browser/BrowserLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,29 @@ public static class BrowserLauncher
/// </summary>
/// <param name="page">The page.</param>
/// <param name="appHost">The app host.</param>
public static void OpenDashboardPage(string page, IServerApplicationHost appHost)
private static void OpenDashboardPage(string page, IServerApplicationHost appHost)
{
var url = appHost.GetLocalApiUrl("localhost") + "/web/" + page;

OpenUrl(appHost, url);
}

/// <summary>
/// Opens the community.
/// </summary>
public static void OpenCommunity(IServerApplicationHost appHost)
{
OpenUrl(appHost, "https://emby.media/community");
}

public static void OpenEmbyPremiere(IServerApplicationHost appHost)
{
OpenDashboardPage("supporterkey.html", appHost);
}

/// <summary>
/// Opens the web client.
/// </summary>
/// <param name="appHost">The app host.</param>
public static void OpenWebClient(IServerApplicationHost appHost)
public static void OpenWizard(IServerApplicationHost appHost)
{
OpenDashboardPage("index.html", appHost);
OpenDashboardPage("index.html?start=wizard", appHost);
}

/// <summary>
/// Opens the dashboard.
/// Opens the web client.
/// </summary>
/// <param name="appHost">The app host.</param>
public static void OpenDashboard(IServerApplicationHost appHost)
public static void OpenWebApp(IServerApplicationHost appHost)
{
OpenDashboardPage("dashboard.html", appHost);
OpenDashboardPage("index.html", appHost);
}

/// <summary>
Expand Down
Loading

0 comments on commit 08eba08

Please sign in to comment.