add GenreItems property
This commit is contained in:
parent
72f120d854
commit
47fc7c6aee
|
@ -212,6 +212,11 @@ namespace Emby.Drawing.Skia
|
||||||
|
|
||||||
var resultBitmap = SKBitmap.Decode(path);
|
var resultBitmap = SKBitmap.Decode(path);
|
||||||
|
|
||||||
|
if (resultBitmap == null)
|
||||||
|
{
|
||||||
|
return Decode(path, true);
|
||||||
|
}
|
||||||
|
|
||||||
// If we have to resize these they often end up distorted
|
// If we have to resize these they often end up distorted
|
||||||
if (resultBitmap.ColorType == SKColorType.Gray8)
|
if (resultBitmap.ColorType == SKColorType.Gray8)
|
||||||
{
|
{
|
||||||
|
|
|
@ -241,7 +241,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
AddColumn(db, "TypedBaseItems", "InheritedTags", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "InheritedTags", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "CleanName", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "CleanName", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "PresentationUniqueKey", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "PresentationUniqueKey", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "SlugName", "Text", existingColumnNames);
|
|
||||||
AddColumn(db, "TypedBaseItems", "OriginalTitle", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "OriginalTitle", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "PrimaryVersionId", "Text", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "PrimaryVersionId", "Text", existingColumnNames);
|
||||||
AddColumn(db, "TypedBaseItems", "DateLastMediaAdded", "DATETIME", existingColumnNames);
|
AddColumn(db, "TypedBaseItems", "DateLastMediaAdded", "DATETIME", existingColumnNames);
|
||||||
|
@ -573,7 +572,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
"InheritedTags",
|
"InheritedTags",
|
||||||
"CleanName",
|
"CleanName",
|
||||||
"PresentationUniqueKey",
|
"PresentationUniqueKey",
|
||||||
"SlugName",
|
|
||||||
"OriginalTitle",
|
"OriginalTitle",
|
||||||
"PrimaryVersionId",
|
"PrimaryVersionId",
|
||||||
"DateLastMediaAdded",
|
"DateLastMediaAdded",
|
||||||
|
@ -950,7 +948,6 @@ namespace Emby.Server.Implementations.Data
|
||||||
}
|
}
|
||||||
|
|
||||||
saveItemStatement.TryBind("@PresentationUniqueKey", item.PresentationUniqueKey);
|
saveItemStatement.TryBind("@PresentationUniqueKey", item.PresentationUniqueKey);
|
||||||
saveItemStatement.TryBind("@SlugName", item.SlugName);
|
|
||||||
saveItemStatement.TryBind("@OriginalTitle", item.OriginalTitle);
|
saveItemStatement.TryBind("@OriginalTitle", item.OriginalTitle);
|
||||||
|
|
||||||
var video = item as Video;
|
var video = item as Video;
|
||||||
|
@ -3665,10 +3662,10 @@ namespace Emby.Server.Implementations.Data
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(query.SlugName))
|
if (!string.IsNullOrWhiteSpace(query.SlugName))
|
||||||
{
|
{
|
||||||
whereClauses.Add("SlugName=@SlugName");
|
whereClauses.Add("CleanName=@SlugName");
|
||||||
if (statement != null)
|
if (statement != null)
|
||||||
{
|
{
|
||||||
statement.TryBind("@SlugName", query.SlugName);
|
statement.TryBind("@SlugName", GetCleanValue(query.SlugName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -751,45 +751,41 @@ namespace Emby.Server.Implementations.Dto
|
||||||
/// <returns>Task.</returns>
|
/// <returns>Task.</returns>
|
||||||
private void AttachStudios(BaseItemDto dto, BaseItem item)
|
private void AttachStudios(BaseItemDto dto, BaseItem item)
|
||||||
{
|
{
|
||||||
var studios = item.Studios.ToList();
|
dto.Studios = item.Studios
|
||||||
|
.Where(i => !string.IsNullOrWhiteSpace(i))
|
||||||
|
.Select(i => new NameIdPair
|
||||||
|
{
|
||||||
|
Name = i,
|
||||||
|
Id = _libraryManager.GetStudioId(i).ToString("N")
|
||||||
|
})
|
||||||
|
.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
dto.Studios = new StudioDto[studios.Count];
|
private void AttachGenreItems(BaseItemDto dto, BaseItem item)
|
||||||
|
{
|
||||||
|
dto.GenreItems = item.Genres
|
||||||
|
.Where(i => !string.IsNullOrWhiteSpace(i))
|
||||||
|
.Select(i => new NameIdPair
|
||||||
|
{
|
||||||
|
Name = i,
|
||||||
|
Id = GetStudioId(i, item)
|
||||||
|
})
|
||||||
|
.ToArray();
|
||||||
|
}
|
||||||
|
|
||||||
var dictionary = studios.Distinct(StringComparer.OrdinalIgnoreCase).Select(name =>
|
private string GetStudioId(string name, BaseItem owner)
|
||||||
|
{
|
||||||
|
if (owner is IHasMusicGenres)
|
||||||
{
|
{
|
||||||
try
|
return _libraryManager.GetGameGenreId(name).ToString("N");
|
||||||
{
|
|
||||||
return _libraryManager.GetStudio(name);
|
|
||||||
}
|
|
||||||
catch (IOException ex)
|
|
||||||
{
|
|
||||||
_logger.ErrorException("Error getting studio {0}", ex, name);
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.Where(i => i != null)
|
|
||||||
.DistinctBy(i => i.Name, StringComparer.OrdinalIgnoreCase)
|
|
||||||
.ToDictionary(i => i.Name, StringComparer.OrdinalIgnoreCase);
|
|
||||||
|
|
||||||
for (var i = 0; i < studios.Count; i++)
|
|
||||||
{
|
|
||||||
var studio = studios[i];
|
|
||||||
|
|
||||||
var studioDto = new StudioDto
|
|
||||||
{
|
|
||||||
Name = studio
|
|
||||||
};
|
|
||||||
|
|
||||||
Studio entity;
|
|
||||||
|
|
||||||
if (dictionary.TryGetValue(studio, out entity))
|
|
||||||
{
|
|
||||||
studioDto.Id = entity.Id.ToString("N");
|
|
||||||
studioDto.PrimaryImageTag = GetImageCacheTag(entity, ImageType.Primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
dto.Studios[i] = studioDto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (owner is Game || owner is GameSystem)
|
||||||
|
{
|
||||||
|
return _libraryManager.GetGameGenreId(name).ToString("N");
|
||||||
|
}
|
||||||
|
|
||||||
|
return _libraryManager.GetGenreId(name).ToString("N");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -903,6 +899,11 @@ namespace Emby.Server.Implementations.Dto
|
||||||
dto.Genres = item.Genres;
|
dto.Genres = item.Genres;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fields.Contains(ItemFields.GenreItems))
|
||||||
|
{
|
||||||
|
AttachGenreItems(dto, item);
|
||||||
|
}
|
||||||
|
|
||||||
if (options.EnableImages)
|
if (options.EnableImages)
|
||||||
{
|
{
|
||||||
dto.ImageTags = new Dictionary<ImageType, string>();
|
dto.ImageTags = new Dictionary<ImageType, string>();
|
||||||
|
|
|
@ -895,6 +895,26 @@ namespace Emby.Server.Implementations.Library
|
||||||
return CreateItemByName<Studio>(Studio.GetPath, name);
|
return CreateItemByName<Studio>(Studio.GetPath, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Guid GetStudioId(string name)
|
||||||
|
{
|
||||||
|
return GetItemByNameId<Studio>(Studio.GetPath, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Guid GetGenreId(string name)
|
||||||
|
{
|
||||||
|
return GetItemByNameId<Genre>(Genre.GetPath, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Guid GetMusicGenreId(string name)
|
||||||
|
{
|
||||||
|
return GetItemByNameId<MusicGenre>(MusicGenre.GetPath, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Guid GetGameGenreId(string name)
|
||||||
|
{
|
||||||
|
return GetItemByNameId<GameGenre>(GameGenre.GetPath, name);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a Genre
|
/// Gets a Genre
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -974,14 +994,13 @@ namespace Emby.Server.Implementations.Library
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var path = getPathFn(name);
|
var id = GetItemByNameId<T>(getPathFn, name);
|
||||||
var forceCaseInsensitiveId = ConfigurationManager.Configuration.EnableNormalizedItemByNameIds;
|
|
||||||
var id = GetNewItemIdInternal(path, typeof(T), forceCaseInsensitiveId);
|
|
||||||
|
|
||||||
var item = GetItemById(id) as T;
|
var item = GetItemById(id) as T;
|
||||||
|
|
||||||
if (item == null)
|
if (item == null)
|
||||||
{
|
{
|
||||||
|
var path = getPathFn(name);
|
||||||
item = new T
|
item = new T
|
||||||
{
|
{
|
||||||
Name = name,
|
Name = name,
|
||||||
|
@ -998,6 +1017,14 @@ namespace Emby.Server.Implementations.Library
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Guid GetItemByNameId<T>(Func<string, string> getPathFn, string name)
|
||||||
|
where T : BaseItem, new()
|
||||||
|
{
|
||||||
|
var path = getPathFn(name);
|
||||||
|
var forceCaseInsensitiveId = ConfigurationManager.Configuration.EnableNormalizedItemByNameIds;
|
||||||
|
return GetNewItemIdInternal(path, typeof(T), forceCaseInsensitiveId);
|
||||||
|
}
|
||||||
|
|
||||||
public IEnumerable<MusicArtist> GetAlbumArtists(IEnumerable<IHasAlbumArtist> items)
|
public IEnumerable<MusicArtist> GetAlbumArtists(IEnumerable<IHasAlbumArtist> items)
|
||||||
{
|
{
|
||||||
var names = items
|
var names = items
|
||||||
|
|
|
@ -542,6 +542,12 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||||
var queryStringIndex = Request.RawUrl.IndexOf('?');
|
var queryStringIndex = Request.RawUrl.IndexOf('?');
|
||||||
var queryString = queryStringIndex == -1 ? string.Empty : Request.RawUrl.Substring(queryStringIndex);
|
var queryString = queryStringIndex == -1 ? string.Empty : Request.RawUrl.Substring(queryStringIndex);
|
||||||
|
|
||||||
|
// from universal audio service
|
||||||
|
if (queryString.IndexOf("SegmentContainer", StringComparison.OrdinalIgnoreCase) == -1 && !string.IsNullOrWhiteSpace(state.Request.SegmentContainer))
|
||||||
|
{
|
||||||
|
queryString += "&SegmentContainer=" + state.Request.SegmentContainer;
|
||||||
|
}
|
||||||
|
|
||||||
// Main stream
|
// Main stream
|
||||||
var playlistUrl = isLiveStream ? "live.m3u8" : "main.m3u8";
|
var playlistUrl = isLiveStream ? "live.m3u8" : "main.m3u8";
|
||||||
|
|
||||||
|
@ -918,60 +924,43 @@ namespace MediaBrowser.Api.Playback.Hls
|
||||||
var startNumberParam = isEncoding ? startNumber.ToString(UsCulture) : "0";
|
var startNumberParam = isEncoding ? startNumber.ToString(UsCulture) : "0";
|
||||||
|
|
||||||
var mapArgs = state.IsOutputVideo ? EncodingHelper.GetMapArgs(state) : string.Empty;
|
var mapArgs = state.IsOutputVideo ? EncodingHelper.GetMapArgs(state) : string.Empty;
|
||||||
var useGenericSegmenter = true;
|
|
||||||
|
|
||||||
if (useGenericSegmenter)
|
var outputTsArg = Path.Combine(FileSystem.GetDirectoryName(outputPath), Path.GetFileNameWithoutExtension(outputPath)) + "%d" + GetSegmentFileExtension(state.Request);
|
||||||
|
|
||||||
|
var timeDeltaParam = String.Empty;
|
||||||
|
|
||||||
|
if (isEncoding && startNumber > 0)
|
||||||
{
|
{
|
||||||
var outputTsArg = Path.Combine(FileSystem.GetDirectoryName(outputPath), Path.GetFileNameWithoutExtension(outputPath)) + "%d" + GetSegmentFileExtension(state.Request);
|
var startTime = state.SegmentLength * startNumber;
|
||||||
|
timeDeltaParam = string.Format("-segment_time_delta -{0}", startTime);
|
||||||
var timeDeltaParam = String.Empty;
|
|
||||||
|
|
||||||
if (isEncoding && startNumber > 0)
|
|
||||||
{
|
|
||||||
var startTime = state.SegmentLength * startNumber;
|
|
||||||
timeDeltaParam = string.Format("-segment_time_delta -{0}", startTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
var segmentFormat = GetSegmentFileExtension(state.Request).TrimStart('.');
|
|
||||||
if (string.Equals(segmentFormat, "ts", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
segmentFormat = "mpegts";
|
|
||||||
}
|
|
||||||
|
|
||||||
var videoCodec = EncodingHelper.GetVideoEncoder(state, ApiEntryPoint.Instance.GetEncodingOptions());
|
|
||||||
var breakOnNonKeyFrames = state.EnableBreakOnNonKeyFrames(videoCodec);
|
|
||||||
|
|
||||||
var breakOnNonKeyFramesArg = breakOnNonKeyFrames ? " -break_non_keyframes 1" : "";
|
|
||||||
|
|
||||||
return string.Format("{0} {1} -map_metadata -1 -map_chapters -1 -threads {2} {3} {4} {5} -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time {6} {10} -individual_header_trailer 0{12} -segment_format {11} -segment_list_type m3u8 -segment_start_number {7} -segment_list \"{8}\" -y \"{9}\"",
|
|
||||||
inputModifier,
|
|
||||||
EncodingHelper.GetInputArgument(state, encodingOptions),
|
|
||||||
threads,
|
|
||||||
mapArgs,
|
|
||||||
GetVideoArguments(state),
|
|
||||||
GetAudioArguments(state),
|
|
||||||
state.SegmentLength.ToString(UsCulture),
|
|
||||||
startNumberParam,
|
|
||||||
outputPath,
|
|
||||||
outputTsArg,
|
|
||||||
timeDeltaParam,
|
|
||||||
segmentFormat,
|
|
||||||
breakOnNonKeyFramesArg
|
|
||||||
).Trim();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Format("{0} {1} -map_metadata -1 -map_chapters -1 -threads {2} {3} {4} {5} -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -hls_time {6} -individual_header_trailer 0 -start_number {7} -hls_list_size {8} -y \"{9}\"",
|
var segmentFormat = GetSegmentFileExtension(state.Request).TrimStart('.');
|
||||||
inputModifier,
|
if (string.Equals(segmentFormat, "ts", StringComparison.OrdinalIgnoreCase))
|
||||||
EncodingHelper.GetInputArgument(state, encodingOptions),
|
{
|
||||||
threads,
|
segmentFormat = "mpegts";
|
||||||
mapArgs,
|
}
|
||||||
GetVideoArguments(state),
|
|
||||||
GetAudioArguments(state),
|
var videoCodec = EncodingHelper.GetVideoEncoder(state, ApiEntryPoint.Instance.GetEncodingOptions());
|
||||||
state.SegmentLength.ToString(UsCulture),
|
var breakOnNonKeyFrames = state.EnableBreakOnNonKeyFrames(videoCodec);
|
||||||
startNumberParam,
|
|
||||||
state.HlsListSize.ToString(UsCulture),
|
var breakOnNonKeyFramesArg = breakOnNonKeyFrames ? " -break_non_keyframes 1" : "";
|
||||||
outputPath
|
|
||||||
).Trim();
|
return string.Format("{0} {1} -map_metadata -1 -map_chapters -1 -threads {2} {3} {4} {5} -f segment -max_delay 5000000 -avoid_negative_ts disabled -start_at_zero -segment_time {6} {10} -individual_header_trailer 0{12} -segment_format {11} -segment_list_type m3u8 -segment_start_number {7} -segment_list \"{8}\" -y \"{9}\"",
|
||||||
|
inputModifier,
|
||||||
|
EncodingHelper.GetInputArgument(state, encodingOptions),
|
||||||
|
threads,
|
||||||
|
mapArgs,
|
||||||
|
GetVideoArguments(state),
|
||||||
|
GetAudioArguments(state),
|
||||||
|
state.SegmentLength.ToString(UsCulture),
|
||||||
|
startNumberParam,
|
||||||
|
outputPath,
|
||||||
|
outputTsArg,
|
||||||
|
timeDeltaParam,
|
||||||
|
segmentFormat,
|
||||||
|
breakOnNonKeyFramesArg
|
||||||
|
).Trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Api.Playback.Hls;
|
using MediaBrowser.Api.Playback.Hls;
|
||||||
|
@ -35,8 +36,6 @@ namespace MediaBrowser.Api.Playback
|
||||||
[ApiMember(Name = "DeviceId", Description = "The device id of the client requesting. Used to stop encoding processes when needed.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
[ApiMember(Name = "DeviceId", Description = "The device id of the client requesting. Used to stop encoding processes when needed.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
|
||||||
public string DeviceId { get; set; }
|
public string DeviceId { get; set; }
|
||||||
|
|
||||||
public string Token { get; set; }
|
|
||||||
|
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
public string AudioCodec { get; set; }
|
public string AudioCodec { get; set; }
|
||||||
public string Container { get; set; }
|
public string Container { get; set; }
|
||||||
|
@ -47,6 +46,10 @@ namespace MediaBrowser.Api.Playback
|
||||||
|
|
||||||
[ApiMember(Name = "StartTimeTicks", Description = "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
|
[ApiMember(Name = "StartTimeTicks", Description = "Optional. Specify a starting offset, in ticks. 1 tick = 10000 ms", IsRequired = false, DataType = "int", ParameterType = "query", Verb = "GET")]
|
||||||
public long? StartTimeTicks { get; set; }
|
public long? StartTimeTicks { get; set; }
|
||||||
|
|
||||||
|
public string TranscodingContainer { get; set; }
|
||||||
|
public string TranscodingProtocol { get; set; }
|
||||||
|
public int? MaxAudioSampleRate { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Route("/Audio/{Id}/universal.{Container}", "GET", Summary = "Gets an audio stream")]
|
[Route("/Audio/{Id}/universal.{Container}", "GET", Summary = "Gets an audio stream")]
|
||||||
|
@ -125,12 +128,52 @@ namespace MediaBrowser.Api.Playback
|
||||||
{
|
{
|
||||||
Type = DlnaProfileType.Audio,
|
Type = DlnaProfileType.Audio,
|
||||||
Context = EncodingContext.Streaming,
|
Context = EncodingContext.Streaming,
|
||||||
Container = "ts",
|
Container = request.TranscodingContainer,
|
||||||
AudioCodec = "aac",
|
AudioCodec = request.AudioCodec,
|
||||||
Protocol = "hls"
|
Protocol = request.TranscodingProtocol
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var codecProfiles = new List<CodecProfile>();
|
||||||
|
var conditions = new List<ProfileCondition>();
|
||||||
|
|
||||||
|
if (request.MaxAudioSampleRate.HasValue)
|
||||||
|
{
|
||||||
|
// codec profile
|
||||||
|
conditions.Add(new ProfileCondition
|
||||||
|
{
|
||||||
|
Condition = ProfileConditionType.LessThanEqual,
|
||||||
|
IsRequired = false,
|
||||||
|
Property = ProfileConditionValue.AudioSampleRate,
|
||||||
|
Value = request.MaxAudioSampleRate.Value.ToString(CultureInfo.InvariantCulture)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.MaxAudioChannels.HasValue)
|
||||||
|
{
|
||||||
|
// codec profile
|
||||||
|
conditions.Add(new ProfileCondition
|
||||||
|
{
|
||||||
|
Condition = ProfileConditionType.LessThanEqual,
|
||||||
|
IsRequired = false,
|
||||||
|
Property = ProfileConditionValue.AudioChannels,
|
||||||
|
Value = request.MaxAudioChannels.Value.ToString(CultureInfo.InvariantCulture)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (conditions.Count > 0)
|
||||||
|
{
|
||||||
|
// codec profile
|
||||||
|
codecProfiles.Add(new CodecProfile
|
||||||
|
{
|
||||||
|
Type = CodecType.Audio,
|
||||||
|
Container = request.Container,
|
||||||
|
Conditions = conditions.ToArray()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
deviceProfile.CodecProfiles = codecProfiles.ToArray();
|
||||||
|
|
||||||
return deviceProfile;
|
return deviceProfile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,7 +237,9 @@ namespace MediaBrowser.Api.Playback
|
||||||
MediaSourceId = mediaSource.Id,
|
MediaSourceId = mediaSource.Id,
|
||||||
PlaySessionId = playbackInfoResult.PlaySessionId,
|
PlaySessionId = playbackInfoResult.PlaySessionId,
|
||||||
StartTimeTicks = request.StartTimeTicks,
|
StartTimeTicks = request.StartTimeTicks,
|
||||||
Static = isStatic
|
Static = isStatic,
|
||||||
|
SegmentContainer = request.TranscodingContainer,
|
||||||
|
AudioSampleRate = request.MaxAudioSampleRate
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isHeadRequest)
|
if (isHeadRequest)
|
||||||
|
@ -226,7 +271,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
var newRequest = new GetAudioStream
|
var newRequest = new GetAudioStream
|
||||||
{
|
{
|
||||||
AudioBitRate = isStatic ? (int?)null : Convert.ToInt32(Math.Min(request.MaxStreamingBitrate ?? 192000, int.MaxValue)),
|
AudioBitRate = isStatic ? (int?)null : Convert.ToInt32(Math.Min(request.MaxStreamingBitrate ?? 192000, int.MaxValue)),
|
||||||
//AudioCodec = request.AudioCodec,
|
AudioCodec = request.AudioCodec,
|
||||||
Container = isStatic ? null : ("." + mediaSource.TranscodingContainer),
|
Container = isStatic ? null : ("." + mediaSource.TranscodingContainer),
|
||||||
DeviceId = request.DeviceId,
|
DeviceId = request.DeviceId,
|
||||||
Id = request.Id,
|
Id = request.Id,
|
||||||
|
@ -234,7 +279,8 @@ namespace MediaBrowser.Api.Playback
|
||||||
MediaSourceId = mediaSource.Id,
|
MediaSourceId = mediaSource.Id,
|
||||||
PlaySessionId = playbackInfoResult.PlaySessionId,
|
PlaySessionId = playbackInfoResult.PlaySessionId,
|
||||||
StartTimeTicks = request.StartTimeTicks,
|
StartTimeTicks = request.StartTimeTicks,
|
||||||
Static = isStatic
|
Static = isStatic,
|
||||||
|
AudioSampleRate = request.MaxAudioSampleRate
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isHeadRequest)
|
if (isHeadRequest)
|
||||||
|
|
|
@ -557,6 +557,14 @@ namespace MediaBrowser.Controller.Library
|
||||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||||
bool IgnoreFile(FileSystemMetadata file, BaseItem parent);
|
bool IgnoreFile(FileSystemMetadata file, BaseItem parent);
|
||||||
|
|
||||||
|
Guid GetStudioId(string name);
|
||||||
|
|
||||||
|
Guid GetGenreId(string name);
|
||||||
|
|
||||||
|
Guid GetMusicGenreId(string name);
|
||||||
|
|
||||||
|
Guid GetGameGenreId(string name);
|
||||||
|
|
||||||
void AddVirtualFolder(string name, string collectionType, LibraryOptions options, bool refreshLibrary);
|
void AddVirtualFolder(string name, string collectionType, LibraryOptions options, bool refreshLibrary);
|
||||||
void RemoveVirtualFolder(string name, bool refreshLibrary);
|
void RemoveVirtualFolder(string name, bool refreshLibrary);
|
||||||
void AddMediaPath(string virtualFolderName, MediaPathInfo path);
|
void AddMediaPath(string virtualFolderName, MediaPathInfo path);
|
||||||
|
|
|
@ -346,7 +346,9 @@ namespace MediaBrowser.Model.Dto
|
||||||
/// Gets or sets the studios.
|
/// Gets or sets the studios.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The studios.</value>
|
/// <value>The studios.</value>
|
||||||
public StudioDto[] Studios { get; set; }
|
public NameIdPair[] Studios { get; set; }
|
||||||
|
|
||||||
|
public NameIdPair[] GenreItems { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If the item does not have a logo, this will hold the Id of the Parent that has one.
|
/// If the item does not have a logo, this will hold the Id of the Parent that has one.
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
using System.ComponentModel;
|
using System.Diagnostics;
|
||||||
using System.Diagnostics;
|
|
||||||
using MediaBrowser.Model.Serialization;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Model.Dto
|
namespace MediaBrowser.Model.Dto
|
||||||
{
|
{
|
||||||
|
@ -27,23 +25,5 @@ namespace MediaBrowser.Model.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The primary image tag.</value>
|
/// <value>The primary image tag.</value>
|
||||||
public string PrimaryImageTag { get; set; }
|
public string PrimaryImageTag { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets a value indicating whether this instance has primary image.
|
|
||||||
/// </summary>
|
|
||||||
/// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
|
|
||||||
[IgnoreDataMember]
|
|
||||||
public bool HasPrimaryImage
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return PrimaryImageTag != null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Occurs when [property changed].
|
|
||||||
/// </summary>
|
|
||||||
public event PropertyChangedEventHandler PropertyChanged;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -82,6 +82,8 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Genres,
|
Genres,
|
||||||
|
|
||||||
|
GenreItems,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The home page URL
|
/// The home page URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user