Merge pull request #2018 from MediaBrowser/beta

Beta
This commit is contained in:
Luke 2016-08-04 00:48:30 -04:00 committed by GitHub
commit 87d7a7d85a
142 changed files with 499 additions and 702 deletions

View File

@ -997,10 +997,7 @@ namespace MediaBrowser.Api.LiveTv
public async Task<object> Get(GetRecordingGroup request) public async Task<object> Get(GetRecordingGroup request)
{ {
var result = await _liveTvManager.GetRecordingGroups(new RecordingGroupQuery var result = await _liveTvManager.GetRecordingGroups(new RecordingGroupQuery(), CancellationToken.None).ConfigureAwait(false);
{
}, CancellationToken.None).ConfigureAwait(false);
var group = result.Items.FirstOrDefault(i => string.Equals(i.Id, request.Id, StringComparison.OrdinalIgnoreCase)); var group = result.Items.FirstOrDefault(i => string.Equals(i.Id, request.Id, StringComparison.OrdinalIgnoreCase));

View File

@ -1788,6 +1788,19 @@ namespace MediaBrowser.Api.Playback
{ {
state.OutputAudioCodec = "copy"; state.OutputAudioCodec = "copy";
} }
else
{
// If the user doesn't have access to transcoding, then force stream copy, regardless of whether it will be compatible or not
var auth = AuthorizationContext.GetAuthorizationInfo(Request);
if (!string.IsNullOrWhiteSpace(auth.UserId))
{
var user = UserManager.GetUserById(auth.UserId);
if (!user.Policy.EnableAudioPlaybackTranscoding)
{
state.OutputAudioCodec = "copy";
}
}
}
} }
private void AttachMediaSourceInfo(StreamState state, private void AttachMediaSourceInfo(StreamState state,

View File

@ -3,7 +3,6 @@ using MediaBrowser.Controller.Devices;
using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Dlna;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Extensions; using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using MediaBrowser.Model.Net; using MediaBrowser.Model.Net;

View File

@ -1,7 +1,5 @@
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using ServiceStack.Web;
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -8,8 +8,6 @@ using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto; using MediaBrowser.Model.Dto;
using ServiceStack; using ServiceStack;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Querying; using MediaBrowser.Model.Querying;
namespace MediaBrowser.Api.UserLibrary namespace MediaBrowser.Api.UserLibrary

View File

@ -180,9 +180,10 @@ namespace MediaBrowser.Api.UserLibrary
var result = GetItems(request, query); var result = GetItems(request, query);
var syncProgess = DtoService.GetSyncedItemProgress(dtoOptions);
var dtos = result.Items.Select(i => var dtos = result.Items.Select(i =>
{ {
var dto = DtoService.GetItemByNameDto(i.Item1, dtoOptions, null, user); var dto = DtoService.GetItemByNameDto(i.Item1, dtoOptions, null, syncProgess, user);
if (!string.IsNullOrWhiteSpace(request.IncludeItemTypes)) if (!string.IsNullOrWhiteSpace(request.IncludeItemTypes))
{ {
@ -325,7 +326,8 @@ namespace MediaBrowser.Api.UserLibrary
tuples = ibnItems.Select(i => new Tuple<BaseItem, List<BaseItem>>(i, new List<BaseItem>())); tuples = ibnItems.Select(i => new Tuple<BaseItem, List<BaseItem>>(i, new List<BaseItem>()));
} }
var dtos = tuples.Select(i => DtoService.GetItemByNameDto(i.Item1, dtoOptions, i.Item2, user)); var syncProgess = DtoService.GetSyncedItemProgress(dtoOptions);
var dtos = tuples.Select(i => DtoService.GetItemByNameDto(i.Item1, dtoOptions, i.Item2, syncProgess, user));
result.Items = dtos.Where(i => i != null).ToArray(); result.Items = dtos.Where(i => i != null).ToArray();

View File

@ -4,11 +4,9 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Net; using MediaBrowser.Controller.Net;
using MediaBrowser.Controller.Persistence; using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto; using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using ServiceStack; using ServiceStack;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using MediaBrowser.Model.Querying; using MediaBrowser.Model.Querying;
namespace MediaBrowser.Api.UserLibrary namespace MediaBrowser.Api.UserLibrary

View File

@ -8,7 +8,6 @@ using MediaBrowser.Model.Entities;
using ServiceStack; using ServiceStack;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using MediaBrowser.Model.Querying; using MediaBrowser.Model.Querying;
namespace MediaBrowser.Api.UserLibrary namespace MediaBrowser.Api.UserLibrary

View File

@ -1,5 +1,4 @@
using MediaBrowser.Controller.Collections; using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Dto;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Localization; using MediaBrowser.Controller.Localization;

View File

@ -8,8 +8,6 @@ using MediaBrowser.Controller.Persistence;
using MediaBrowser.Model.Dto; using MediaBrowser.Model.Dto;
using ServiceStack; using ServiceStack;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Querying; using MediaBrowser.Model.Querying;
namespace MediaBrowser.Api.UserLibrary namespace MediaBrowser.Api.UserLibrary

View File

@ -57,10 +57,7 @@ namespace MediaBrowser.Controller.Channels
catch catch
{ {
// Already logged at lower levels // Already logged at lower levels
return new QueryResult<BaseItem> return new QueryResult<BaseItem>();
{
};
} }
} }

View File

@ -83,8 +83,7 @@ namespace MediaBrowser.Controller.Channels
{ {
var list = new List<MediaStream>(); var list = new List<MediaStream>();
if (!string.IsNullOrWhiteSpace(info.VideoCodec) && if (!string.IsNullOrWhiteSpace(info.VideoCodec))
!string.IsNullOrWhiteSpace(info.AudioCodec))
{ {
list.Add(new MediaStream list.Add(new MediaStream
{ {
@ -99,7 +98,10 @@ namespace MediaBrowser.Controller.Channels
BitRate = info.VideoBitrate, BitRate = info.VideoBitrate,
AverageFrameRate = info.Framerate AverageFrameRate = info.Framerate
}); });
}
if (!string.IsNullOrWhiteSpace(info.AudioCodec))
{
list.Add(new MediaStream list.Add(new MediaStream
{ {
Type = MediaStreamType.Audio, Type = MediaStreamType.Audio,

View File

@ -1,9 +1,9 @@
using System; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Dto; using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Querying; using MediaBrowser.Model.Querying;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Controller.Sync;
namespace MediaBrowser.Controller.Dto namespace MediaBrowser.Controller.Dto
{ {
@ -43,14 +43,6 @@ namespace MediaBrowser.Controller.Dto
/// <returns>Task{BaseItemDto}.</returns> /// <returns>Task{BaseItemDto}.</returns>
BaseItemDto GetBaseItemDto(BaseItem item, List<ItemFields> fields, User user = null, BaseItem owner = null); BaseItemDto GetBaseItemDto(BaseItem item, List<ItemFields> fields, User user = null, BaseItem owner = null);
/// <summary>
/// Fills the synchronize information.
/// </summary>
/// <param name="tuples">The tuples.</param>
/// <param name="options">The options.</param>
/// <param name="user">The user.</param>
void FillSyncInfo(IEnumerable<Tuple<BaseItem, BaseItemDto>> tuples, DtoOptions options, User user);
/// <summary> /// <summary>
/// Gets the base item dto. /// Gets the base item dto.
/// </summary> /// </summary>
@ -89,11 +81,8 @@ namespace MediaBrowser.Controller.Dto
/// <summary> /// <summary>
/// Gets the item by name dto. /// Gets the item by name dto.
/// </summary> /// </summary>
/// <param name="item">The item.</param> BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, Dictionary<string, SyncedItemProgress> syncProgress, User user = null);
/// <param name="options">The options.</param>
/// <param name="taggedItems">The tagged items.</param> Dictionary<string, SyncedItemProgress> GetSyncedItemProgress(DtoOptions options);
/// <param name="user">The user.</param>
/// <returns>BaseItemDto.</returns>
BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, User user = null);
} }
} }

View File

@ -1,5 +1,4 @@
using MediaBrowser.Common.Progress; using MediaBrowser.Common.Progress;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Dto; using MediaBrowser.Model.Dto;
@ -919,10 +918,7 @@ namespace MediaBrowser.Controller.Entities
catch catch
{ {
// Already logged at lower levels // Already logged at lower levels
return new QueryResult<BaseItem> return new QueryResult<BaseItem>();
{
};
} }
} }

View File

@ -1,5 +1,4 @@
using System; using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Threading;

View File

@ -1,5 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
namespace MediaBrowser.Controller.Entities namespace MediaBrowser.Controller.Entities
{ {

View File

@ -11,11 +11,13 @@ namespace MediaBrowser.Controller.Entities
public int? MaxListOrder { get; set; } public int? MaxListOrder { get; set; }
public Guid AppearsInItemId { get; set; } public Guid AppearsInItemId { get; set; }
public string NameContains { get; set; } public string NameContains { get; set; }
public SourceType[] SourceTypes { get; set; }
public InternalPeopleQuery() public InternalPeopleQuery()
{ {
PersonTypes = new List<string>(); PersonTypes = new List<string>();
ExcludePersonTypes = new List<string>(); ExcludePersonTypes = new List<string>();
SourceTypes = new SourceType[] { };
} }
} }
} }

View File

@ -1,7 +1,6 @@
using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.Serialization; using System.Runtime.Serialization;

View File

@ -1,6 +1,5 @@
using System; using System;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Querying; using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Users; using MediaBrowser.Model.Users;
using MoreLinq; using MoreLinq;

View File

@ -2,9 +2,7 @@
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Model.Providers; using MediaBrowser.Model.Providers;
namespace MediaBrowser.Controller.Entities namespace MediaBrowser.Controller.Entities

View File

@ -1,6 +1,5 @@
using System.Runtime.Serialization; using System.Runtime.Serialization;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Library; using MediaBrowser.Model.Library;
using MediaBrowser.Model.Querying; using MediaBrowser.Model.Querying;
using System; using System;
@ -8,7 +7,6 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Controller.Library;
namespace MediaBrowser.Controller.Entities namespace MediaBrowser.Controller.Entities
{ {

View File

@ -1,5 +1,4 @@
using MediaBrowser.Controller.Channels; using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Collections;
using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Entities.Movies; using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
@ -14,12 +13,10 @@ using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Querying; using MediaBrowser.Model.Querying;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Model.Configuration;
using MoreLinq; using MoreLinq;
namespace MediaBrowser.Controller.Entities namespace MediaBrowser.Controller.Entities

View File

@ -474,12 +474,6 @@ namespace MediaBrowser.Controller.Library
/// <returns>List&lt;Person&gt;.</returns> /// <returns>List&lt;Person&gt;.</returns>
List<Person> GetPeopleItems(InternalPeopleQuery query); List<Person> GetPeopleItems(InternalPeopleQuery query);
/// <summary>
/// Gets all people names.
/// </summary>
/// <returns>List&lt;System.String&gt;.</returns>
List<PersonInfo> GetAllPeople();
/// <summary> /// <summary>
/// Updates the people. /// Updates the people.
/// </summary> /// </summary>

View File

@ -1,5 +1,4 @@
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.LiveTv; using MediaBrowser.Model.LiveTv;

View File

@ -1,5 +1,4 @@
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Dto; using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;

View File

@ -1,10 +1,4 @@
using System; namespace MediaBrowser.Controller.LiveTv
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.LiveTv
{ {
public class TimerEventInfo public class TimerEventInfo
{ {

View File

@ -1,10 +1,4 @@
using System; namespace MediaBrowser.Controller.LiveTv
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.LiveTv
{ {
public class TunerChannelMapping public class TunerChannelMapping
{ {

View File

@ -1,5 +1,4 @@
using System.Linq; using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dlna;
namespace MediaBrowser.Controller.MediaEncoding namespace MediaBrowser.Controller.MediaEncoding
{ {

View File

@ -1,7 +1,6 @@
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.MediaInfo;
using System; using System;
using System.IO;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dlna;

View File

@ -151,7 +151,7 @@ namespace MediaBrowser.Controller.Sync
/// </summary> /// </summary>
/// <param name="query">The query.</param> /// <param name="query">The query.</param>
/// <returns>QueryResult&lt;System.String&gt;.</returns> /// <returns>QueryResult&lt;System.String&gt;.</returns>
QueryResult<SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query); Dictionary<string, SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query);
/// <summary> /// <summary>
/// Reports the synchronize job item transfer beginning. /// Reports the synchronize job item transfer beginning.

View File

@ -1,4 +1,5 @@
using MediaBrowser.Model.Querying; using System.Collections.Generic;
using MediaBrowser.Model.Querying;
using MediaBrowser.Model.Sync; using MediaBrowser.Model.Sync;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -74,6 +75,6 @@ namespace MediaBrowser.Controller.Sync
/// </summary> /// </summary>
/// <param name="query">The query.</param> /// <param name="query">The query.</param>
/// <returns>QueryResult&lt;System.String&gt;.</returns> /// <returns>QueryResult&lt;System.String&gt;.</returns>
QueryResult<SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query); Dictionary<string, SyncedItemProgress> GetSyncedItemProgresses(SyncJobItemQuery query);
} }
} }

View File

@ -4,7 +4,7 @@ namespace MediaBrowser.Controller.Sync
{ {
public class SyncedItemProgress public class SyncedItemProgress
{ {
public string ItemId { get; set; } public double Progress { get; set; }
public SyncJobItemStatus Status { get; set; } public SyncJobItemStatus Status { get; set; }
} }
} }

View File

@ -1,20 +1,4 @@
using System; namespace MediaBrowser.Dlna.Channels
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Dlna;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Dlna.ContentDirectory;
using MediaBrowser.Dlna.PlayTo;
using MediaBrowser.Model.Channels;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging;
namespace MediaBrowser.Dlna.Channels
{ {
//public class DlnaChannel : IChannel, IDisposable //public class DlnaChannel : IChannel, IDisposable
//{ //{

View File

@ -602,7 +602,7 @@ namespace MediaBrowser.Dlna.ContentDirectory
id = id.Substring(paramsIndex + paramsSrch.Length); id = id.Substring(paramsIndex + paramsSrch.Length);
var parts = id.Split(';'); var parts = id.Split(';');
id = parts[24]; id = parts[23];
} }
if (id.StartsWith("folder_", StringComparison.OrdinalIgnoreCase)) if (id.StartsWith("folder_", StringComparison.OrdinalIgnoreCase))

View File

@ -29,7 +29,7 @@ namespace MediaBrowser.Dlna
private readonly IJsonSerializer _jsonSerializer; private readonly IJsonSerializer _jsonSerializer;
private readonly IServerApplicationHost _appHost; private readonly IServerApplicationHost _appHost;
private readonly Dictionary<string, DeviceProfile> _profiles = new Dictionary<string, DeviceProfile>(StringComparer.Ordinal); private readonly Dictionary<string, Tuple<InternalProfileInfo, DeviceProfile>> _profiles = new Dictionary<string, Tuple<InternalProfileInfo, DeviceProfile>>(StringComparer.Ordinal);
public DlnaManager(IXmlSerializer xmlSerializer, public DlnaManager(IXmlSerializer xmlSerializer,
IFileSystem fileSystem, IFileSystem fileSystem,
@ -45,50 +45,40 @@ namespace MediaBrowser.Dlna
_appHost = appHost; _appHost = appHost;
} }
public IEnumerable<DeviceProfile> GetProfiles() public void InitProfiles()
{ {
ExtractProfilesIfNeeded(); try
{
ExtractSystemProfiles();
LoadProfiles();
}
catch (Exception ex)
{
_logger.ErrorException("Error extracting DLNA profiles.", ex);
}
}
private void LoadProfiles()
{
var list = GetProfiles(UserProfilesPath, DeviceProfileType.User) var list = GetProfiles(UserProfilesPath, DeviceProfileType.User)
.OrderBy(i => i.Name) .OrderBy(i => i.Name)
.ToList(); .ToList();
list.AddRange(GetProfiles(SystemProfilesPath, DeviceProfileType.System) list.AddRange(GetProfiles(SystemProfilesPath, DeviceProfileType.System)
.OrderBy(i => i.Name)); .OrderBy(i => i.Name));
return list;
} }
private bool _extracted; public IEnumerable<DeviceProfile> GetProfiles()
private readonly object _syncLock = new object();
private void ExtractProfilesIfNeeded()
{ {
if (!_extracted) lock (_profiles)
{ {
lock (_syncLock) var list = _profiles.Values.ToList();
{ return list.Select(i => i.Item2).OrderBy(i => i.Name);
if (!_extracted)
{
try
{
ExtractSystemProfiles();
}
catch (Exception ex)
{
_logger.ErrorException("Error extracting DLNA profiles.", ex);
}
_extracted = true;
}
}
} }
} }
public DeviceProfile GetDefaultProfile() public DeviceProfile GetDefaultProfile()
{ {
ExtractProfilesIfNeeded();
return new DefaultProfile(); return new DefaultProfile();
} }
@ -304,20 +294,20 @@ namespace MediaBrowser.Dlna
{ {
lock (_profiles) lock (_profiles)
{ {
DeviceProfile profile; Tuple<InternalProfileInfo, DeviceProfile> profileTuple;
if (_profiles.TryGetValue(path, out profile)) if (_profiles.TryGetValue(path, out profileTuple))
{ {
return profile; return profileTuple.Item2;
} }
try try
{ {
profile = (DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(DeviceProfile), path); var profile = (DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(DeviceProfile), path);
profile.Id = path.ToLower().GetMD5().ToString("N"); profile.Id = path.ToLower().GetMD5().ToString("N");
profile.ProfileType = type; profile.ProfileType = type;
_profiles[path] = profile; _profiles[path] = new Tuple<InternalProfileInfo, DeviceProfile>(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile);
return profile; return profile;
} }
@ -344,13 +334,15 @@ namespace MediaBrowser.Dlna
private IEnumerable<InternalProfileInfo> GetProfileInfosInternal() private IEnumerable<InternalProfileInfo> GetProfileInfosInternal()
{ {
ExtractProfilesIfNeeded(); lock (_profiles)
{
return GetProfileInfos(UserProfilesPath, DeviceProfileType.User) var list = _profiles.Values.ToList();
.Concat(GetProfileInfos(SystemProfilesPath, DeviceProfileType.System)) return list
.Select(i => i.Item1)
.OrderBy(i => i.Info.Type == DeviceProfileType.User ? 0 : 1) .OrderBy(i => i.Info.Type == DeviceProfileType.User ? 0 : 1)
.ThenBy(i => i.Info.Name); .ThenBy(i => i.Info.Name);
} }
}
public IEnumerable<DeviceProfileInfo> GetProfileInfos() public IEnumerable<DeviceProfileInfo> GetProfileInfos()
{ {
@ -363,17 +355,7 @@ namespace MediaBrowser.Dlna
{ {
return _fileSystem.GetFiles(path) return _fileSystem.GetFiles(path)
.Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase)) .Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase))
.Select(i => new InternalProfileInfo .Select(i => GetInternalProfileInfo(i, type))
{
Path = i.FullName,
Info = new DeviceProfileInfo
{
Id = i.FullName.ToLower().GetMD5().ToString("N"),
Name = _fileSystem.GetFileNameWithoutExtension(i),
Type = type
}
})
.ToList(); .ToList();
} }
catch (DirectoryNotFoundException) catch (DirectoryNotFoundException)
@ -382,6 +364,21 @@ namespace MediaBrowser.Dlna
} }
} }
private InternalProfileInfo GetInternalProfileInfo(FileSystemMetadata file, DeviceProfileType type)
{
return new InternalProfileInfo
{
Path = file.FullName,
Info = new DeviceProfileInfo
{
Id = file.FullName.ToLower().GetMD5().ToString("N"),
Name = _fileSystem.GetFileNameWithoutExtension(file),
Type = type
}
};
}
private void ExtractSystemProfiles() private void ExtractSystemProfiles()
{ {
var assembly = GetType().Assembly; var assembly = GetType().Assembly;
@ -427,6 +424,11 @@ namespace MediaBrowser.Dlna
} }
_fileSystem.DeleteFile(info.Path); _fileSystem.DeleteFile(info.Path);
lock (_profiles)
{
_profiles.Remove(info.Path);
}
} }
public void CreateProfile(DeviceProfile profile) public void CreateProfile(DeviceProfile profile)
@ -441,7 +443,7 @@ namespace MediaBrowser.Dlna
var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".xml"; var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".xml";
var path = Path.Combine(UserProfilesPath, newFilename); var path = Path.Combine(UserProfilesPath, newFilename);
SaveProfile(profile, path); SaveProfile(profile, path, DeviceProfileType.User);
} }
public void UpdateProfile(DeviceProfile profile) public void UpdateProfile(DeviceProfile profile)
@ -468,14 +470,14 @@ namespace MediaBrowser.Dlna
_fileSystem.DeleteFile(current.Path); _fileSystem.DeleteFile(current.Path);
} }
SaveProfile(profile, path); SaveProfile(profile, path, DeviceProfileType.User);
} }
private void SaveProfile(DeviceProfile profile, string path) private void SaveProfile(DeviceProfile profile, string path, DeviceProfileType type)
{ {
lock (_profiles) lock (_profiles)
{ {
_profiles[path] = profile; _profiles[path] = new Tuple<InternalProfileInfo, DeviceProfile>(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile);
} }
_xmlSerializer.SerializeToFile(profile, path); _xmlSerializer.SerializeToFile(profile, path);
} }

