mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Make TrickplayManifest dictionary key a string rather than Guid
This commit is contained in:
parent
65b269c151
commit
5a860710a8
@ -1064,11 +1064,7 @@ namespace Emby.Server.Implementations.Dto
|
|||||||
|
|
||||||
if (options.ContainsField(ItemFields.Trickplay))
|
if (options.ContainsField(ItemFields.Trickplay))
|
||||||
{
|
{
|
||||||
var manifest = _trickplayManager.GetTrickplayManifest(item).GetAwaiter().GetResult();
|
dto.Trickplay = _trickplayManager.GetTrickplayManifest(item).GetAwaiter().GetResult();
|
||||||
|
|
||||||
// To stay consistent with other fields, this must go from a Guid to a non-dashed string.
|
|
||||||
// This does not seem to occur automatically to dictionaries like it does with other Guid fields.
|
|
||||||
dto.Trickplay = manifest.ToDictionary(x => x.Key.ToString("N", CultureInfo.InvariantCulture), y => y.Value);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (video.ExtraType.HasValue)
|
if (video.ExtraType.HasValue)
|
||||||
|
@ -349,9 +349,9 @@ public class TrickplayManager : ITrickplayManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public async Task<Dictionary<Guid, Dictionary<int, TrickplayInfo>>> GetTrickplayManifest(BaseItem item)
|
public async Task<Dictionary<string, Dictionary<int, TrickplayInfo>>> GetTrickplayManifest(BaseItem item)
|
||||||
{
|
{
|
||||||
var trickplayManifest = new Dictionary<Guid, Dictionary<int, TrickplayInfo>>();
|
var trickplayManifest = new Dictionary<string, Dictionary<int, TrickplayInfo>>();
|
||||||
foreach (var mediaSource in item.GetMediaSources(false))
|
foreach (var mediaSource in item.GetMediaSources(false))
|
||||||
{
|
{
|
||||||
var mediaSourceId = Guid.Parse(mediaSource.Id);
|
var mediaSourceId = Guid.Parse(mediaSource.Id);
|
||||||
@ -359,7 +359,7 @@ public class TrickplayManager : ITrickplayManager
|
|||||||
|
|
||||||
if (trickplayResolutions.Count > 0)
|
if (trickplayResolutions.Count > 0)
|
||||||
{
|
{
|
||||||
trickplayManifest[mediaSourceId] = trickplayResolutions;
|
trickplayManifest[mediaSource.Id] = trickplayResolutions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public interface ITrickplayManager
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="item">The item.</param>
|
/// <param name="item">The item.</param>
|
||||||
/// <returns>A map of media source id to a map of tile width to trickplay info.</returns>
|
/// <returns>A map of media source id to a map of tile width to trickplay info.</returns>
|
||||||
Task<Dictionary<Guid, Dictionary<int, TrickplayInfo>>> GetTrickplayManifest(BaseItem item);
|
Task<Dictionary<string, Dictionary<int, TrickplayInfo>>> GetTrickplayManifest(BaseItem item);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the path to a trickplay tile image.
|
/// Gets the path to a trickplay tile image.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user