diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-08-13 16:55:29 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-13 16:55:29 -0400 |
| commit | 03648936dcadf0ff0f707a5040e2e28556fa56ca (patch) | |
| tree | 38028a28a9d59978ef9ebf1b4fb1c3f146653fd1 /MediaBrowser.Api | |
| parent | 6600ff0990a1037d6f9c3bf160104089aac501e4 (diff) | |
| parent | 8508e07bb9d1af326ef4c1c1b891e0d49288167b (diff) | |
Merge pull request #2053 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Api')
6 files changed, 17 insertions, 4 deletions
diff --git a/MediaBrowser.Api/Images/ImageService.cs b/MediaBrowser.Api/Images/ImageService.cs index 5866ad15b..3280358df 100644 --- a/MediaBrowser.Api/Images/ImageService.cs +++ b/MediaBrowser.Api/Images/ImageService.cs @@ -573,11 +573,9 @@ namespace MediaBrowser.Api.Images var outputFormats = GetOutputFormats(request, imageInfo, cropwhitespace, supportedImageEnhancers); - var cacheGuid = new Guid(_imageProcessor.GetImageCacheTag(item, imageInfo, supportedImageEnhancers)); - TimeSpan? cacheDuration = null; - if (!string.IsNullOrEmpty(request.Tag) && cacheGuid == new Guid(request.Tag)) + if (!string.IsNullOrEmpty(request.Tag)) { cacheDuration = TimeSpan.FromDays(365); } diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs index 3af213493..dd3c7211a 100644 --- a/MediaBrowser.Api/Library/LibraryStructureService.cs +++ b/MediaBrowser.Api/Library/LibraryStructureService.cs @@ -11,6 +11,7 @@ using System.Threading; using System.Threading.Tasks; using CommonIO; using MediaBrowser.Controller.Configuration; +using MediaBrowser.Model.Configuration; namespace MediaBrowser.Api.Library { diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index a9489cecc..ac967e194 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1589,6 +1589,10 @@ namespace MediaBrowser.Api.Playback videoRequest.EnableSubtitlesInManifest = string.Equals("true", val, StringComparison.OrdinalIgnoreCase); } } + else if (i == 29) + { + request.Tag = val; + } } } diff --git a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs index f4cc9f4bc..56842e69d 100644 --- a/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs +++ b/MediaBrowser.Api/Playback/Progressive/BaseProgressiveStreamingService.cs @@ -154,12 +154,20 @@ namespace MediaBrowser.Api.Playback.Progressive using (state) { + TimeSpan? cacheDuration = null; + + if (!string.IsNullOrEmpty(request.Tag)) + { + cacheDuration = TimeSpan.FromDays(365); + } + return await ResultFactory.GetStaticFileResult(Request, new StaticFileResultOptions { ResponseHeaders = responseHeaders, ContentType = contentType, IsHeadRequest = isHeadRequest, - Path = state.MediaPath + Path = state.MediaPath, + CacheDuration = cacheDuration }).ConfigureAwait(false); } diff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.cs index a8ca6aaa3..e1a577f52 100644 --- a/MediaBrowser.Api/Playback/StreamRequest.cs +++ b/MediaBrowser.Api/Playback/StreamRequest.cs @@ -74,6 +74,7 @@ namespace MediaBrowser.Api.Playback public string Params { get; set; } public string PlaySessionId { get; set; } public string LiveStreamId { get; set; } + public string Tag { get; set; } } public class VideoStreamRequest : StreamRequest diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs index 852a3d59e..94a6a7ef1 100644 --- a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs +++ b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs @@ -214,6 +214,7 @@ namespace MediaBrowser.Api.UserLibrary dto.AlbumCount = counts.AlbumCount; dto.SongCount = counts.SongCount; dto.GameCount = counts.GameCount; + dto.ArtistCount = counts.ArtistCount; } /// <summary> |