View File

@ -14,10 +14,8 @@ using MediaBrowser.Dlna.Ssdp;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Dlna.Channels;
namespace MediaBrowser.Dlna.Main namespace MediaBrowser.Dlna.Main
{ {
@ -82,6 +80,8 @@ namespace MediaBrowser.Dlna.Main
public void Run() public void Run()
{ {
((DlnaManager)_dlnaManager).InitProfiles();
ReloadComponents(); ReloadComponents();
_config.ConfigurationUpdated += _config_ConfigurationUpdated; _config.ConfigurationUpdated += _config_ConfigurationUpdated;

View File

@ -38,7 +38,7 @@ namespace MediaBrowser.Dlna.Profiles
new TranscodingProfile new TranscodingProfile
{ {
Container = "ts", Container = "ts",
AudioCodec = "ac3", AudioCodec = "ac3,aac,mp3",
VideoCodec = "h264", VideoCodec = "h264",
Type = DlnaProfileType.Video Type = DlnaProfileType.Video
}, },

View File

@ -40,9 +40,9 @@
<DirectPlayProfile container="" type="Photo" /> <DirectPlayProfile container="" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles /> <CodecProfiles />

View File

@ -33,9 +33,9 @@
<DirectPlayProfile container="avi,mp4" type="Video" /> <DirectPlayProfile container="avi,mp4" type="Video" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles /> <CodecProfiles />

View File

@ -37,9 +37,9 @@
<DirectPlayProfile container="mp3,flac,m4a,wma" type="Audio" /> <DirectPlayProfile container="mp3,flac,m4a,wma" type="Audio" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles /> <CodecProfiles />

View File

@ -39,8 +39,8 @@
<DirectPlayProfile container="jpeg,jpg" type="Photo" /> <DirectPlayProfile container="jpeg,jpg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mpeg" type="Video" videoCodec="mpeg2video" audioCodec="mp2" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mpeg" type="Video" videoCodec="mpeg2video" audioCodec="mp2" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles> <CodecProfiles>
@ -51,11 +51,13 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="8192000" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="8192000" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Audio" codec="mp2"> <CodecProfile type="Audio" codec="mp2">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles /> <ResponseProfiles />

View File

@ -43,9 +43,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles> <CodecProfiles>
@ -57,6 +57,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video"> <CodecProfile type="Video">
<Conditions> <Conditions>
@ -65,16 +66,19 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3,he-aac"> <CodecProfile type="VideoAudio" codec="ac3,he-aac">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="aac"> <CodecProfile type="VideoAudio" codec="aac">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -40,9 +40,9 @@
<DirectPlayProfile container="" type="Photo" /> <DirectPlayProfile container="" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles /> <CodecProfiles />

View File

@ -42,9 +42,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -61,6 +61,7 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video" codec="h264"> <CodecProfile type="Video" codec="h264">
<Conditions> <Conditions>
@ -69,11 +70,13 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3,aac,mp3"> <CodecProfile type="VideoAudio" codec="ac3,aac,mp3">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles /> <ResponseProfiles />

View File

@ -37,9 +37,9 @@
<DirectPlayProfile container="avi,mp4,mkv,ts" type="Video" /> <DirectPlayProfile container="avi,mp4,mkv,ts" type="Video" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles /> <CodecProfiles />

View File

@ -43,9 +43,9 @@
<DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" /> <DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles /> <CodecProfiles />

View File

@ -50,9 +50,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -69,6 +69,7 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -38,9 +38,9 @@
<DirectPlayProfile container="jpeg,gif,bmp,png" type="Photo" /> <DirectPlayProfile container="jpeg,gif,bmp,png" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles> <CodecProfiles>
@ -51,6 +51,7 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" /> <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video"> <CodecProfile type="Video">
<Conditions> <Conditions>
@ -58,22 +59,26 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" /> <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="aac"> <CodecProfile type="VideoAudio" codec="aac">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Audio" codec="aac"> <CodecProfile type="Audio" codec="aac">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Audio" codec="mp3"> <CodecProfile type="Audio" codec="mp3">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="320000" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="320000" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles /> <ResponseProfiles />

View File

@ -50,9 +50,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -70,6 +70,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="30720000" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="30720000" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video" codec="mpeg4"> <CodecProfile type="Video" codec="mpeg4">
<Conditions> <Conditions>
@ -78,6 +79,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="8192000" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="8192000" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video" codec="h264"> <CodecProfile type="Video" codec="h264">
<Conditions> <Conditions>
@ -87,6 +89,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="37500000" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="37500000" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video" codec="wmv2,wmv3,vc1"> <CodecProfile type="Video" codec="wmv2,wmv3,vc1">
<Conditions> <Conditions>
@ -95,11 +98,13 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="25600000" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="25600000" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3,wmav2,dca,aac,mp3"> <CodecProfile type="VideoAudio" codec="ac3,wmav2,dca,aac,mp3">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -48,9 +48,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -67,11 +67,13 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3"> <CodecProfile type="VideoAudio" codec="ac3">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles /> <ResponseProfiles />

View File

@ -47,9 +47,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="mpeg2video" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="mpeg2video" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -68,16 +68,19 @@
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3"> <CodecProfile type="VideoAudio" codec="ac3">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="aac"> <CodecProfile type="VideoAudio" codec="aac">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -45,9 +45,9 @@
<DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" /> <DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -66,6 +66,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video" codec="mpeg2video"> <CodecProfile type="Video" codec="mpeg2video">
<Conditions> <Conditions>
@ -74,6 +75,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video"> <CodecProfile type="Video">
<Conditions> <Conditions>
@ -81,22 +83,26 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3"> <CodecProfile type="VideoAudio" codec="ac3">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="aac"> <CodecProfile type="VideoAudio" codec="aac">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
<ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="true" /> <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="mp3,mp2"> <CodecProfile type="VideoAudio" codec="mp3,mp2">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -48,9 +48,9 @@
<DirectPlayProfile container="asf" audioCodec="wmav2,wmapro,wmavoice" type="Audio" /> <DirectPlayProfile container="asf" audioCodec="wmav2,wmapro,wmavoice" type="Audio" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -69,6 +69,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video" codec="mpeg2video"> <CodecProfile type="Video" codec="mpeg2video">
<Conditions> <Conditions>
@ -77,6 +78,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video"> <CodecProfile type="Video">
<Conditions> <Conditions>
@ -84,22 +86,26 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3"> <CodecProfile type="VideoAudio" codec="ac3">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="aac"> <CodecProfile type="VideoAudio" codec="aac">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
<ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="true" /> <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="mp3,mp2"> <CodecProfile type="VideoAudio" codec="mp3,mp2">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -50,9 +50,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -69,16 +69,19 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3"> <CodecProfile type="VideoAudio" codec="ac3">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="mp3,mp2"> <CodecProfile type="VideoAudio" codec="mp3,mp2">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -55,9 +55,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -74,11 +74,13 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="mp3,mp2"> <CodecProfile type="VideoAudio" codec="mp3,mp2">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -55,9 +55,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -74,11 +74,13 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="mp3,mp2"> <CodecProfile type="VideoAudio" codec="mp3,mp2">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -45,9 +45,9 @@
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" /> <DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -66,22 +66,26 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3"> <CodecProfile type="VideoAudio" codec="ac3">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="640000" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="640000" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="wmapro"> <CodecProfile type="VideoAudio" codec="wmapro">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="aac"> <CodecProfile type="VideoAudio" codec="aac">
<Conditions> <Conditions>
<ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="false" /> <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -45,9 +45,9 @@
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" /> <DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -66,22 +66,26 @@
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3"> <CodecProfile type="VideoAudio" codec="ac3">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="640000" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="640000" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="wmapro"> <CodecProfile type="VideoAudio" codec="wmapro">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="aac"> <CodecProfile type="VideoAudio" codec="aac">
<Conditions> <Conditions>
<ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="false" /> <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -40,9 +40,9 @@
<DirectPlayProfile container="" type="Photo" /> <DirectPlayProfile container="" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles /> <CodecProfiles />

View File

@ -51,9 +51,9 @@
<DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" /> <DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Photo"> <ContainerProfile type="Photo">
@ -70,11 +70,13 @@
<ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="aac"> <CodecProfile type="VideoAudio" codec="aac">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -46,9 +46,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="asf" type="Video" videoCodec="wmv2" audioCodec="wmav2" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Bytes" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="asf" type="Video" videoCodec="wmv2" audioCodec="wmav2" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Bytes" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Video" container="mp4,mov"> <ContainerProfile type="Video" container="mp4,mov">
@ -71,6 +71,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="5120000" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="5120000" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video" codec="h264"> <CodecProfile type="Video" codec="h264">
<Conditions> <Conditions>
@ -79,6 +80,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="10240000" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="10240000" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video" codec="wmv2,wmv3,vc1"> <CodecProfile type="Video" codec="wmv2,wmv3,vc1">
<Conditions> <Conditions>
@ -87,17 +89,20 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3,wmav2,wmapro"> <CodecProfile type="VideoAudio" codec="ac3,wmav2,wmapro">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="aac"> <CodecProfile type="VideoAudio" codec="aac">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
<ProfileCondition condition="Equals" property="AudioProfile" value="lc" isRequired="false" /> <ProfileCondition condition="Equals" property="AudioProfile" value="lc" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -46,9 +46,9 @@
<DirectPlayProfile container="jpeg" type="Photo" /> <DirectPlayProfile container="jpeg" type="Photo" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" videoCodec="jpeg" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" videoCodec="jpeg" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles> <ContainerProfiles>
<ContainerProfile type="Video" container="mp4,mov"> <ContainerProfile type="Video" container="mp4,mov">
@ -67,6 +67,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="5120000" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="5120000" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video" codec="h264"> <CodecProfile type="Video" codec="h264">
<Conditions> <Conditions>
@ -77,6 +78,7 @@
<ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
<ProfileCondition condition="EqualsAny" property="VideoProfile" value="high|main|baseline|constrained baseline" isRequired="false" /> <ProfileCondition condition="EqualsAny" property="VideoProfile" value="high|main|baseline|constrained baseline" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video" codec="wmv2,wmv3,vc1"> <CodecProfile type="Video" codec="wmv2,wmv3,vc1">
<Conditions> <Conditions>
@ -87,23 +89,27 @@
<ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="Video"> <CodecProfile type="Video">
<Conditions> <Conditions>
<ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" /> <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
<ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="ac3,wmav2,wmapro"> <CodecProfile type="VideoAudio" codec="ac3,wmav2,wmapro">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
<CodecProfile type="VideoAudio" codec="aac"> <CodecProfile type="VideoAudio" codec="aac">
<Conditions> <Conditions>
<ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" /> <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
<ProfileCondition condition="Equals" property="AudioProfile" value="lc" isRequired="false" /> <ProfileCondition condition="Equals" property="AudioProfile" value="lc" isRequired="false" />
</Conditions> </Conditions>
<ApplyConditions />
</CodecProfile> </CodecProfile>
</CodecProfiles> </CodecProfiles>
<ResponseProfiles> <ResponseProfiles>

View File

@ -43,9 +43,9 @@
<DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" /> <DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
</DirectPlayProfiles> </DirectPlayProfiles>
<TranscodingProfiles> <TranscodingProfiles>
<TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
<TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" /> <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
</TranscodingProfiles> </TranscodingProfiles>
<ContainerProfiles /> <ContainerProfiles />
<CodecProfiles /> <CodecProfiles />

View File

@ -6,7 +6,6 @@ using MediaBrowser.Controller.Dlna;
using MediaBrowser.Dlna.Server; using MediaBrowser.Dlna.Server;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using System; using System;
using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;

View File

@ -1,6 +1,5 @@
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using System;
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -65,7 +65,7 @@ namespace MediaBrowser.LocalMetadata.Savers
var xmlFilePath = GetSavePath(item); var xmlFilePath = GetSavePath(item);
XmlSaverHelpers.Save(builder, xmlFilePath, new List<string> { }, _config, _fileSystem); XmlSaverHelpers.Save(builder, xmlFilePath, new List<string>(), _config, _fileSystem);
} }
/// <summary> /// <summary>

View File

@ -79,7 +79,7 @@ namespace MediaBrowser.LocalMetadata.Savers
var xmlFilePath = GetSavePath(item); var xmlFilePath = GetSavePath(item);
XmlSaverHelpers.Save(builder, xmlFilePath, new List<string> { }, _config, _fileSystem); XmlSaverHelpers.Save(builder, xmlFilePath, new List<string>(), _config, _fileSystem);
} }
/// <summary> /// <summary>

