From 1b90798b90fc4e5f7fe8d813c34c87f519924abc Mon Sep 17 00:00:00 2001 From: Mister Rajoy Date: Sun, 31 May 2020 20:23:23 +0200 Subject: [PATCH] Order ids to merge to avoid stack overflow As said in https://github.com/jellyfin/jellyfin/issues/3176, merging 1 with 2 and then 2 with 1 cause an stack overflow. sorting ids first fix the problem --- MediaBrowser.Api/VideosService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MediaBrowser.Api/VideosService.cs b/MediaBrowser.Api/VideosService.cs index b11fd48d3c..e03542d372 100644 --- a/MediaBrowser.Api/VideosService.cs +++ b/MediaBrowser.Api/VideosService.cs @@ -125,10 +125,12 @@ namespace MediaBrowser.Api public void Post(MergeVersions request) { + var items = request.Ids.Split(',') .Select(i => _libraryManager.GetItemById(i)) .OfType