Browse Source

Changed stack type

JPVenson 9 months ago
parent
commit
ba28e3041d
1 changed files with 3 additions and 3 deletions
  1. 3 3
      MediaBrowser.Controller/Entities/Video.cs

+ 3 - 3
MediaBrowser.Controller/Entities/Video.cs

@@ -152,7 +152,7 @@ namespace MediaBrowser.Controller.Entities
         {
             get
             {
-                return GetMediaSourceCount(new Stack<Guid>());
+                return GetMediaSourceCount(new HashSet<Guid>());
             }
         }
 
@@ -542,7 +542,7 @@ namespace MediaBrowser.Controller.Entities
             return list;
         }
 
-        private int GetMediaSourceCount(Stack<Guid> callstack)
+        private int GetMediaSourceCount(HashSet<Guid> callstack)
         {
             if (!string.IsNullOrEmpty(PrimaryVersionId))
             {
@@ -554,7 +554,7 @@ namespace MediaBrowser.Controller.Entities
                         return video.LinkedAlternateVersions.Length + video.LocalAlternateVersions.Length + 1;
                     }
 
-                    callstack.Push(video.Id);
+                    callstack.Add(video.Id);
                     return video.GetMediaSourceCount(callstack);
                 }
             }