View File

@ -72,7 +72,7 @@ namespace MediaBrowser.LocalMetadata.Savers
var xmlFilePath = GetSavePath(item); var xmlFilePath = GetSavePath(item);
XmlSaverHelpers.Save(builder, xmlFilePath, new List<string> { }, _config, _fileSystem); XmlSaverHelpers.Save(builder, xmlFilePath, new List<string>(), _config, _fileSystem);
} }
/// <summary> /// <summary>

View File

@ -40,7 +40,7 @@ namespace MediaBrowser.MediaEncoding.BdInfo
outputStream.RunTimeTicks = TimeSpan.FromSeconds(playlist.TotalLength).Ticks; outputStream.RunTimeTicks = TimeSpan.FromSeconds(playlist.TotalLength).Ticks;
var mediaStreams = new List<MediaStream> { }; var mediaStreams = new List<MediaStream>();
foreach (var stream in playlist.SortedStreams) foreach (var stream in playlist.SortedStreams)
{ {

View File

@ -1,7 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.IO;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
namespace MediaBrowser.MediaEncoding.Encoder namespace MediaBrowser.MediaEncoding.Encoder

View File

@ -500,7 +500,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
// Must consume both or ffmpeg may hang due to deadlocks. See comments below. // Must consume both or ffmpeg may hang due to deadlocks. See comments below.
RedirectStandardOutput = true, RedirectStandardOutput = true,
//RedirectStandardError = true, //RedirectStandardError = true,
RedirectStandardInput = true, RedirectStandardInput = false,
FileName = FFProbePath, FileName = FFProbePath,
Arguments = string.Format(args, Arguments = string.Format(args,
probeSizeArgument, inputPath).Trim(), probeSizeArgument, inputPath).Trim(),
@ -514,7 +514,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
_logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments); _logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
using (var processWrapper = new ProcessWrapper(process, this, _logger)) using (var processWrapper = new ProcessWrapper(process, this, _logger, false))
{ {
await _ffProbeResourcePool.WaitAsync(cancellationToken).ConfigureAwait(false); await _ffProbeResourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
@ -630,7 +630,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
// Must consume both or ffmpeg may hang due to deadlocks. See comments below. // Must consume both or ffmpeg may hang due to deadlocks. See comments below.
//RedirectStandardOutput = true, //RedirectStandardOutput = true,
RedirectStandardError = true, RedirectStandardError = true,
RedirectStandardInput = true, RedirectStandardInput = false,
FileName = FFMpegPath, FileName = FFMpegPath,
Arguments = string.Format(args, probeSizeArgument, inputPath, videoStream.Index.ToString(CultureInfo.InvariantCulture)).Trim(), Arguments = string.Format(args, probeSizeArgument, inputPath, videoStream.Index.ToString(CultureInfo.InvariantCulture)).Trim(),
@ -644,7 +644,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
_logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments); _logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
var idetFoundInterlaced = false; var idetFoundInterlaced = false;
using (var processWrapper = new ProcessWrapper(process, this, _logger)) using (var processWrapper = new ProcessWrapper(process, this, _logger, false))
{ {
try try
{ {
@ -898,14 +898,13 @@ namespace MediaBrowser.MediaEncoding.Encoder
FileName = FFMpegPath, FileName = FFMpegPath,
Arguments = args, Arguments = args,
WindowStyle = ProcessWindowStyle.Hidden, WindowStyle = ProcessWindowStyle.Hidden,
ErrorDialog = false, ErrorDialog = false
RedirectStandardInput = true
} }
}; };
_logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments); _logger.Debug("{0} {1}", process.StartInfo.FileName, process.StartInfo.Arguments);
using (var processWrapper = new ProcessWrapper(process, this, _logger)) using (var processWrapper = new ProcessWrapper(process, this, _logger, false))
{ {
await resourcePool.WaitAsync(cancellationToken).ConfigureAwait(false); await resourcePool.WaitAsync(cancellationToken).ConfigureAwait(false);
@ -1010,7 +1009,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
bool ranToCompletion = false; bool ranToCompletion = false;
using (var processWrapper = new ProcessWrapper(process, this, _logger)) using (var processWrapper = new ProcessWrapper(process, this, _logger, true))
{ {
try try
{ {
@ -1118,6 +1117,8 @@ namespace MediaBrowser.MediaEncoding.Encoder
{ {
_logger.Info("Killing ffmpeg process"); _logger.Info("Killing ffmpeg process");
if (process.IsRedirectingStdin)
{
try try
{ {
process.Process.StandardInput.WriteLine("q"); process.Process.StandardInput.WriteLine("q");
@ -1126,6 +1127,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
{ {
_logger.Error("Error sending q command to process"); _logger.Error("Error sending q command to process");
} }
}
try try
{ {
@ -1201,13 +1203,15 @@ namespace MediaBrowser.MediaEncoding.Encoder
public int? ExitCode; public int? ExitCode;
private readonly MediaEncoder _mediaEncoder; private readonly MediaEncoder _mediaEncoder;
private readonly ILogger _logger; private readonly ILogger _logger;
public bool IsRedirectingStdin { get; private set; }
public ProcessWrapper(Process process, MediaEncoder mediaEncoder, ILogger logger) public ProcessWrapper(Process process, MediaEncoder mediaEncoder, ILogger logger, bool isRedirectingStdin)
{ {
Process = process; Process = process;
_mediaEncoder = mediaEncoder; _mediaEncoder = mediaEncoder;
_logger = logger; _logger = logger;
Process.Exited += Process_Exited; Process.Exited += Process_Exited;
IsRedirectingStdin = isRedirectingStdin;
} }
void Process_Exited(object sender, EventArgs e) void Process_Exited(object sender, EventArgs e)
@ -1220,7 +1224,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
{ {
ExitCode = process.ExitCode; ExitCode = process.ExitCode;
} }
catch (Exception ex) catch
{ {
} }
@ -1229,11 +1233,16 @@ namespace MediaBrowser.MediaEncoding.Encoder
_mediaEncoder._runningProcesses.Remove(this); _mediaEncoder._runningProcesses.Remove(this);
} }
DisposeProcess(process);
}
private void DisposeProcess(Process process)
{
try try
{ {
process.Dispose(); process.Dispose();
} }
catch (Exception ex) catch
{ {
} }
} }
@ -1249,7 +1258,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
if (Process != null) if (Process != null)
{ {
Process.Exited -= Process_Exited; Process.Exited -= Process_Exited;
Process.Dispose(); DisposeProcess(Process);
} }
} }

View File

@ -600,18 +600,22 @@ namespace MediaBrowser.Model.Dlna
{ {
defaultBitrate = 192000; defaultBitrate = 192000;
} }
if (!string.IsNullOrEmpty(targetAudioCodec) && audioStream != null && StringHelper.EqualsIgnoreCase(audioStream.Codec, targetAudioCodec))
{
defaultBitrate = audioStream.BitRate ?? defaultBitrate;
}
if (targetAudioChannels.HasValue) if (targetAudioChannels.HasValue)
{ {
if (targetAudioChannels.Value >= 5 && (maxTotalBitrate ?? 0) >= 2000000) if (targetAudioChannels.Value >= 5 && (maxTotalBitrate ?? 0) >= 1500000)
{ {
if (StringHelper.EqualsIgnoreCase(targetAudioCodec, "ac3")) if (StringHelper.EqualsIgnoreCase(targetAudioCodec, "ac3"))
{ {
defaultBitrate = 448000; defaultBitrate = Math.Max(448000, defaultBitrate);
} }
else else
{ {
defaultBitrate = 320000; defaultBitrate = Math.Max(320000, defaultBitrate);
} }
} }
} }

View File

@ -7,7 +7,6 @@ using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Sync; using MediaBrowser.Model.Sync;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.Serialization; using System.Runtime.Serialization;

View File

@ -1,5 +1,4 @@
using System.ComponentModel; using System.Diagnostics;
using System.Diagnostics;
using System.Runtime.Serialization; using System.Runtime.Serialization;
namespace MediaBrowser.Model.Dto namespace MediaBrowser.Model.Dto

View File

@ -7,6 +7,7 @@ namespace MediaBrowser.Model.Dto
string Id { get; } string Id { get; }
bool? SupportsSync { get; set; } bool? SupportsSync { get; set; }
bool? HasSyncJob { get; set; } bool? HasSyncJob { get; set; }
double? SyncPercent { get; set; }
bool? IsSynced { get; set; } bool? IsSynced { get; set; }
SyncJobItemStatus? SyncStatus { get; set; } SyncJobItemStatus? SyncStatus { get; set; }
} }

View File

@ -2,7 +2,6 @@
using MediaBrowser.Model.Connect; using MediaBrowser.Model.Connect;
using MediaBrowser.Model.Users; using MediaBrowser.Model.Users;
using System; using System;
using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.Serialization; using System.Runtime.Serialization;

View File

@ -1,5 +1,4 @@
using System; using System;
using System.ComponentModel;
namespace MediaBrowser.Model.Dto namespace MediaBrowser.Model.Dto
{ {

View File

@ -2,7 +2,6 @@
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Library; using MediaBrowser.Model.Library;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.Serialization; using System.Runtime.Serialization;

View File

@ -219,6 +219,7 @@
/// </summary> /// </summary>
Studios, Studios,
BasicSyncInfo,
/// <summary> /// <summary>
/// The synchronize information /// The synchronize information
/// </summary> /// </summary>

View File

@ -1,7 +1,6 @@
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
namespace MediaBrowser.Model.Session namespace MediaBrowser.Model.Session

View File

@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommonIO; using CommonIO;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;

View File

@ -138,7 +138,7 @@ namespace MediaBrowser.Providers.Manager
} }
} }
var isFirstRefresh = GetLastRefreshDate(item) == default(DateTime); var isFirstRefresh = item.DateLastRefreshed == default(DateTime);
var beforeSaveResult = await BeforeSave(itemOfType, isFirstRefresh || refreshOptions.ReplaceAllMetadata || refreshOptions.MetadataRefreshMode == MetadataRefreshMode.FullRefresh || requiresRefresh, updateType).ConfigureAwait(false); var beforeSaveResult = await BeforeSave(itemOfType, isFirstRefresh || refreshOptions.ReplaceAllMetadata || refreshOptions.MetadataRefreshMode == MetadataRefreshMode.FullRefresh || requiresRefresh, updateType).ConfigureAwait(false);
updateType = updateType | beforeSaveResult; updateType = updateType | beforeSaveResult;
@ -193,11 +193,6 @@ namespace MediaBrowser.Providers.Manager
lookupInfo.Year = result.ProductionYear; lookupInfo.Year = result.ProductionYear;
} }
private DateTime GetLastRefreshDate(IHasMetadata item)
{
return item.DateLastRefreshed;
}
protected async Task SaveItem(MetadataResult<TItemType> result, ItemUpdateType reason, CancellationToken cancellationToken) protected async Task SaveItem(MetadataResult<TItemType> result, ItemUpdateType reason, CancellationToken cancellationToken)
{ {
if (result.Item.SupportsPeople && result.People != null) if (result.Item.SupportsPeople && result.People != null)
@ -652,7 +647,6 @@ namespace MediaBrowser.Providers.Manager
} }
else else
{ {
refreshResult.Failures++;
Logger.Debug("{0} returned no metadata for {1}", providerName, logName); Logger.Debug("{0} returned no metadata for {1}", providerName, logName);
} }
} }

