Skip to content

Commit

Permalink
Merge pull request #3089 from MediaBrowser/beta
Browse files Browse the repository at this point in the history
Beta
  • Loading branch information
LukePulverenti authored Dec 20, 2017
2 parents e5eac73 + 4c798a3 commit f13ec1e
Show file tree
Hide file tree
Showing 167 changed files with 711 additions and 2,348 deletions.
4 changes: 1 addition & 3 deletions BDInfo/BDROM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ public class BDROM
public Dictionary<string, TSInterleavedFile> InterleavedFiles =
new Dictionary<string, TSInterleavedFile>();

private static List<string> ExcludeDirs = new List<string> { "ANY!", "AACS", "BDSVM", "ANYVM", "SLYVM" };

public delegate bool OnStreamClipFileScanError(
TSStreamClipFile streamClipFile, Exception ex);

Expand Down Expand Up @@ -421,7 +419,7 @@ private string GetVolumeLabel(FileSystemMetadata dir)
return dir.Name;
}

public static int CompareStreamFiles(
public int CompareStreamFiles(
TSStreamFile x,
TSStreamFile y)
{
Expand Down
10 changes: 5 additions & 5 deletions BDInfo/TSPlaylistFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ public bool IsValid
}
}

public static int CompareVideoStreams(
public int CompareVideoStreams(
TSVideoStream x,
TSVideoStream y)
{
Expand Down Expand Up @@ -995,7 +995,7 @@ public static int CompareVideoStreams(
}
}

public static int CompareAudioStreams(
public int CompareAudioStreams(
TSAudioStream x,
TSAudioStream y)
{
Expand Down Expand Up @@ -1067,7 +1067,7 @@ public static int CompareAudioStreams(
}
}

public static int CompareTextStreams(
public int CompareTextStreams(
TSTextStream x,
TSTextStream y)
{
Expand Down Expand Up @@ -1123,7 +1123,7 @@ public static int CompareTextStreams(
}
}

private static int CompareGraphicsStreams(
private int CompareGraphicsStreams(
TSGraphicsStream x,
TSGraphicsStream y)
{
Expand Down Expand Up @@ -1189,7 +1189,7 @@ private static int CompareGraphicsStreams(
}
}

private static int GetStreamTypeSortIndex(TSStreamType streamType)
private int GetStreamTypeSortIndex(TSStreamType streamType)
{
switch (streamType)
{
Expand Down
2 changes: 1 addition & 1 deletion BDInfo/TSStreamFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ public void Scan(List<TSPlaylistFile> playlists, bool isFullScan)
k += streamInfoLength;
}
}
catch (Exception ex)
catch
{
// TODO
//Console.WriteLine(ex.Message);
Expand Down
2 changes: 0 additions & 2 deletions DvdLib/Ifo/ProgramChain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ public enum ProgramPlaybackMode

public class ProgramChain
{
private ushort _unknown1;

private byte _programCount;
public readonly List<Program> Programs;

Expand Down
127 changes: 0 additions & 127 deletions Emby.Dlna/ContentDirectory/ContentDirectoryBrowser.cs

This file was deleted.

2 changes: 0 additions & 2 deletions Emby.Dlna/Emby.Dlna.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
<Compile Include="ConnectionManager\ControlHandler.cs" />
<Compile Include="ConnectionManager\ServiceActionListBuilder.cs" />
<Compile Include="ContentDirectory\ContentDirectory.cs" />
<Compile Include="ContentDirectory\ContentDirectoryBrowser.cs" />
<Compile Include="ContentDirectory\ContentDirectoryXmlBuilder.cs" />
<Compile Include="ContentDirectory\ControlHandler.cs" />
<Compile Include="ContentDirectory\ServiceActionListBuilder.cs" />
Expand Down Expand Up @@ -108,7 +107,6 @@
<Compile Include="Profiles\XboxOneProfile.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Server\DescriptionXmlBuilder.cs" />
<Compile Include="Server\UpnpDevice.cs" />
<Compile Include="Service\BaseControlHandler.cs" />
<Compile Include="Service\BaseService.cs" />
<Compile Include="Service\ControlErrorHandler.cs" />
Expand Down
2 changes: 1 addition & 1 deletion Emby.Dlna/Main/DlnaEntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ private void LogMessage(string msg)

private void StartPublishing(ISsdpCommunicationsServer communicationsServer)
{
SsdpDevicePublisherBase.LogFunction = LogMessage;
_Publisher = new SsdpDevicePublisher(communicationsServer, _timerFactory, _environmentInfo.OperatingSystemName, _environmentInfo.OperatingSystemVersion);
_Publisher.LogFunction = LogMessage;
}

private void StartDeviceDiscovery(ISsdpCommunicationsServer communicationsServer)
Expand Down
2 changes: 1 addition & 1 deletion Emby.Dlna/PlayTo/Device.cs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ private async void TimerCallback(object sender)
RestartTimerInactive();
}
}
catch (HttpException ex)
catch (HttpException)
{
if (_disposed)
return;
Expand Down
2 changes: 1 addition & 1 deletion Emby.Dlna/PlayTo/TransportCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private static Argument ArgumentFromXml(XElement container)
};
}

public static StateVariable FromXml(XElement container)
private static StateVariable FromXml(XElement container)
{
var allowedValues = new List<string>();
var element = container.Descendants(uPnpNamespaces.svc + "allowedValueList")
Expand Down
38 changes: 0 additions & 38 deletions Emby.Dlna/Server/UpnpDevice.cs

This file was deleted.

39 changes: 1 addition & 38 deletions Emby.Drawing.Skia/PlayedIndicatorDrawer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net;
using MediaBrowser.Model.Drawing;
using System;
using System.IO;
using System.Threading.Tasks;

using MediaBrowser.Controller.IO;
using MediaBrowser.Model.IO;
using System.Reflection;
using MediaBrowser.Common.Progress;

namespace Emby.Drawing.Skia
{
Expand All @@ -28,7 +21,7 @@ public PlayedIndicatorDrawer(IApplicationPaths appPaths, IHttpClient iHttpClient
_fileSystem = fileSystem;
}

public async Task DrawPlayedIndicator(SKCanvas canvas, ImageSize imageSize)
public void DrawPlayedIndicator(SKCanvas canvas, ImageSize imageSize)
{
var x = imageSize.Width - OffsetFromTopRightCorner;

Expand Down Expand Up @@ -61,35 +54,5 @@ public async Task DrawPlayedIndicator(SKCanvas canvas, ImageSize imageSize)
canvas.DrawText(text, (float)x-20, OffsetFromTopRightCorner + 12, paint);
}
}

internal static async Task<string> DownloadFont(string name, string url, IApplicationPaths paths, IHttpClient httpClient, IFileSystem fileSystem)
{
var filePath = Path.Combine(paths.ProgramDataPath, "fonts", name);

if (fileSystem.FileExists(filePath))
{
return filePath;
}

var tempPath = await httpClient.GetTempFile(new HttpRequestOptions
{
Url = url,
Progress = new SimpleProgress<double>()

}).ConfigureAwait(false);

fileSystem.CreateDirectory(fileSystem.GetDirectoryName(filePath));

try
{
fileSystem.CopyFile(tempPath, filePath, false);
}
catch (IOException)
{

}

return tempPath;
}
}
}
3 changes: 1 addition & 2 deletions Emby.Drawing.Skia/SkiaEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,7 @@ private void DrawIndicator(SKCanvas canvas, int imageWidth, int imageHeight, Ima

if (options.AddPlayedIndicator)
{
var task = new PlayedIndicatorDrawer(_appPaths, _httpClientFactory(), _fileSystem).DrawPlayedIndicator(canvas, currentImageSize);
Task.WaitAll(task);
new PlayedIndicatorDrawer(_appPaths, _httpClientFactory(), _fileSystem).DrawPlayedIndicator(canvas, currentImageSize);
}
else if (options.UnplayedCount.HasValue)
{
Expand Down
17 changes: 1 addition & 16 deletions Emby.Drawing/ImageProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public ImageFormat[] GetSupportedImageOutputFormats()
return _imageEncoder.SupportedOutputFormats;
}

private static readonly string[] TransparentImageTypes = new string[] { ".png", ".webp" };
private readonly string[] TransparentImageTypes = new string[] { ".png", ".webp" };
public bool SupportsTransparency(string path)
{
return TransparentImageTypes.Contains(Path.GetExtension(path) ?? string.Empty);
Expand Down Expand Up @@ -358,21 +358,6 @@ private void CopyFile(string src, string destination)
}
}

//private static int[][] OPERATIONS = new int[][] {
// TopLeft
//new int[] { 0, NONE},
// TopRight
//new int[] { 0, HORIZONTAL},
//new int[] {180, NONE},
// LeftTop
//new int[] { 0, VERTICAL},
//new int[] { 90, HORIZONTAL},
// RightTop
//new int[] { 90, NONE},
//new int[] {-90, HORIZONTAL},
//new int[] {-90, NONE},
//};

private string GetMimeType(ImageFormat format, string path)
{
if (format == ImageFormat.Bmp)
Expand Down
Loading

0 comments on commit f13ec1e

Please sign in to comment.