diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 73518afe1..e31a112d5 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -256,7 +256,10 @@ namespace MediaBrowser.Api.Playback
if (state.SubtitleStream != null)
{
- if (state.SubtitleStream.Codec.IndexOf("srt", StringComparison.OrdinalIgnoreCase) != -1 || state.SubtitleStream.Codec.IndexOf("subrip", StringComparison.OrdinalIgnoreCase) != -1)
+ if (state.SubtitleStream.Codec.IndexOf("srt", StringComparison.OrdinalIgnoreCase) != -1 ||
+ state.SubtitleStream.Codec.IndexOf("subrip", StringComparison.OrdinalIgnoreCase) != -1 ||
+ string.Equals(state.SubtitleStream.Codec, "ass", StringComparison.OrdinalIgnoreCase) ||
+ string.Equals(state.SubtitleStream.Codec, "ssa", StringComparison.OrdinalIgnoreCase))
{
assSubtitleParam = GetTextSubtitleParam((Video)state.Item, state.SubtitleStream, request.StartTimeTicks, performTextSubtitleConversion);
}
diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs
index 855bbb205..77cdfa085 100644
--- a/MediaBrowser.Controller/Entities/Folder.cs
+++ b/MediaBrowser.Controller/Entities/Folder.cs
@@ -951,15 +951,39 @@ namespace MediaBrowser.Controller.Entities
return result;
}
- var children = Children;
+ return GetChildrenList(user, includeLinkedChildren);
+ }
+
+ ///
+ /// Gets the children list.
+ ///
+ /// The user.
+ /// if set to true [include linked children].
+ /// List{BaseItem}.
+ private List GetChildrenList(User user, bool includeLinkedChildren)
+ {
+ var list = new List();
+
+ foreach (var child in Children)
+ {
+ if (child.IsVisible(user))
+ {
+ list.Add(child);
+ }
+ }
if (includeLinkedChildren)
{
- children = children.Concat(GetLinkedChildren());
+ foreach (var child in GetLinkedChildren())
+ {
+ if (child.IsVisible(user))
+ {
+ list.Add(child);
+ }
+ }
}
- // If indexed is false or the indexing function is null
- return children.AsParallel().Where(c => c.IsVisible(user)).AsEnumerable();
+ return list;
}
///
@@ -976,42 +1000,35 @@ namespace MediaBrowser.Controller.Entities
throw new ArgumentNullException();
}
- var children = GetRecursiveChildrenInternal(user, includeLinkedChildren);
+ var list = new List(10000);
+
+ AddRecursiveChildrenInternal(user, includeLinkedChildren, list);
if (includeLinkedChildren)
{
- children = children.Distinct();
+ list = list.Distinct().ToList();
}
- return children;
+ return list;
}
///
- /// Gets allowed recursive children of an item
+ /// Adds the recursive children internal.
///
/// The user.
/// if set to true [include linked children].
- /// IEnumerable{BaseItem}.
- ///
- private IEnumerable GetRecursiveChildrenInternal(User user, bool includeLinkedChildren)
+ /// The list.
+ private void AddRecursiveChildrenInternal(User user, bool includeLinkedChildren, List list)
{
- if (user == null)
+ foreach (var item in GetChildrenList(user, includeLinkedChildren))
{
- throw new ArgumentNullException();
- }
-
- foreach (var item in GetChildren(user, includeLinkedChildren))
- {
- yield return item;
+ list.Add(item);
var subFolder = item as Folder;
if (subFolder != null)
{
- foreach (var subitem in subFolder.GetRecursiveChildrenInternal(user, includeLinkedChildren))
- {
- yield return subitem;
- }
+ subFolder.AddRecursiveChildrenInternal(user, includeLinkedChildren, list);
}
}
}
diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfoProvider.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfoProvider.cs
index f39f6bec5..59c3d75e5 100644
--- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfoProvider.cs
+++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfoProvider.cs
@@ -482,7 +482,7 @@ namespace MediaBrowser.Providers.MediaInfo
Type = MediaStreamType.Subtitle,
IsExternal = true,
Path = fullName,
- Codec = "srt",
+ Codec = Path.GetExtension(fullName).ToLower().TrimStart('.'),
Language = language
});
}
diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec
index 00c31ba5e..daa03d1cd 100644
--- a/Nuget/MediaBrowser.Common.Internal.nuspec
+++ b/Nuget/MediaBrowser.Common.Internal.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Common.Internal
- 3.0.203
+ 3.0.204
MediaBrowser.Common.Internal
Luke
ebr,Luke,scottisafool
@@ -12,7 +12,7 @@
Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.
Copyright © Media Browser 2013
-
+
diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec
index 94d3b6131..500f5c84f 100644
--- a/Nuget/MediaBrowser.Common.nuspec
+++ b/Nuget/MediaBrowser.Common.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Common
- 3.0.203
+ 3.0.204
MediaBrowser.Common
Media Browser Team
ebr,Luke,scottisafool
diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec
index 72aa871bf..44f8acd09 100644
--- a/Nuget/MediaBrowser.Server.Core.nuspec
+++ b/Nuget/MediaBrowser.Server.Core.nuspec
@@ -2,7 +2,7 @@
MediaBrowser.Server.Core
- 3.0.203
+ 3.0.204
Media Browser.Server.Core
Media Browser Team
ebr,Luke,scottisafool
@@ -12,7 +12,7 @@
Contains core components required to build plugins for Media Browser Server.
Copyright © Media Browser 2013
-
+