View File

@ -10,7 +10,6 @@ using MediaBrowser.Model.Logging;
using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.MediaInfo;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -6,7 +6,6 @@ using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Localization; using MediaBrowser.Controller.Localization;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Providers; using MediaBrowser.Model.Providers;

View File

@ -2,7 +2,6 @@
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Providers; using MediaBrowser.Model.Providers;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -6,7 +6,6 @@ using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Dto; using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Providers; using MediaBrowser.Model.Providers;
using MediaBrowser.Providers.TV;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;

View File

@ -10,8 +10,6 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Providers; using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization; using MediaBrowser.Model.Serialization;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -1,5 +1,4 @@
using CommonIO; using CommonIO;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net; using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;

View File

@ -135,9 +135,7 @@ namespace MediaBrowser.Providers.TV
{ {
var directoryService = new DirectoryService(_fileSystem); var directoryService = new DirectoryService(_fileSystem);
await series.RefreshMetadata(new MetadataRefreshOptions(directoryService) await series.RefreshMetadata(new MetadataRefreshOptions(directoryService), cancellationToken).ConfigureAwait(false);
{
}, cancellationToken).ConfigureAwait(false);
await series.ValidateChildren(new Progress<double>(), cancellationToken, new MetadataRefreshOptions(directoryService), true) await series.ValidateChildren(new Progress<double>(), cancellationToken, new MetadataRefreshOptions(directoryService), true)
.ConfigureAwait(false); .ConfigureAwait(false);
@ -438,9 +436,7 @@ namespace MediaBrowser.Providers.TV
await season.AddChild(episode, cancellationToken).ConfigureAwait(false); await season.AddChild(episode, cancellationToken).ConfigureAwait(false);
await episode.RefreshMetadata(new MetadataRefreshOptions(_fileSystem) await episode.RefreshMetadata(new MetadataRefreshOptions(_fileSystem), cancellationToken).ConfigureAwait(false);
{
}, cancellationToken).ConfigureAwait(false);
} }
/// <summary> /// <summary>

