From f6769b73f2a82273e67689e8bc1c9d7b005ee866 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 20 Sep 2014 11:48:23 -0400 Subject: add MediaInfo to improve media analysis for video files --- MediaBrowser.Server.Implementations/Dto/DtoService.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Dto') diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index e35504dcf6..4d4aa24843 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -1102,16 +1102,21 @@ namespace MediaBrowser.Server.Implementations.Dto if (movie != null) { - var specialFeatureCount = movie.SpecialFeatureIds.Count; - - if (specialFeatureCount > 0) + if (fields.Contains(ItemFields.TmdbCollectionName)) { - dto.SpecialFeatureCount = specialFeatureCount; + dto.TmdbCollectionName = movie.TmdbCollectionName; } + } - if (fields.Contains(ItemFields.TmdbCollectionName)) + var hasSpecialFeatures = item as IHasSpecialFeatures; + + if (hasSpecialFeatures != null) + { + var specialFeatureCount = hasSpecialFeatures.SpecialFeatureIds.Count; + + if (specialFeatureCount > 0) { - dto.TmdbCollectionName = movie.TmdbCollectionName; + dto.SpecialFeatureCount = specialFeatureCount; } } @@ -1146,8 +1151,6 @@ namespace MediaBrowser.Server.Implementations.Dto dto.AirTime = series.AirTime; dto.Status = series.Status; - dto.SpecialFeatureCount = series.SpecialFeatureIds.Count; - dto.SeasonCount = series.SeasonCount; if (fields.Contains(ItemFields.Settings)) -- cgit v1.2.3