From 2af33416a7c437cfba94eece540745fb8f92ef6f Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Thu, 14 Mar 2013 21:40:24 -0400 Subject: [PATCH 1/3] #22 - Need to strip html tags from overviews --- MediaBrowser.Controller/Library/DtoBuilder.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Controller/Library/DtoBuilder.cs b/MediaBrowser.Controller/Library/DtoBuilder.cs index 04ebf3a8d..02d8eb16f 100644 --- a/MediaBrowser.Controller/Library/DtoBuilder.cs +++ b/MediaBrowser.Controller/Library/DtoBuilder.cs @@ -300,13 +300,13 @@ namespace MediaBrowser.Controller.Library { var strippedOverview = string.IsNullOrEmpty(item.Overview) ? item.Overview : item.Overview.StripHtml(); - if (fields.Contains(ItemFields.Overview)) + if (hasOverview) { dto.Overview = strippedOverview; } // Only supply the html version if there was actually html content - if (fields.Contains(ItemFields.OverviewHtml) && !string.Equals(item.Overview, strippedOverview)) + if (hasHtmlOverview) { dto.OverviewHtml = item.Overview; } From 26536c22ad1b4b0d6076b41238c3c1001697f669 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Thu, 14 Mar 2013 21:40:38 -0400 Subject: [PATCH 2/3] fix concurrency issue in base app host --- MediaBrowser.Common.Implementations/BaseApplicationHost.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs index 40c91979d..0c8646508 100644 --- a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs +++ b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs @@ -381,6 +381,7 @@ namespace MediaBrowser.Common.Implementations if (disposable != null) { Logger.Info("Registering " + disposable.GetType().Name); + DisposableParts.Add(disposable); } } @@ -458,7 +459,10 @@ namespace MediaBrowser.Common.Implementations if (manageLiftime) { - DisposableParts.AddRange(parts.OfType()); + lock (DisposableParts) + { + DisposableParts.AddRange(parts.OfType()); + } } return parts; From daa243e6f429053fac697ff406bdf916c50de807 Mon Sep 17 00:00:00 2001 From: LukePulverenti Date: Thu, 14 Mar 2013 22:34:25 -0400 Subject: [PATCH 3/3] accept range none when transcoding --- .../Playback/Progressive/BaseProgressiveStreamingService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs index ef9b48d5a..fcdc945b2 100644 --- a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs +++ b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs @@ -182,6 +182,8 @@ namespace MediaBrowser.Api.Playback.Progressive return ToStaticFileResult(outputPath, isHeadRequest); } + Response.AddHeader("Accept-Ranges", "none"); + return GetStreamResult(state, isHeadRequest).Result; }