View File

@ -10,7 +10,6 @@ using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization; using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.Omdb; using MediaBrowser.Providers.Omdb;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -14,7 +14,6 @@ using CommonIO;
using MediaBrowser.Common.ScheduledTasks; using MediaBrowser.Common.ScheduledTasks;
using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Plugins; using MediaBrowser.Controller.Plugins;
using MediaBrowser.Model.Tasks;
namespace MediaBrowser.Providers.TV namespace MediaBrowser.Providers.TV
{ {

View File

@ -6,7 +6,6 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Providers; using MediaBrowser.Model.Providers;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;

View File

@ -5,7 +5,6 @@ using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities; using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO; using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;

View File

@ -657,7 +657,7 @@ namespace MediaBrowser.Server.Implementations.Channels
_logger.ErrorException("Error getting all media from {0}", ex, i.Name); _logger.ErrorException("Error getting all media from {0}", ex, i.Name);
} }
} }
return new Tuple<IChannel, ChannelItemResult>(i, new ChannelItemResult { }); return new Tuple<IChannel, ChannelItemResult>(i, new ChannelItemResult());
}); });
var results = await Task.WhenAll(tasks).ConfigureAwait(false); var results = await Task.WhenAll(tasks).ConfigureAwait(false);
@ -811,7 +811,7 @@ namespace MediaBrowser.Server.Implementations.Channels
_logger.ErrorException("Error getting all media from {0}", ex, i.Name); _logger.ErrorException("Error getting all media from {0}", ex, i.Name);
} }
} }
return new Tuple<IChannel, ChannelItemResult>(i, new ChannelItemResult { }); return new Tuple<IChannel, ChannelItemResult>(i, new ChannelItemResult());
}); });
var results = await Task.WhenAll(tasks).ConfigureAwait(false); var results = await Task.WhenAll(tasks).ConfigureAwait(false);

