diff options
| -rw-r--r-- | Emby.Dlna/Profiles/PanasonicVieraProfile.cs | 177 | ||||
| -rw-r--r-- | Emby.Server.Implementations/ApplicationHost.cs | 8 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Data/SqliteItemRepository.cs | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Data/SqliteUserDataRepository.cs | 2 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Emby.Server.Implementations.csproj | 5 | ||||
| -rw-r--r-- | Emby.Server.Implementations/packages.config | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Audio/Audio.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Video.cs | 52 | ||||
| -rw-r--r-- | MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Model/Sync/SyncDataRequest.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs | 86 | ||||
| -rw-r--r-- | Nuget/MediaBrowser.Common.nuspec | 2 | ||||
| -rw-r--r-- | Nuget/MediaBrowser.Server.Core.nuspec | 4 |
15 files changed, 178 insertions, 178 deletions
diff --git a/Emby.Dlna/Profiles/PanasonicVieraProfile.cs b/Emby.Dlna/Profiles/PanasonicVieraProfile.cs index 095788485..eb9cf9528 100644 --- a/Emby.Dlna/Profiles/PanasonicVieraProfile.cs +++ b/Emby.Dlna/Profiles/PanasonicVieraProfile.cs @@ -16,20 +16,121 @@ namespace Emby.Dlna.Profiles Manufacturer = "Panasonic", Headers = new[] - { - new HttpHeaderInfo - { - Name = "User-Agent", - Value = "Panasonic MIL DLNA", - Match = HeaderMatchType.Substring - } - } + { + new HttpHeaderInfo + { + Name = "User-Agent", + Value = "Panasonic MIL DLNA", + Match = HeaderMatchType.Substring + } + } }; AddXmlRootAttribute("xmlns:pv", "http://www.pv.com/pvns/"); TimelineOffsetSeconds = 10; + TranscodingProfiles = new[] + { + new TranscodingProfile + { + Container = "mp3", + AudioCodec = "mp3", + Type = DlnaProfileType.Audio + }, + new TranscodingProfile + { + Container = "ts", + AudioCodec = "ac3", + VideoCodec = "h264", + Type = DlnaProfileType.Video + }, + new TranscodingProfile + { + Container = "jpeg", + Type = DlnaProfileType.Photo + } + }; + + DirectPlayProfiles = new[] + { + new DirectPlayProfile + { + Container = "mpeg,mpg", + VideoCodec = "mpeg2video,mpeg4", + AudioCodec = "ac3,mp3,pcm_dvd", + Type = DlnaProfileType.Video + }, + + new DirectPlayProfile + { + Container = "mkv", + VideoCodec = "h264,mpeg2video", + AudioCodec = "aac,ac3,dca,mp3,mp2,pcm,dts", + Type = DlnaProfileType.Video + }, + + new DirectPlayProfile + { + Container = "ts", + VideoCodec = "h264,mpeg2video", + AudioCodec = "aac,mp3,mp2", + Type = DlnaProfileType.Video + }, + + new DirectPlayProfile + { + Container = "mp4,m4v", + VideoCodec = "h264", + AudioCodec = "aac,ac3,mp3,pcm", + Type = DlnaProfileType.Video + }, + + new DirectPlayProfile + { + Container = "mov", + VideoCodec = "h264", + AudioCodec = "aac,pcm", + Type = DlnaProfileType.Video + }, + + new DirectPlayProfile + { + Container = "avi", + VideoCodec = "mpeg4", + AudioCodec = "pcm", + Type = DlnaProfileType.Video + }, + + new DirectPlayProfile + { + Container = "flv", + VideoCodec = "h264", + AudioCodec = "aac", + Type = DlnaProfileType.Video + }, + + new DirectPlayProfile + { + Container = "mp3", + AudioCodec = "mp3", + Type = DlnaProfileType.Audio + }, + + new DirectPlayProfile + { + Container = "mp4", + AudioCodec = "aac", + Type = DlnaProfileType.Audio + }, + + new DirectPlayProfile + { + Container = "jpeg", + Type = DlnaProfileType.Photo + } + }; + ContainerProfiles = new[] { new ContainerProfile @@ -55,35 +156,35 @@ namespace Emby.Dlna.Profiles }; CodecProfiles = new[] - { - new CodecProfile - { - Type = CodecType.Video, - - Conditions = new[] - { - new ProfileCondition - { - Condition = ProfileConditionType.LessThanEqual, - Property = ProfileConditionValue.Width, - Value = "1920" - }, - new ProfileCondition - { - Condition = ProfileConditionType.LessThanEqual, - Property = ProfileConditionValue.Height, - Value = "1080" - }, - new ProfileCondition - { - Condition = ProfileConditionType.LessThanEqual, - Property = ProfileConditionValue.VideoBitDepth, - Value = "8", - IsRequired = false - } - } - } - }; + { + new CodecProfile + { + Type = CodecType.Video, + + Conditions = new[] + { + new ProfileCondition + { + Condition = ProfileConditionType.LessThanEqual, + Property = ProfileConditionValue.Width, + Value = "1920" + }, + new ProfileCondition + { + Condition = ProfileConditionType.LessThanEqual, + Property = ProfileConditionValue.Height, + Value = "1080" + }, + new ProfileCondition + { + Condition = ProfileConditionType.LessThanEqual, + Property = ProfileConditionValue.VideoBitDepth, + Value = "8", + IsRequired = false + } + } + } + }; SubtitleProfiles = new[] { @@ -117,4 +218,4 @@ namespace Emby.Dlna.Profiles }; } } -} +}
\ No newline at end of file diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index aaca22fe9..88dd47538 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -227,6 +227,8 @@ namespace Emby.Server.Implementations protected IEnvironmentInfo EnvironmentInfo { get; set; } + private IBlurayExaminer BlurayExaminer { get; set; } + public PackageVersionClass SystemUpdateLevel { get @@ -884,7 +886,8 @@ namespace Emby.Server.Implementations ITextEncoding textEncoding = new TextEncoding.TextEncoding(FileSystemManager, LogManager.GetLogger("TextEncoding"), JsonSerializer); RegisterSingleInstance(textEncoding); Utilities.EncodingHelper = textEncoding; - RegisterSingleInstance<IBlurayExaminer>(() => new BdInfoExaminer(FileSystemManager, textEncoding)); + BlurayExaminer = new BdInfoExaminer(FileSystemManager, textEncoding); + RegisterSingleInstance(BlurayExaminer); RegisterSingleInstance<IXmlReaderSettingsFactory>(new XmlReaderSettingsFactory()); @@ -1335,7 +1338,8 @@ namespace Emby.Server.Implementations ProcessFactory, (Environment.ProcessorCount > 2 ? 14000 : 40000), EnvironmentInfo.OperatingSystem == MediaBrowser.Model.System.OperatingSystem.Windows, - EnvironmentInfo); + EnvironmentInfo, + BlurayExaminer); MediaEncoder = mediaEncoder; RegisterSingleInstance(MediaEncoder); diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 423ad2782..ff1d217e5 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -114,7 +114,7 @@ namespace Emby.Server.Implementations.Data { get { - return false; + return true; } } diff --git a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs index b76555bde..bf6388f5d 100644 --- a/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteUserDataRepository.cs @@ -95,7 +95,7 @@ namespace Emby.Server.Implementations.Data { get { - return false; + return true; } } diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 1dbb10b48..84ec214c9 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -661,8 +661,9 @@ <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> </Reference> - <Reference Include="MediaBrowser.Naming, Version=1.0.6437.24226, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\packages\MediaBrowser.Naming.1.0.6\lib\portable-net45+netstandard2.0+win8\MediaBrowser.Naming.dll</HintPath> + <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"> <HintPath>..\packages\ServiceStack.Text.4.5.8\lib\net45\ServiceStack.Text.dll</HintPath> diff --git a/Emby.Server.Implementations/packages.config b/Emby.Server.Implementations/packages.config index 8d4d24995..5b869221a 100644 --- a/Emby.Server.Implementations/packages.config +++ b/Emby.Server.Implementations/packages.config @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="Emby.XmlTv" version="1.0.10" targetFramework="net46" /> - <package id="MediaBrowser.Naming" version="1.0.6" targetFramework="net46" /> + <package id="MediaBrowser.Naming" version="1.0.7" targetFramework="net46" /> <package id="ServiceStack.Text" version="4.5.8" targetFramework="net46" /> <package id="SharpCompress" version="0.14.0" targetFramework="net46" /> <package id="SimpleInjector" version="4.0.8" targetFramework="net46" /> diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs index e029a447e..3ebf4da00 100644 --- a/MediaBrowser.Controller/Entities/Audio/Audio.cs +++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs @@ -110,7 +110,7 @@ namespace MediaBrowser.Controller.Entities.Audio list[index] = artist; index++; } - foreach (var artist in AlbumArtists) + foreach (var artist in Artists) { list[index] = artist; index++; diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index 82f880b3f..7af8161ca 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -96,7 +96,7 @@ namespace MediaBrowser.Controller.Entities.Audio list[index] = artist; index++; } - foreach (var artist in AlbumArtists) + foreach (var artist in Artists) { list[index] = artist; index++; diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 24fa80ef6..51dc59c19 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -25,6 +25,7 @@ using System.Threading.Tasks; using MediaBrowser.Controller.Dto; using MediaBrowser.Controller.Extensions; using MediaBrowser.Controller.IO; +using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Globalization; @@ -536,6 +537,7 @@ namespace MediaBrowser.Controller.Entities public static ICollectionManager CollectionManager { get; set; } public static IImageProcessor ImageProcessor { get; set; } public static IMediaSourceManager MediaSourceManager { get; set; } + public static IMediaEncoder MediaEncoder { get; set; } /// <summary> /// Returns a <see cref="System.String" /> that represents this instance. diff --git a/MediaBrowser.Controller/Entities/Video.cs b/MediaBrowser.Controller/Entities/Video.cs index 3918ac8fc..887da46cc 100644 --- a/MediaBrowser.Controller/Entities/Video.cs +++ b/MediaBrowser.Controller/Entities/Video.cs @@ -149,18 +149,20 @@ namespace MediaBrowser.Controller.Entities /// <value>The video3 D format.</value> public Video3DFormat? Video3DFormat { get; set; } - /// <summary> - /// Gets the playable stream files. - /// </summary> - /// <returns>List{System.String}.</returns> - public string[] GetPlayableStreamFiles() - { - return GetPlayableStreamFiles(Path); - } - public string[] GetPlayableStreamFileNames() { - return GetPlayableStreamFiles().Select(System.IO.Path.GetFileName).ToArray(); + var videoType = VideoType; + + if (videoType == VideoType.Iso && IsoType == Model.Entities.IsoType.BluRay) + { + videoType = VideoType.BluRay; + } + else if (videoType == VideoType.Iso && IsoType == Model.Entities.IsoType.Dvd) + { + videoType = VideoType.Dvd; + } + + return MediaEncoder.GetPlayableStreamFileNames(Path, videoType); } /// <summary> @@ -413,36 +415,6 @@ namespace MediaBrowser.Controller.Entities return base.IsValidFromResolver(newItem); } - /// <summary> - /// Gets the playable stream files. - /// </summary> - /// <param name="rootPath">The root path.</param> - /// <returns>List{System.String}.</returns> - public string[] GetPlayableStreamFiles(string rootPath) - { - if (VideoType == VideoType.VideoFile) - { - return new string[] { }; - } - - var allFiles = FileSystem.GetFilePaths(rootPath, true).ToList(); - - var videoType = VideoType; - - if (videoType == VideoType.Iso && IsoType == Model.Entities.IsoType.BluRay) - { - videoType = VideoType.BluRay; - } - else if (videoType == VideoType.Iso && IsoType == Model.Entities.IsoType.Dvd) - { - videoType = VideoType.Dvd; - } - - return QueryPlayableStreamFiles(rootPath, videoType).Select(name => allFiles.FirstOrDefault(f => string.Equals(System.IO.Path.GetFileName(f), name, StringComparison.OrdinalIgnoreCase))) - .Where(f => !string.IsNullOrEmpty(f)) - .ToArray(); - } - public static string[] QueryPlayableStreamFiles(string rootPath, VideoType videoType) { if (videoType == VideoType.Dvd) diff --git a/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs b/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs index 803b189d4..31cd96c9a 100644 --- a/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs +++ b/MediaBrowser.Controller/MediaEncoding/IMediaEncoder.cs @@ -1,9 +1,11 @@ using MediaBrowser.Model.Entities; using MediaBrowser.Model.MediaInfo; using System; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.IO; namespace MediaBrowser.Controller.MediaEncoding { @@ -118,5 +120,8 @@ namespace MediaBrowser.Controller.MediaEncoding void SetLogFilename(string name); void ClearLogFilename(); + + string[] GetPlayableStreamFileNames(string path, VideoType videoType); + IEnumerable<string> GetPrimaryPlaylistVobFiles(string path, IIsoMount isoMount, uint? titleNumber); } } diff --git a/MediaBrowser.Model/Sync/SyncDataRequest.cs b/MediaBrowser.Model/Sync/SyncDataRequest.cs index c0941caee..79d1842e1 100644 --- a/MediaBrowser.Model/Sync/SyncDataRequest.cs +++ b/MediaBrowser.Model/Sync/SyncDataRequest.cs @@ -1,11 +1,9 @@ -using System.Collections.Generic; - + namespace MediaBrowser.Model.Sync { public class SyncDataRequest { public string[] LocalItemIds { get; set; } - public string[] OfflineUserIds { get; set; } public string[] SyncJobItemIds { get; set; } public string TargetId { get; set; } @@ -13,7 +11,6 @@ namespace MediaBrowser.Model.Sync public SyncDataRequest() { LocalItemIds = new string[] { }; - OfflineUserIds = new string[] { }; } } } diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs index ea8d7bdb0..76cd02cef 100644 --- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs +++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs @@ -25,9 +25,6 @@ using System.IO; using System.Linq; using System.Threading; using System.Threading.Tasks; - -using MediaBrowser.Controller.IO; -using MediaBrowser.Model.IO; using MediaBrowser.Model.Globalization; namespace MediaBrowser.Providers.MediaInfo @@ -49,8 +46,6 @@ namespace MediaBrowser.Providers.MediaInfo private readonly IChapterManager _chapterManager; private readonly ILibraryManager _libraryManager; - private readonly CultureInfo _usCulture = new CultureInfo("en-US"); - public FFProbeVideoInfo(ILogger logger, IIsoManager isoManager, IMediaEncoder mediaEncoder, IItemRepository itemRepo, IBlurayExaminer blurayExaminer, ILocalizationManager localization, IApplicationPaths appPaths, IJsonSerializer json, IEncodingManager encodingManager, IFileSystem fileSystem, IServerConfigurationManager config, ISubtitleManager subtitleManager, IChapterManager chapterManager, ILibraryManager libraryManager) { _logger = logger; @@ -565,8 +560,8 @@ namespace MediaBrowser.Providers.MediaInfo titleNumber = primaryTitle.VideoTitleSetNumber; item.RunTimeTicks = GetRuntime(primaryTitle); } - - return GetPrimaryPlaylistVobFiles(item, mount, titleNumber) + + return _mediaEncoder.GetPrimaryPlaylistVobFiles(item.Path, mount, titleNumber) .Select(Path.GetFileName) .ToArray(); } @@ -616,82 +611,5 @@ namespace MediaBrowser.Providers.MediaInfo return null; } - - private IEnumerable<string> GetPrimaryPlaylistVobFiles(Video video, IIsoMount isoMount, uint? titleNumber) - { - // min size 300 mb - const long minPlayableSize = 314572800; - - var root = isoMount != null ? isoMount.MountedPath : video.Path; - - // Try to eliminate menus and intros by skipping all files at the front of the list that are less than the minimum size - // Once we reach a file that is at least the minimum, return all subsequent ones - var allVobs = _fileSystem.GetFiles(root, new[] { ".vob" }, false, true) - .OrderBy(i => i.FullName) - .ToList(); - - // If we didn't find any satisfying the min length, just take them all - if (allVobs.Count == 0) - { - _logger.Error("No vobs found in dvd structure."); - return new List<string>(); - } - - if (titleNumber.HasValue) - { - var prefix = string.Format("VTS_0{0}_", titleNumber.Value.ToString(_usCulture)); - var vobs = allVobs.Where(i => i.Name.StartsWith(prefix, StringComparison.OrdinalIgnoreCase)).ToList(); - - if (vobs.Count > 0) - { - var minSizeVobs = vobs - .SkipWhile(f => f.Length < minPlayableSize) - .ToList(); - - return minSizeVobs.Count == 0 ? vobs.Select(i => i.FullName) : minSizeVobs.Select(i => i.FullName); - } - - _logger.Info("Could not determine vob file list for {0} using DvdLib. Will scan using file sizes.", video.Path); - } - - var files = allVobs - .SkipWhile(f => f.Length < minPlayableSize) - .ToList(); - - // If we didn't find any satisfying the min length, just take them all - if (files.Count == 0) - { - _logger.Warn("Vob size filter resulted in zero matches. Taking all vobs."); - files = allVobs; - } - - // Assuming they're named "vts_05_01", take all files whose second part matches that of the first file - if (files.Count > 0) - { - var parts = _fileSystem.GetFileNameWithoutExtension(files[0]).Split('_'); - - if (parts.Length == 3) - { - var title = parts[1]; - - files = files.TakeWhile(f => - { - var fileParts = _fileSystem.GetFileNameWithoutExtension(f).Split('_'); - - return fileParts.Length == 3 && string.Equals(title, fileParts[1], StringComparison.OrdinalIgnoreCase); - - }).ToList(); - - // If this resulted in not getting any vobs, just take them all - if (files.Count == 0) - { - _logger.Warn("Vob filename filter resulted in zero matches. Taking all vobs."); - files = allVobs; - } - } - } - - return files.Select(i => i.FullName); - } } }
\ No newline at end of file diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index 4044eaea1..3aa3d5403 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ <package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd"> <metadata> <id>MediaBrowser.Common</id> - <version>3.0.741</version> + <version>3.0.744</version> <title>Emby.Common</title> <authors>Emby Team</authors> <owners>ebr,Luke,scottisafool</owners> diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index 6f43586cd..ea30175e6 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ <package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> <metadata> <id>MediaBrowser.Server.Core</id> - <version>3.0.741</version> + <version>3.0.744</version> <title>Emby.Server.Core</title> <authors>Emby Team</authors> <owners>ebr,Luke,scottisafool</owners> @@ -12,7 +12,7 @@ <description>Contains core components required to build plugins for Emby Server.</description> <copyright>Copyright © Emby 2013</copyright> <dependencies> - <dependency id="MediaBrowser.Common" version="3.0.741" /> + <dependency id="MediaBrowser.Common" version="3.0.744" /> </dependencies> </metadata> <files> |
