Merge pull request #2876 from MediaBrowser/dev

Dev
This commit is contained in:
Luke 2017-09-10 16:42:23 -04:00 committed by GitHub
commit a0298ccc6d
11 changed files with 51 additions and 37 deletions

View File

@ -724,6 +724,12 @@ namespace Emby.Drawing
.TrimStart('.') .TrimStart('.')
.Replace("jpeg", "jpg", StringComparison.OrdinalIgnoreCase); .Replace("jpeg", "jpg", StringComparison.OrdinalIgnoreCase);
// These are just jpg files renamed as tbn
if (string.Equals(inputFormat, "tbn", StringComparison.OrdinalIgnoreCase))
{
return new Tuple<string, DateTime>(originalImagePath, dateModified);
}
if (!_imageEncoder.SupportedInputFormats.Contains(inputFormat, StringComparer.OrdinalIgnoreCase)) if (!_imageEncoder.SupportedInputFormats.Contains(inputFormat, StringComparer.OrdinalIgnoreCase))
{ {
try try

View File

@ -654,16 +654,15 @@
<Project>{1d74413b-e7cf-455b-b021-f52bdf881542}</Project> <Project>{1d74413b-e7cf-455b-b021-f52bdf881542}</Project>
<Name>SocketHttpListener</Name> <Name>SocketHttpListener</Name>
</ProjectReference> </ProjectReference>
<Reference Include="Emby.Naming">
<HintPath>..\ThirdParty\emby\Emby.Naming.dll</HintPath>
</Reference>
<Reference Include="Emby.Server.MediaEncoding"> <Reference Include="Emby.Server.MediaEncoding">
<HintPath>..\ThirdParty\emby\Emby.Server.MediaEncoding.dll</HintPath> <HintPath>..\ThirdParty\emby\Emby.Server.MediaEncoding.dll</HintPath>
</Reference> </Reference>
<Reference Include="Emby.XmlTv, Version=1.0.6387.29335, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Emby.XmlTv, Version=1.0.6387.29335, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Emby.XmlTv.1.0.10\lib\portable-net45+netstandard2.0+win8\Emby.XmlTv.dll</HintPath> <HintPath>..\packages\Emby.XmlTv.1.0.10\lib\portable-net45+netstandard2.0+win8\Emby.XmlTv.dll</HintPath>
</Reference> </Reference>
<Reference Include="MediaBrowser.Naming, Version=1.0.6447.2217, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\MediaBrowser.Naming.1.0.7\lib\portable-net45+netstandard2.0+win8\MediaBrowser.Naming.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="ServiceStack.Text, Version=4.5.8.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="ServiceStack.Text, Version=4.5.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll</HintPath> <HintPath>..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll</HintPath>
<Private>True</Private> <Private>True</Private>

View File

@ -14,10 +14,10 @@ using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Querying; using MediaBrowser.Model.Querying;
using MediaBrowser.Naming.Audio; using Emby.Naming.Audio;
using MediaBrowser.Naming.Common; using Emby.Naming.Common;
using MediaBrowser.Naming.TV; using Emby.Naming.TV;
using MediaBrowser.Naming.Video; using Emby.Naming.Video;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
@ -38,7 +38,7 @@ using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Library; using MediaBrowser.Model.Library;
using MediaBrowser.Model.Net; using MediaBrowser.Model.Net;
using SortOrder = MediaBrowser.Model.Entities.SortOrder; using SortOrder = MediaBrowser.Model.Entities.SortOrder;
using VideoResolver = MediaBrowser.Naming.Video.VideoResolver; using VideoResolver = Emby.Naming.Video.VideoResolver;
using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Configuration;
using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Dto;
@ -2346,7 +2346,7 @@ namespace Emby.Server.Implementations.Library
public bool IsVideoFile(string path, LibraryOptions libraryOptions) public bool IsVideoFile(string path, LibraryOptions libraryOptions)
{ {
var resolver = new VideoResolver(GetNamingOptions(), new NullLogger()); var resolver = new VideoResolver(GetNamingOptions());
return resolver.IsVideoFile(path); return resolver.IsVideoFile(path);
} }
@ -2373,8 +2373,7 @@ namespace Emby.Server.Implementations.Library
public bool FillMissingEpisodeNumbersFromPath(Episode episode) public bool FillMissingEpisodeNumbersFromPath(Episode episode)
{ {
var resolver = new EpisodeResolver(GetNamingOptions(), var resolver = new EpisodeResolver(GetNamingOptions());
new NullLogger());
var isFolder = episode.VideoType == VideoType.BluRay || episode.VideoType == VideoType.Dvd; var isFolder = episode.VideoType == VideoType.BluRay || episode.VideoType == VideoType.Dvd;
@ -2382,11 +2381,11 @@ namespace Emby.Server.Implementations.Library
var episodeInfo = locationType == LocationType.FileSystem || locationType == LocationType.Offline ? var episodeInfo = locationType == LocationType.FileSystem || locationType == LocationType.Offline ?
resolver.Resolve(episode.Path, isFolder) : resolver.Resolve(episode.Path, isFolder) :
new MediaBrowser.Naming.TV.EpisodeInfo(); new Emby.Naming.TV.EpisodeInfo();
if (episodeInfo == null) if (episodeInfo == null)
{ {
episodeInfo = new MediaBrowser.Naming.TV.EpisodeInfo(); episodeInfo = new Emby.Naming.TV.EpisodeInfo();
} }
var changed = false; var changed = false;
@ -2557,7 +2556,7 @@ namespace Emby.Server.Implementations.Library
public ItemLookupInfo ParseName(string name) public ItemLookupInfo ParseName(string name)
{ {
var resolver = new VideoResolver(GetNamingOptions(), new NullLogger()); var resolver = new VideoResolver(GetNamingOptions());
var result = resolver.CleanDateTime(name); var result = resolver.CleanDateTime(name);
var cleanName = resolver.CleanString(result.Name); var cleanName = resolver.CleanString(result.Name);
@ -2578,7 +2577,7 @@ namespace Emby.Server.Implementations.Library
.SelectMany(i => _fileSystem.GetFiles(i.FullName, _videoFileExtensions, false, false)) .SelectMany(i => _fileSystem.GetFiles(i.FullName, _videoFileExtensions, false, false))
.ToList(); .ToList();
var videoListResolver = new VideoListResolver(namingOptions, new NullLogger()); var videoListResolver = new VideoListResolver(namingOptions);
var videos = videoListResolver.Resolve(fileSystemChildren); var videos = videoListResolver.Resolve(fileSystemChildren);
@ -2626,7 +2625,7 @@ namespace Emby.Server.Implementations.Library
.SelectMany(i => _fileSystem.GetFiles(i.FullName, _videoFileExtensions, false, false)) .SelectMany(i => _fileSystem.GetFiles(i.FullName, _videoFileExtensions, false, false))
.ToList(); .ToList();
var videoListResolver = new VideoListResolver(namingOptions, new NullLogger()); var videoListResolver = new VideoListResolver(namingOptions);
var videos = videoListResolver.Resolve(fileSystemChildren); var videos = videoListResolver.Resolve(fileSystemChildren);
@ -2752,7 +2751,7 @@ namespace Emby.Server.Implementations.Library
private void SetExtraTypeFromFilename(Video item) private void SetExtraTypeFromFilename(Video item)
{ {
var resolver = new ExtraResolver(GetNamingOptions(), new NullLogger(), new RegexProvider()); var resolver = new ExtraResolver(GetNamingOptions(), new RegexProvider());
var result = resolver.GetExtraInfo(item.Path); var result = resolver.GetExtraInfo(item.Path);

View File

@ -4,7 +4,7 @@ using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Resolvers; using MediaBrowser.Controller.Resolvers;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using MediaBrowser.Naming.Audio; using Emby.Naming.Audio;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
@ -165,7 +165,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
{ {
var namingOptions = ((LibraryManager)_libraryManager).GetNamingOptions(); var namingOptions = ((LibraryManager)_libraryManager).GetNamingOptions();
var parser = new AlbumParser(namingOptions, new NullLogger()); var parser = new AlbumParser(namingOptions);
var result = parser.ParseMultiPart(path); var result = parser.ParseMultiPart(path);
return result.IsMultiPart; return result.IsMultiPart;

View File

@ -1,7 +1,7 @@
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Naming.Video; using Emby.Naming.Video;
using System; using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
@ -50,7 +50,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions(); var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions();
// If the path is a file check for a matching extensions // If the path is a file check for a matching extensions
var parser = new MediaBrowser.Naming.Video.VideoResolver(namingOptions, new NullLogger()); var parser = new Emby.Naming.Video.VideoResolver(namingOptions);
if (args.IsDirectory) if (args.IsDirectory)
{ {
@ -258,7 +258,7 @@ namespace Emby.Server.Implementations.Library.Resolvers
{ {
var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions(); var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions();
var resolver = new Format3DParser(namingOptions, new NullLogger()); var resolver = new Format3DParser(namingOptions);
var result = resolver.Parse(video.Path); var result = resolver.Parse(video.Path);
Set3DFormat(video, result.Is3D, result.Format3D); Set3DFormat(video, result.Is3D, result.Format3D);

View File

@ -6,7 +6,7 @@ using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Resolvers; using MediaBrowser.Controller.Resolvers;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Extensions;
using MediaBrowser.Naming.Video; using Emby.Naming.Video;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
@ -138,7 +138,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions(); var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions();
var resolver = new VideoListResolver(namingOptions, new NullLogger()); var resolver = new VideoListResolver(namingOptions);
var resolverResult = resolver.Resolve(files, suppportMultiEditions).ToList(); var resolverResult = resolver.Resolve(files, suppportMultiEditions).ToList();
var result = new MultiItemResolverResult var result = new MultiItemResolverResult
@ -490,7 +490,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
} }
var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions(); var namingOptions = ((LibraryManager)LibraryManager).GetNamingOptions();
var resolver = new StackResolver(namingOptions, new NullLogger()); var resolver = new StackResolver(namingOptions);
var result = resolver.ResolveDirectories(folderPaths); var result = resolver.ResolveDirectories(folderPaths);

View File

@ -3,8 +3,8 @@ using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Globalization; using MediaBrowser.Model.Globalization;
using MediaBrowser.Naming.Common; using Emby.Naming.Common;
using MediaBrowser.Naming.TV; using Emby.Naming.TV;
namespace Emby.Server.Implementations.Library.Resolvers.TV namespace Emby.Server.Implementations.Library.Resolvers.TV
{ {

View File

@ -4,8 +4,8 @@ using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Resolvers; using MediaBrowser.Controller.Resolvers;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using MediaBrowser.Naming.Common; using Emby.Naming.Common;
using MediaBrowser.Naming.TV; using Emby.Naming.TV;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
@ -163,7 +163,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
var allowOptimisticEpisodeDetection = isTvContentType; var allowOptimisticEpisodeDetection = isTvContentType;
var namingOptions = ((LibraryManager)libraryManager).GetNamingOptions(allowOptimisticEpisodeDetection); var namingOptions = ((LibraryManager)libraryManager).GetNamingOptions(allowOptimisticEpisodeDetection);
var episodeResolver = new MediaBrowser.Naming.TV.EpisodeResolver(namingOptions, new NullLogger()); var episodeResolver = new Emby.Naming.TV.EpisodeResolver(namingOptions);
var episodeInfo = episodeResolver.Resolve(fullName, false, false); var episodeInfo = episodeResolver.Resolve(fullName, false, false);
if (episodeInfo != null && episodeInfo.EpisodeNumber.HasValue) if (episodeInfo != null && episodeInfo.EpisodeNumber.HasValue)
{ {

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Emby.XmlTv" version="1.0.10" targetFramework="net46" /> <package id="Emby.XmlTv" version="1.0.10" targetFramework="net46" />
<package id="MediaBrowser.Naming" version="1.0.7" targetFramework="net46" />
<package id="ServiceStack.Text" version="4.5.8" targetFramework="net46" /> <package id="ServiceStack.Text" version="4.5.8" targetFramework="net46" />
<package id="SharpCompress" version="0.14.0" targetFramework="net46" /> <package id="SharpCompress" version="0.14.0" targetFramework="net46" />
<package id="SimpleInjector" version="4.0.8" targetFramework="net46" /> <package id="SimpleInjector" version="4.0.8" targetFramework="net46" />

View File

@ -60,6 +60,10 @@ namespace MediaBrowser.Controller.MediaEncoding
{ {
return GetAvailableEncoder("h264_omx", defaultEncoder); return GetAvailableEncoder("h264_omx", defaultEncoder);
} }
if (string.Equals(hwType, "h264_v4l2m2m", StringComparison.OrdinalIgnoreCase))
{
return GetAvailableEncoder("h264_v4l2m2m", defaultEncoder);
}
if (string.Equals(hwType, "vaapi", StringComparison.OrdinalIgnoreCase) && !string.IsNullOrWhiteSpace(encodingOptions.VaapiDevice)) if (string.Equals(hwType, "vaapi", StringComparison.OrdinalIgnoreCase) && !string.IsNullOrWhiteSpace(encodingOptions.VaapiDevice))
{ {
if (IsVaapiSupported(state)) if (IsVaapiSupported(state))
@ -692,7 +696,8 @@ namespace MediaBrowser.Controller.MediaEncoding
if (!string.IsNullOrEmpty(request.Profile)) if (!string.IsNullOrEmpty(request.Profile))
{ {
if (!string.Equals(videoEncoder, "h264_omx", StringComparison.OrdinalIgnoreCase) && if (!string.Equals(videoEncoder, "h264_omx", StringComparison.OrdinalIgnoreCase) &&
!string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase)) !string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase) &&
!string.Equals(videoEncoder, "h264_v4l2m2m", StringComparison.OrdinalIgnoreCase))
{ {
// not supported by h264_omx // not supported by h264_omx
param += " -profile:v " + request.Profile; param += " -profile:v " + request.Profile;
@ -761,11 +766,17 @@ namespace MediaBrowser.Controller.MediaEncoding
if (!string.Equals(videoEncoder, "h264_omx", StringComparison.OrdinalIgnoreCase) && if (!string.Equals(videoEncoder, "h264_omx", StringComparison.OrdinalIgnoreCase) &&
!string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase) && !string.Equals(videoEncoder, "h264_qsv", StringComparison.OrdinalIgnoreCase) &&
!string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase)) !string.Equals(videoEncoder, "h264_vaapi", StringComparison.OrdinalIgnoreCase) &&
!string.Equals(videoEncoder, "h264_v4l2m2m", StringComparison.OrdinalIgnoreCase))
{ {
param = "-pix_fmt yuv420p " + param; param = "-pix_fmt yuv420p " + param;
} }
if (string.Equals(videoEncoder, "h264_v4l2m2m", StringComparison.OrdinalIgnoreCase))
{
param = "-pix_fmt nv21 " + param;
}
return param; return param;
} }
@ -1567,7 +1578,7 @@ namespace MediaBrowser.Controller.MediaEncoding
inputModifier += " " + GetFastSeekCommandLineParameter(state.BaseRequest); inputModifier += " " + GetFastSeekCommandLineParameter(state.BaseRequest);
inputModifier = inputModifier.Trim(); inputModifier = inputModifier.Trim();
if (state.InputProtocol == MediaProtocol.Rtsp) if (state.InputProtocol == MediaProtocol.Rtsp)
{ {
inputModifier += " -rtsp_transport tcp"; inputModifier += " -rtsp_transport tcp";
@ -1691,7 +1702,7 @@ namespace MediaBrowser.Controller.MediaEncoding
} }
else else
{ {
state.PlayableStreamFileNames = new string[]{}; state.PlayableStreamFileNames = new string[] { };
} }
} }
else else

View File

@ -1,3 +1,3 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyVersion("3.2.30.14")] [assembly: AssemblyVersion("3.2.30.15")]