View File

@ -11,7 +11,6 @@ using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Persistence; using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Playlists;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Controller.Sync; using MediaBrowser.Controller.Sync;
using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Drawing;
@ -98,16 +97,15 @@ namespace MediaBrowser.Server.Implementations.Dto
throw new ArgumentNullException("options"); throw new ArgumentNullException("options");
} }
var syncJobItems = GetSyncedItemProgress(options); var syncDictionary = GetSyncedItemProgress(options);
var syncDictionary = GetSyncedItemProgressDictionary(syncJobItems);
var list = new List<BaseItemDto>(); var list = new List<BaseItemDto>();
var programTuples = new List<Tuple<BaseItem, BaseItemDto>> { }; var programTuples = new List<Tuple<BaseItem, BaseItemDto>>();
var channelTuples = new List<Tuple<BaseItemDto, LiveTvChannel>> { }; var channelTuples = new List<Tuple<BaseItemDto, LiveTvChannel>>();
foreach (var item in items) foreach (var item in items)
{ {
var dto = await GetBaseItemDtoInternal(item, options, syncDictionary, user, owner).ConfigureAwait(false); var dto = await GetBaseItemDtoInternal(item, options, user, owner).ConfigureAwait(false);
var tvChannel = item as LiveTvChannel; var tvChannel = item as LiveTvChannel;
if (tvChannel != null) if (tvChannel != null)
@ -134,7 +132,7 @@ namespace MediaBrowser.Server.Implementations.Dto
} }
} }
FillSyncInfo(dto, item, syncJobItems, options, user); FillSyncInfo(dto, item, options, user, syncDictionary);
list.Add(dto); list.Add(dto);
} }
@ -152,23 +150,11 @@ namespace MediaBrowser.Server.Implementations.Dto
return list; return list;
} }
private Dictionary<string, SyncedItemProgress> GetSyncedItemProgressDictionary(IEnumerable<SyncedItemProgress> items)
{
var dict = new Dictionary<string, SyncedItemProgress>();
foreach (var item in items)
{
dict[item.ItemId] = item;
}
return dict;
}
public BaseItemDto GetBaseItemDto(BaseItem item, DtoOptions options, User user = null, BaseItem owner = null) public BaseItemDto GetBaseItemDto(BaseItem item, DtoOptions options, User user = null, BaseItem owner = null)
{ {
var syncProgress = GetSyncedItemProgress(options); var syncDictionary = GetSyncedItemProgress(options);
var dto = GetBaseItemDtoInternal(item, options, GetSyncedItemProgressDictionary(syncProgress), user, owner).Result; var dto = GetBaseItemDtoInternal(item, options, user, owner).Result;
var tvChannel = item as LiveTvChannel; var tvChannel = item as LiveTvChannel;
if (tvChannel != null) if (tvChannel != null)
{ {
@ -191,11 +177,11 @@ namespace MediaBrowser.Server.Implementations.Dto
SetItemByNameInfo(item, dto, GetTaggedItems(byName, user), user); SetItemByNameInfo(item, dto, GetTaggedItems(byName, user), user);
} }
FillSyncInfo(dto, item, options, user, syncProgress); FillSyncInfo(dto, item, options, user, syncDictionary);
return dto; return dto;
} }
FillSyncInfo(dto, item, options, user, syncProgress); FillSyncInfo(dto, item, options, user, syncDictionary);
return dto; return dto;
} }
@ -211,23 +197,24 @@ namespace MediaBrowser.Server.Implementations.Dto
return items; return items;
} }
private SyncedItemProgress[] GetSyncedItemProgress(DtoOptions options) public Dictionary<string, SyncedItemProgress> GetSyncedItemProgress(DtoOptions options)
{ {
if (!options.Fields.Contains(ItemFields.SyncInfo)) if (!options.Fields.Contains(ItemFields.BasicSyncInfo) &&
!options.Fields.Contains(ItemFields.SyncInfo))
{ {
return new SyncedItemProgress[] { }; return new Dictionary<string, SyncedItemProgress>();
} }
var deviceId = options.DeviceId; var deviceId = options.DeviceId;
if (string.IsNullOrWhiteSpace(deviceId)) if (string.IsNullOrWhiteSpace(deviceId))
{ {
return new SyncedItemProgress[] { }; return new Dictionary<string, SyncedItemProgress>();
} }
var caps = _deviceManager().GetCapabilities(deviceId); var caps = _deviceManager().GetCapabilities(deviceId);
if (caps == null || !caps.SupportsSync) if (caps == null || !caps.SupportsSync)
{ {
return new SyncedItemProgress[] { }; return new Dictionary<string, SyncedItemProgress>();
} }
return _syncManager.GetSyncedItemProgresses(new SyncJobItemQuery return _syncManager.GetSyncedItemProgresses(new SyncJobItemQuery
@ -241,12 +228,13 @@ namespace MediaBrowser.Server.Implementations.Dto
SyncJobItemStatus.ReadyToTransfer, SyncJobItemStatus.ReadyToTransfer,
SyncJobItemStatus.Synced SyncJobItemStatus.Synced
} }
}).Items; });
} }
public void FillSyncInfo(IEnumerable<Tuple<BaseItem, BaseItemDto>> tuples, DtoOptions options, User user) public void FillSyncInfo(IEnumerable<Tuple<BaseItem, BaseItemDto>> tuples, DtoOptions options, User user)
{ {
if (options.Fields.Contains(ItemFields.SyncInfo)) if (options.Fields.Contains(ItemFields.BasicSyncInfo) ||
options.Fields.Contains(ItemFields.SyncInfo))
{ {
var syncProgress = GetSyncedItemProgress(options); var syncProgress = GetSyncedItemProgress(options);
@ -254,62 +242,45 @@ namespace MediaBrowser.Server.Implementations.Dto
{ {
var item = tuple.Item1; var item = tuple.Item1;
FillSyncInfo(tuple.Item2, item, syncProgress, options, user); FillSyncInfo(tuple.Item2, item, options, user, syncProgress);
} }
} }
} }
private void FillSyncInfo(IHasSyncInfo dto, BaseItem item, DtoOptions options, User user, SyncedItemProgress[] syncProgress) private void FillSyncInfo(IHasSyncInfo dto, BaseItem item, DtoOptions options, User user, Dictionary<string, SyncedItemProgress> syncProgress)
{ {
if (options.Fields.Contains(ItemFields.SyncInfo)) var hasFullSyncInfo = options.Fields.Contains(ItemFields.SyncInfo);
if (!options.Fields.Contains(ItemFields.BasicSyncInfo) &&
!hasFullSyncInfo)
{ {
var userCanSync = user != null && user.Policy.EnableSync; return;
dto.SupportsSync = userCanSync && _syncManager.SupportsSync(item);
} }
if (dto.SupportsSync ?? false) if (dto.SupportsSync ?? false)
{ {
dto.HasSyncJob = syncProgress.Any(i => i.Status != SyncJobItemStatus.Synced && string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase)); SyncedItemProgress syncStatus;
dto.IsSynced = syncProgress.Any(i => i.Status == SyncJobItemStatus.Synced && string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase)); if (syncProgress.TryGetValue(dto.Id, out syncStatus))
if (dto.IsSynced.Value)
{ {
dto.SyncStatus = SyncJobItemStatus.Synced; if (syncStatus.Status == SyncJobItemStatus.Synced)
{
dto.SyncPercent = 100;
}
else
{
dto.SyncPercent = syncStatus.Progress;
} }
else if (dto.HasSyncJob.Value) if (hasFullSyncInfo)
{ {
dto.SyncStatus = syncProgress.Where(i => string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase)).Select(i => i.Status).Max(); dto.HasSyncJob = true;
dto.SyncStatus = syncStatus.Status;
}
} }
} }
} }
private void FillSyncInfo(IHasSyncInfo dto, BaseItem item, SyncedItemProgress[] syncProgress, DtoOptions options, User user) private async Task<BaseItemDto> GetBaseItemDtoInternal(BaseItem item, DtoOptions options, User user = null, BaseItem owner = null)
{
if (options.Fields.Contains(ItemFields.SyncInfo))
{
var userCanSync = user != null && user.Policy.EnableSync;
dto.SupportsSync = userCanSync && _syncManager.SupportsSync(item);
}
if (dto.SupportsSync ?? false)
{
dto.HasSyncJob = syncProgress.Any(i => i.Status != SyncJobItemStatus.Synced && string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase));
dto.IsSynced = syncProgress.Any(i => i.Status == SyncJobItemStatus.Synced && string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase));
if (dto.IsSynced.Value)
{
dto.SyncStatus = SyncJobItemStatus.Synced;
}
else if (dto.HasSyncJob.Value)
{
dto.SyncStatus = syncProgress.Where(i => string.Equals(i.ItemId, dto.Id, StringComparison.OrdinalIgnoreCase)).Select(i => i.Status).Max();
}
}
}
private async Task<BaseItemDto> GetBaseItemDtoInternal(BaseItem item, DtoOptions options, Dictionary<string, SyncedItemProgress> syncProgress, User user = null, BaseItem owner = null)
{ {
var fields = options.Fields; var fields = options.Fields;
@ -358,7 +329,7 @@ namespace MediaBrowser.Server.Implementations.Dto
if (user != null) if (user != null)
{ {
await AttachUserSpecificInfo(dto, item, user, fields, syncProgress).ConfigureAwait(false); await AttachUserSpecificInfo(dto, item, user, fields).ConfigureAwait(false);
} }
var hasMediaSources = item as IHasMediaSources; var hasMediaSources = item as IHasMediaSources;
@ -421,11 +392,9 @@ namespace MediaBrowser.Server.Implementations.Dto
return dto; return dto;
} }
public BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, User user = null) public BaseItemDto GetItemByNameDto(BaseItem item, DtoOptions options, List<BaseItem> taggedItems, Dictionary<string, SyncedItemProgress> syncProgress, User user = null)
{ {
var syncProgress = GetSyncedItemProgress(options); var dto = GetBaseItemDtoInternal(item, options, user).Result;
var dto = GetBaseItemDtoInternal(item, options, GetSyncedItemProgressDictionary(syncProgress), user).Result;
if (taggedItems != null && options.Fields.Contains(ItemFields.ItemCounts)) if (taggedItems != null && options.Fields.Contains(ItemFields.ItemCounts))
{ {
@ -473,28 +442,13 @@ namespace MediaBrowser.Server.Implementations.Dto
/// <param name="item">The item.</param> /// <param name="item">The item.</param>
/// <param name="user">The user.</param> /// <param name="user">The user.</param>
/// <param name="fields">The fields.</param> /// <param name="fields">The fields.</param>
/// <param name="syncProgress">The synchronize progress.</param> private async Task AttachUserSpecificInfo(BaseItemDto dto, BaseItem item, User user, List<ItemFields> fields)
private async Task AttachUserSpecificInfo(BaseItemDto dto, BaseItem item, User user, List<ItemFields> fields, Dictionary<string, SyncedItemProgress> syncProgress)
{ {
if (item.IsFolder) if (item.IsFolder)
{ {
var folder = (Folder)item; var folder = (Folder)item;
if (item.SourceType == SourceType.Library && folder.SupportsUserDataFromChildren && fields.Contains(ItemFields.SyncInfo))
{
// Skip the user data manager because we've already looped through the recursive tree and don't want to do it twice
// TODO: Improve in future
dto.UserData = GetUserItemDataDto(_userDataRepository.GetUserData(user, item));
await SetSpecialCounts(folder, user, dto, fields, syncProgress).ConfigureAwait(false);
dto.UserData.Played = dto.UserData.PlayedPercentage.HasValue &&
dto.UserData.PlayedPercentage.Value >= 100;
}
else
{
dto.UserData = await _userDataRepository.GetUserDataDto(item, dto, user).ConfigureAwait(false); dto.UserData = await _userDataRepository.GetUserDataDto(item, dto, user).ConfigureAwait(false);
}
if (item.SourceType == SourceType.Library) if (item.SourceType == SourceType.Library)
{ {
@ -519,6 +473,12 @@ namespace MediaBrowser.Server.Implementations.Dto
dto.PlayAccess = item.GetPlayAccess(user); dto.PlayAccess = item.GetPlayAccess(user);
if (fields.Contains(ItemFields.BasicSyncInfo) || fields.Contains(ItemFields.SyncInfo))
{
var userCanSync = user != null && user.Policy.EnableSync;
dto.SupportsSync = userCanSync && _syncManager.SupportsSync(item);
}
if (fields.Contains(ItemFields.SeasonUserData)) if (fields.Contains(ItemFields.SeasonUserData))
{ {
var episode = item as Episode; var episode = item as Episode;
@ -1552,7 +1512,7 @@ namespace MediaBrowser.Server.Implementations.Dto
/// <param name="fields">The fields.</param> /// <param name="fields">The fields.</param>
/// <param name="syncProgress">The synchronize progress.</param> /// <param name="syncProgress">The synchronize progress.</param>
/// <returns>Task.</returns> /// <returns>Task.</returns>
private async Task SetSpecialCounts(Folder folder, User user, BaseItemDto dto, List<ItemFields> fields, Dictionary<string, SyncedItemProgress> syncProgress) private async Task SetSpecialCounts(Folder folder, User user, BaseItemDto dto, List<ItemFields> fields, Dictionary<string, SyncJobItemStatus> syncProgress)
{ {
var recursiveItemCount = 0; var recursiveItemCount = 0;
var unplayed = 0; var unplayed = 0;
@ -1601,10 +1561,10 @@ namespace MediaBrowser.Server.Implementations.Dto
} }
double percent = 0; double percent = 0;
SyncedItemProgress syncItemProgress; SyncJobItemStatus syncItemProgress;
if (syncProgress.TryGetValue(child.Id.ToString("N"), out syncItemProgress)) if (syncProgress.TryGetValue(child.Id.ToString("N"), out syncItemProgress))
{ {
switch (syncItemProgress.Status) switch (syncItemProgress)
{ {
case SyncJobItemStatus.Synced: case SyncJobItemStatus.Synced:
percent = 100; percent = 100;

View File

@ -7,9 +7,7 @@ using Mono.Nat;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO;
using System.Net; using System.Net;
using System.Text;
using MediaBrowser.Common.Threading; using MediaBrowser.Common.Threading;
namespace MediaBrowser.Server.Implementations.EntryPoints namespace MediaBrowser.Server.Implementations.EntryPoints

View File

@ -1,9 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Plugins; using MediaBrowser.Controller.Plugins;

View File

@ -67,6 +67,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
public override void Configure(Container container) public override void Configure(Container container)
{ {
HostConfig.Instance.DefaultRedirectPath = DefaultRedirectPath; HostConfig.Instance.DefaultRedirectPath = DefaultRedirectPath;
HostConfig.Instance.LogUnobservedTaskExceptions = false;
HostConfig.Instance.MapExceptionToStatusCode = new Dictionary<Type, int> HostConfig.Instance.MapExceptionToStatusCode = new Dictionary<Type, int>
{ {
@ -80,7 +81,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
{typeof (ApplicationException), 500} {typeof (ApplicationException), 500}
}; };
HostConfig.Instance.DebugMode = true; HostConfig.Instance.DebugMode = false;
HostConfig.Instance.LogFactory = LogManager.LogFactory; HostConfig.Instance.LogFactory = LogManager.LogFactory;

View File

@ -5,14 +5,12 @@ using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Plugins; using MediaBrowser.Controller.Plugins;
using MediaBrowser.Model.Configuration; using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using MediaBrowser.Server.Implementations.ScheduledTasks;
using Microsoft.Win32; using Microsoft.Win32;
using System; using System;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using CommonIO; using CommonIO;
using MediaBrowser.Controller; using MediaBrowser.Controller;

View File

@ -2605,13 +2605,6 @@ namespace MediaBrowser.Server.Implementations.Library
return ItemRepository.GetPeopleNames(query); return ItemRepository.GetPeopleNames(query);
} }
public List<PersonInfo> GetAllPeople()
{
return GetPeople(new InternalPeopleQuery())
.DistinctBy(i => i.Name, StringComparer.OrdinalIgnoreCase)
.ToList();
}
public Task UpdatePeople(BaseItem item, List<PersonInfo> people) public Task UpdatePeople(BaseItem item, List<PersonInfo> people)
{ {
if (!item.SupportsPeople) if (!item.SupportsPeople)

Some files were not shown because too many files have changed in this diff Show More