浏览代码

update intros

Luke Pulverenti 8 年之前
父节点
当前提交
f0864b1dae
共有 1 个文件被更改,包括 6 次插入3 次删除
  1. 6 3
      MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs

+ 6 - 3
MediaBrowser.Server.Implementations/Intros/DefaultIntroProvider.cs

@@ -216,7 +216,8 @@ namespace MediaBrowser.Server.Implementations.Intros
             }
 
             return allIntros
-                .Where(i => IsMatch(i.Path, codec));
+                .Where(i => IsMatch(i.Path, codec))
+                .OrderBy(i => Guid.NewGuid());
         }
 
         private IEnumerable<IntroInfo> GetMediaInfoIntrosByAudioStream(List<IntroInfo> allIntros, MediaStream stream)
@@ -229,13 +230,15 @@ namespace MediaBrowser.Server.Implementations.Intros
             }
 
             return allIntros
-                .Where(i => IsAudioMatch(i.Path, stream));
+                .Where(i => IsAudioMatch(i.Path, stream))
+                .OrderBy(i => Guid.NewGuid());
         }
 
         private IEnumerable<IntroInfo> GetMediaInfoIntrosByTags(List<IntroInfo> allIntros, List<string> tags)
         {
             return allIntros
-                .Where(i => tags.Any(t => IsMatch(i.Path, t)));
+                .Where(i => tags.Any(t => IsMatch(i.Path, t)))
+                .OrderBy(i => Guid.NewGuid());
         }
 
         private bool IsMatch(string file, string attribute)