aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick <20588554+nicknsy@users.noreply.github.com>2023-09-04 12:30:20 -0700
committerNick <20588554+nicknsy@users.noreply.github.com>2023-09-04 12:30:20 -0700
commit5a860710a849b9d67d12731f1a616c4a3904487d (patch)
tree3d2e613d41a0a86a1a25f6a6d68a37dc326e77c0
parent65b269c151e083a7ed30b010a470e1fc63765904 (diff)
Make TrickplayManifest dictionary key a string rather than Guid
-rw-r--r--Emby.Server.Implementations/Dto/DtoService.cs6
-rw-r--r--Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs6
-rw-r--r--MediaBrowser.Controller/Trickplay/ITrickplayManager.cs2
3 files changed, 5 insertions, 9 deletions
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs
index 19ae39662..be361c4d1 100644
--- a/Emby.Server.Implementations/Dto/DtoService.cs
+++ b/Emby.Server.Implementations/Dto/DtoService.cs
@@ -1064,11 +1064,7 @@ namespace Emby.Server.Implementations.Dto
if (options.ContainsField(ItemFields.Trickplay))
{
- var manifest = _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);
+ dto.Trickplay = _trickplayManager.GetTrickplayManifest(item).GetAwaiter().GetResult();
}
if (video.ExtraType.HasValue)
diff --git a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
index e3bfdd50d..107f8e510 100644
--- a/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
+++ b/Jellyfin.Server.Implementations/Trickplay/TrickplayManager.cs
@@ -349,9 +349,9 @@ public class TrickplayManager : ITrickplayManager
}
/// <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))
{
var mediaSourceId = Guid.Parse(mediaSource.Id);
@@ -359,7 +359,7 @@ public class TrickplayManager : ITrickplayManager
if (trickplayResolutions.Count > 0)
{
- trickplayManifest[mediaSourceId] = trickplayResolutions;
+ trickplayManifest[mediaSource.Id] = trickplayResolutions;
}
}
diff --git a/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs b/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs
index 7bea54fba..0c41f3023 100644
--- a/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs
+++ b/MediaBrowser.Controller/Trickplay/ITrickplayManager.cs
@@ -54,7 +54,7 @@ public interface ITrickplayManager
/// </summary>
/// <param name="item">The item.</param>
/// <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>
/// Gets the path to a trickplay tile image.