diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-17 14:05:49 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-05-17 14:05:49 -0400 |
| commit | e2d6a5c05df874cb812cbc0b85e7deda22ce567a (patch) | |
| tree | 21805c896f0028544de14916ec7b457680dea52c /MediaBrowser.Api/Playback/BaseStreamingService.cs | |
| parent | da7af24fca3b2462b971dce595cfa5e548311cce (diff) | |
support static trailer streaming
Diffstat (limited to 'MediaBrowser.Api/Playback/BaseStreamingService.cs')
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 04b6a656d..19b339cd7 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -622,9 +622,26 @@ namespace MediaBrowser.Api.Playback /// <returns>System.String.</returns> protected string GetUserAgentParam(BaseItem item) { + var useragent = GetUserAgent(item); + + if (!string.IsNullOrEmpty(useragent)) + { + return "-user-agent \"" + useragent + "\""; + } + + return string.Empty; + } + + /// <summary> + /// Gets the user agent. + /// </summary> + /// <param name="item">The item.</param> + /// <returns>System.String.</returns> + protected string GetUserAgent(BaseItem item) + { if (item.Path.IndexOf("apple.com", StringComparison.OrdinalIgnoreCase) != -1) { - return "-user-agent \"QuickTime/7.6.2\""; + return "QuickTime/7.6.2"; } return string.Empty; |
