2
0
Luke Pulverenti 10 жил өмнө
parent
commit
6bd18c6e72

+ 26 - 2
MediaBrowser.Api/Images/ImageService.cs

@@ -40,8 +40,8 @@ namespace MediaBrowser.Api.Images
     [Route("/Items/{Id}/Images/{Type}/{Index}", "GET")]
     [Route("/Items/{Id}/Images/{Type}", "HEAD")]
     [Route("/Items/{Id}/Images/{Type}/{Index}", "HEAD")]
-    [Route("/Items/{Id}/Images/{Type}/{Index}/{Tag}/{Format}/{MaxWidth}/{MaxHeight}/{PercentPlayed}", "GET")]
-    [Route("/Items/{Id}/Images/{Type}/{Index}/{Tag}/{Format}/{MaxWidth}/{MaxHeight}/{PercentPlayed}", "HEAD")]
+    [Route("/Items/{Id}/Images/{Type}/{Index}/{Tag}/{Format}/{MaxWidth}/{MaxHeight}/{PercentPlayed}/{UnplayedCount}", "GET")]
+    [Route("/Items/{Id}/Images/{Type}/{Index}/{Tag}/{Format}/{MaxWidth}/{MaxHeight}/{PercentPlayed}/{UnplayedCount}", "HEAD")]
     public class GetItemImage : ImageRequest
     {
         /// <summary>
@@ -511,6 +511,30 @@ namespace MediaBrowser.Api.Images
         /// <exception cref="ResourceNotFoundException"></exception>
         public object GetImage(ImageRequest request, IHasImages item, bool isHeadRequest)
         {
+            if (request.PercentPlayed.HasValue)
+            {
+                if (request.PercentPlayed.Value <= 0)
+                {
+                    request.PercentPlayed = null;
+                }
+                else if (request.PercentPlayed.Value >= 100)
+                {
+                    request.PercentPlayed = null;
+                    request.AddPlayedIndicator = true;
+                }
+            }
+            if (request.PercentPlayed.HasValue)
+            {
+                request.UnplayedCount = null;
+            }
+            if (request.UnplayedCount.HasValue)
+            {
+                if (request.UnplayedCount.Value <= 0)
+                {
+                    request.UnplayedCount = null;
+                }
+            }
+
             var imageInfo = GetImageInfo(request, item);
 
             if (imageInfo == null)

+ 1 - 1
MediaBrowser.Dlna/ContentDirectory/ControlHandler.cs

@@ -58,7 +58,7 @@ namespace MediaBrowser.Dlna.ContentDirectory
             _profile = profile;
             _config = config;
 
-            _didlBuilder = new DidlBuilder(profile, user, imageProcessor, serverAddress, accessToken, userDataManager, localization, mediaSourceManager);
+            _didlBuilder = new DidlBuilder(profile, user, imageProcessor, serverAddress, accessToken, userDataManager, localization, mediaSourceManager, Logger);
         }
 
         protected override IEnumerable<KeyValuePair<string, string>> GetResult(string methodName, Headers methodParams)

+ 34 - 16
MediaBrowser.Dlna/Didl/DidlBuilder.cs

@@ -39,8 +39,9 @@ namespace MediaBrowser.Dlna.Didl
         private readonly IUserDataManager _userDataManager;
         private readonly ILocalizationManager _localization;
         private readonly IMediaSourceManager _mediaSourceManager;
+        private readonly ILogger _logger;
 
-        public DidlBuilder(DeviceProfile profile, User user, IImageProcessor imageProcessor, string serverAddress, string accessToken, IUserDataManager userDataManager, ILocalizationManager localization, IMediaSourceManager mediaSourceManager)
+        public DidlBuilder(DeviceProfile profile, User user, IImageProcessor imageProcessor, string serverAddress, string accessToken, IUserDataManager userDataManager, ILocalizationManager localization, IMediaSourceManager mediaSourceManager, ILogger logger)
         {
             _profile = profile;
             _imageProcessor = imageProcessor;
@@ -48,6 +49,7 @@ namespace MediaBrowser.Dlna.Didl
             _userDataManager = userDataManager;
             _localization = localization;
             _mediaSourceManager = mediaSourceManager;
+            _logger = logger;
             _accessToken = accessToken;
             _user = user;
         }
@@ -127,7 +129,7 @@ namespace MediaBrowser.Dlna.Didl
             {
                 var sources = _mediaSourceManager.GetStaticMediaSources(video, true, _user).ToList();
 
-                streamInfo = new StreamBuilder(new NullLogger()).BuildVideoItem(new VideoOptions
+                streamInfo = new StreamBuilder(_logger).BuildVideoItem(new VideoOptions
                 {
                     ItemId = GetClientId(video),
                     MediaSources = sources,
@@ -780,19 +782,33 @@ namespace MediaBrowser.Dlna.Didl
             var result = element.OwnerDocument;
 
             var playbackPercentage = 0;
+            var unplayedCount = 0;
 
             if (item is Video)
             {
                 var userData = _userDataManager.GetUserDataDto(item, _user);
 
                 playbackPercentage = Convert.ToInt32(userData.PlayedPercentage ?? 0);
-                if (playbackPercentage >= 100)
+                if (playbackPercentage >= 100 || userData.Played)
                 {
-                    playbackPercentage = 0;
+                    playbackPercentage = 100;
+                }
+            }
+            else if (item is Series || item is Season || item is BoxSet)
+            {
+                var userData = _userDataManager.GetUserDataDto(item, _user);
+
+                if (userData.Played)
+                {
+                    playbackPercentage = 100;
+                }
+                else
+                {
+                    unplayedCount = userData.UnplayedItemCount ?? 0;
                 }
             }
 
-            var albumartUrlInfo = GetImageUrl(imageInfo, _profile.MaxAlbumArtWidth, _profile.MaxAlbumArtHeight, playbackPercentage, "jpg");
+            var albumartUrlInfo = GetImageUrl(imageInfo, _profile.MaxAlbumArtWidth, _profile.MaxAlbumArtHeight, playbackPercentage, unplayedCount, "jpg");
 
             var icon = result.CreateElement("upnp", "albumArtURI", NS_UPNP);
             var profile = result.CreateAttribute("dlna", "profileID", NS_DLNA);
@@ -802,7 +818,7 @@ namespace MediaBrowser.Dlna.Didl
             element.AppendChild(icon);
 
             // TOOD: Remove these default values
-            var iconUrlInfo = GetImageUrl(imageInfo, _profile.MaxIconWidth ?? 48, _profile.MaxIconHeight ?? 48, playbackPercentage, "jpg");
+            var iconUrlInfo = GetImageUrl(imageInfo, _profile.MaxIconWidth ?? 48, _profile.MaxIconHeight ?? 48, playbackPercentage, unplayedCount, "jpg");
             icon = result.CreateElement("upnp", "icon", NS_UPNP);
             icon.InnerText = iconUrlInfo.Url;
             element.AppendChild(icon);
@@ -819,15 +835,15 @@ namespace MediaBrowser.Dlna.Didl
                 }
             }
 
-            AddImageResElement(item, element, 160, 160, playbackPercentage, "jpg", "JPEG_TN");
+            AddImageResElement(item, element, 160, 160, playbackPercentage, unplayedCount, "jpg", "JPEG_TN");
 
             if (!_profile.EnableSingleAlbumArtLimit)
             {
-                AddImageResElement(item, element, 4096, 4096, playbackPercentage, "jpg", "JPEG_LRG");
-                AddImageResElement(item, element, 1024, 768, playbackPercentage, "jpg", "JPEG_MED");
-                AddImageResElement(item, element, 640, 480, playbackPercentage, "jpg", "JPEG_SM");
-                AddImageResElement(item, element, 4096, 4096, playbackPercentage, "png", "PNG_LRG");
-                AddImageResElement(item, element, 160, 160, playbackPercentage, "png", "PNG_TN");
+                AddImageResElement(item, element, 4096, 4096, playbackPercentage, unplayedCount, "jpg", "JPEG_LRG");
+                AddImageResElement(item, element, 1024, 768, playbackPercentage, unplayedCount, "jpg", "JPEG_MED");
+                AddImageResElement(item, element, 640, 480, playbackPercentage, unplayedCount, "jpg", "JPEG_SM");
+                AddImageResElement(item, element, 4096, 4096, playbackPercentage, unplayedCount, "png", "PNG_LRG");
+                AddImageResElement(item, element, 160, 160, playbackPercentage, unplayedCount, "png", "PNG_TN");
             }
         }
 
@@ -852,6 +868,7 @@ namespace MediaBrowser.Dlna.Didl
             int maxWidth,
             int maxHeight,
             int playbackPercentage,
+            int unplayedCount,
             string format,
             string org_Pn)
         {
@@ -864,7 +881,7 @@ namespace MediaBrowser.Dlna.Didl
 
             var result = element.OwnerDocument;
 
-            var albumartUrlInfo = GetImageUrl(imageInfo, maxWidth, maxHeight, playbackPercentage, format);
+            var albumartUrlInfo = GetImageUrl(imageInfo, maxWidth, maxHeight, playbackPercentage, unplayedCount, format);
 
             var res = result.CreateElement(string.Empty, "res", NS_DIDL);
 
@@ -1005,9 +1022,9 @@ namespace MediaBrowser.Dlna.Didl
             return id;
         }
 
-        private ImageUrlInfo GetImageUrl(ImageDownloadInfo info, int maxWidth, int maxHeight, int playbackPercentage, string format)
+        private ImageUrlInfo GetImageUrl(ImageDownloadInfo info, int maxWidth, int maxHeight, int playbackPercentage, int unplayedCount, string format)
         {
-            var url = string.Format("{0}/Items/{1}/Images/{2}/0/{3}/{4}/{5}/{6}/{7}",
+            var url = string.Format("{0}/Items/{1}/Images/{2}/0/{3}/{4}/{5}/{6}/{7}/{8}",
                 _serverAddress,
                 info.ItemId,
                 info.Type,
@@ -1015,7 +1032,8 @@ namespace MediaBrowser.Dlna.Didl
                 format,
                 maxWidth.ToString(CultureInfo.InvariantCulture),
                 maxHeight.ToString(CultureInfo.InvariantCulture),
-                playbackPercentage.ToString(CultureInfo.InvariantCulture)
+                playbackPercentage.ToString(CultureInfo.InvariantCulture),
+                unplayedCount.ToString(CultureInfo.InvariantCulture)
                 );
 
             var width = info.Width;

+ 3 - 2
MediaBrowser.Dlna/MediaBrowser.Dlna.csproj

@@ -94,7 +94,6 @@
     <Compile Include="PlayTo\uParserObject.cs" />
     <Compile Include="Profiles\Foobar2000Profile.cs" />
     <Compile Include="Profiles\MediaMonkeyProfile.cs" />
-    <Compile Include="Profiles\WindowsMediaCenterProfile.cs" />
     <Compile Include="ContentDirectory\ContentDirectory.cs" />
     <Compile Include="ContentDirectory\ControlHandler.cs" />
     <Compile Include="ContentDirectory\ServiceActionListBuilder.cs" />
@@ -167,7 +166,9 @@
     <EmbeddedResource Include="Profiles\Xml\Sony Bravia %282013%29.xml" />
     <EmbeddedResource Include="Profiles\Xml\Sony PlayStation 3.xml" />
     <EmbeddedResource Include="Profiles\Xml\WDTV Live.xml" />
-    <EmbeddedResource Include="Profiles\Xml\Xbox 360.xml" />
+    <EmbeddedResource Include="Profiles\Xml\Xbox 360.xml">
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
     <EmbeddedResource Include="Profiles\Xml\Xbox One.xml" />
   </ItemGroup>
   <ItemGroup>

+ 1 - 1
MediaBrowser.Dlna/PlayTo/PlayToController.cs

@@ -478,7 +478,7 @@ namespace MediaBrowser.Dlna.PlayTo
 
             playlistItem.StreamUrl = playlistItem.StreamInfo.ToDlnaUrl(_serverAddress, _accessToken);
 
-            var itemXml = new DidlBuilder(profile, user, _imageProcessor, _serverAddress, _accessToken, _userDataManager, _localization, _mediaSourceManager)
+            var itemXml = new DidlBuilder(profile, user, _imageProcessor, _serverAddress, _accessToken, _userDataManager, _localization, _mediaSourceManager, _logger)
                 .GetItemDidl(item, null, _session.DeviceId, new Filter(), playlistItem.StreamInfo);
 
             playlistItem.Didl = itemXml;

+ 1 - 1
MediaBrowser.Dlna/Profiles/DishHopperJoeyProfile.cs

@@ -95,6 +95,7 @@ namespace MediaBrowser.Dlna.Profiles
                 new CodecProfile
                 {
                     Type = CodecType.Video,
+                    Codec = "h264",
                     Conditions = new []
                     {
                         new ProfileCondition
@@ -138,7 +139,6 @@ namespace MediaBrowser.Dlna.Profiles
                 new CodecProfile
                 {
                     Type = CodecType.Video,
-                    Codec = "mpeg2video",
                     Conditions = new []
                     {
                         new ProfileCondition

+ 21 - 2
MediaBrowser.Dlna/Profiles/PopcornHourProfile.cs

@@ -93,8 +93,10 @@ namespace MediaBrowser.Dlna.Profiles
                 new CodecProfile
                 {
                     Type = CodecType.Video,
+                    Codec="h264",
                     Conditions = new []
                     {
+                        new ProfileCondition(ProfileConditionType.EqualsAny, ProfileConditionValue.VideoProfile, "baseline|constrained baseline"),
                         new ProfileCondition
                         {
                             Condition = ProfileConditionType.LessThanEqual,
@@ -120,10 +122,27 @@ namespace MediaBrowser.Dlna.Profiles
                 new CodecProfile
                 {
                     Type = CodecType.Video,
-                    Codec="h264",
                     Conditions = new []
                     {
-                        new ProfileCondition(ProfileConditionType.EqualsAny, ProfileConditionValue.VideoProfile, "baseline|constrained baseline")
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Width,
+                            Value = "1920"
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Height,
+                            Value = "1080"
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.NotEquals,
+                            Property = ProfileConditionValue.IsAnamorphic,
+                            Value = "true",
+                            IsRequired = false
+                        }
                     }
                 },
 

+ 34 - 10
MediaBrowser.Dlna/Profiles/SonyBravia2010Profile.cs

@@ -209,6 +209,7 @@ namespace MediaBrowser.Dlna.Profiles
                 new CodecProfile
                 {
                     Type = CodecType.Video,
+                    Codec = "h264",
                     Conditions = new []
                     {
                         new ProfileCondition
@@ -222,16 +223,7 @@ namespace MediaBrowser.Dlna.Profiles
                             Condition = ProfileConditionType.LessThanEqual,
                             Property = ProfileConditionValue.Height,
                             Value = "1080"
-                        }
-                    }
-                },
-
-                new CodecProfile
-                {
-                    Type = CodecType.Video,
-                    Codec = "h264",
-                    Conditions = new []
-                    {
+                        },
                         new ProfileCondition
                         {
                             Condition = ProfileConditionType.LessThanEqual,
@@ -259,6 +251,18 @@ namespace MediaBrowser.Dlna.Profiles
                     Codec = "mpeg2video",
                     Conditions = new []
                     {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Width,
+                            Value = "1920"
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Height,
+                            Value = "1080"
+                        },
                         new ProfileCondition
                         {
                             Condition = ProfileConditionType.LessThanEqual,
@@ -274,6 +278,26 @@ namespace MediaBrowser.Dlna.Profiles
                     }
                 },
 
+                new CodecProfile
+                {
+                    Type = CodecType.Video,
+                    Conditions = new []
+                    {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Width,
+                            Value = "1920"
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Height,
+                            Value = "1080"
+                        }
+                    }
+                },
+
                 new CodecProfile
                 {
                     Type = CodecType.VideoAudio,

+ 34 - 10
MediaBrowser.Dlna/Profiles/SonyBravia2011Profile.cs

@@ -226,6 +226,7 @@ namespace MediaBrowser.Dlna.Profiles
                 new CodecProfile
                 {
                     Type = CodecType.Video,
+                    Codec = "h264",
                     Conditions = new []
                     {
                         new ProfileCondition
@@ -239,16 +240,7 @@ namespace MediaBrowser.Dlna.Profiles
                             Condition = ProfileConditionType.LessThanEqual,
                             Property = ProfileConditionValue.Height,
                             Value = "1080"
-                        }
-                    }
-                },
-
-                new CodecProfile
-                {
-                    Type = CodecType.Video,
-                    Codec = "h264",
-                    Conditions = new []
-                    {
+                        },
                         new ProfileCondition
                         {
                             Condition = ProfileConditionType.LessThanEqual,
@@ -276,6 +268,18 @@ namespace MediaBrowser.Dlna.Profiles
                     Codec = "mpeg2video",
                     Conditions = new []
                     {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Width,
+                            Value = "1920"
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Height,
+                            Value = "1080"
+                        },
                         new ProfileCondition
                         {
                             Condition = ProfileConditionType.LessThanEqual,
@@ -291,6 +295,26 @@ namespace MediaBrowser.Dlna.Profiles
                     }
                 },
 
+                new CodecProfile
+                {
+                    Type = CodecType.Video,
+                    Conditions = new []
+                    {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Width,
+                            Value = "1920"
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.Height,
+                            Value = "1080"
+                        }
+                    }
+                },
+
                 new CodecProfile
                 {
                     Type = CodecType.VideoAudio,

+ 0 - 274
MediaBrowser.Dlna/Profiles/WindowsMediaCenterProfile.cs

@@ -1,274 +0,0 @@
-using System.Xml.Serialization;
-using MediaBrowser.Model.Dlna;
-using MediaBrowser.Model.Dlna.Profiles;
-
-namespace MediaBrowser.Dlna.Profiles
-{
-    [XmlRoot("Profile")]
-    public class WindowsMediaCenterProfile : DefaultProfile
-    {
-        public WindowsMediaCenterProfile()
-        {
-            Name = "Windows Media Center";
-
-            TranscodingProfiles = new[]
-            {
-                new TranscodingProfile
-                {
-                    Container = "mp3",
-                    AudioCodec = "mp3",
-                    Type = DlnaProfileType.Audio
-                },
-                new TranscodingProfile
-                {
-                    Container = "asf",
-                    VideoCodec = "msmpeg4",
-                    AudioCodec = "wmav2",
-                    Type = DlnaProfileType.Video
-                }
-            };
-
-            DirectPlayProfiles = new[]
-            {
-                new DirectPlayProfile
-                {
-                    Container = "avi",
-                    VideoCodec = "mpeg4",
-                    AudioCodec = "ac3,mp3",
-                    Type = DlnaProfileType.Video
-                },
-                new DirectPlayProfile
-                {
-                    Container = "avi",
-                    VideoCodec = "h264",
-                    AudioCodec = "aac",
-                    Type = DlnaProfileType.Video
-                },
-                new DirectPlayProfile
-                {
-                    Container = "mp4,mov",
-                    VideoCodec = "h264,mpeg4",
-                    AudioCodec = "aac,ac3",
-                    Type = DlnaProfileType.Video
-                },
-                new DirectPlayProfile
-                {
-                    Container = "asf",
-                    VideoCodec = "wmv2,wmv3,vc1",
-                    AudioCodec = "wmav2,wmapro",
-                    Type = DlnaProfileType.Video
-                },
-                new DirectPlayProfile
-                {
-                    Container = "asf",
-                    AudioCodec = "wmav2,wmapro,wmavoice",
-                    Type = DlnaProfileType.Audio
-                },
-                new DirectPlayProfile
-                {
-                    Container = "mp3",
-                    AudioCodec = "mp3",
-                    Type = DlnaProfileType.Audio
-                },
-                new DirectPlayProfile
-                {
-                    Container = "jpeg",
-                    Type = DlnaProfileType.Photo
-                }
-            };
-
-            ResponseProfiles = new[]
-            {
-                new ResponseProfile
-                {
-                    Container = "avi",
-                    MimeType = "video/avi",
-                    Type = DlnaProfileType.Video
-                }
-            };
-
-            ContainerProfiles = new[]
-            {
-                new ContainerProfile
-                {
-                    Type = DlnaProfileType.Video,
-                    Container = "mp4,mov",
-
-                    Conditions = new []
-                    {
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.Equals,
-                            Property = ProfileConditionValue.Has64BitOffsets,
-                            Value = "false",
-                            IsRequired = false
-                        }
-                    }
-                }
-            };
-
-            CodecProfiles = new[]
-            {
-                new CodecProfile
-                {
-                    Type = CodecType.Video,
-                    Codec = "mpeg4",
-                    Conditions = new []
-                    {
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.Width,
-                            Value = "1280"
-                        },
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.Height,
-                            Value = "720"
-                        },
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.VideoFramerate,
-                            Value = "30",
-                            IsRequired = false
-                        },
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.VideoBitrate,
-                            Value = "5120000",
-                            IsRequired = false
-                        }
-                    }
-                },
-
-                new CodecProfile
-                {
-                    Type = CodecType.Video,
-                    Codec = "h264",
-                    Conditions = new []
-                    {
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.Width,
-                            Value = "1920"
-                        },
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.Height,
-                            Value = "1080"
-                        },
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.VideoLevel,
-                            Value = "41",
-                            IsRequired = false
-                        },
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.VideoBitrate,
-                            Value = "10240000",
-                            IsRequired = false
-                        }
-                    }
-                },
-
-                new CodecProfile
-                {
-                    Type = CodecType.Video,
-                    Codec = "wmv2,wmv3,vc1",
-                    Conditions = new []
-                    {
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.Width,
-                            Value = "1920"
-                        },
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.Height,
-                            Value = "1080"
-                        },
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.VideoFramerate,
-                            Value = "30",
-                            IsRequired = false
-                        },
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.VideoBitrate,
-                            Value = "15360000",
-                            IsRequired = false
-                        }
-                    }
-                },
-
-                new CodecProfile
-                {
-                    Type = CodecType.VideoAudio,
-                    Codec = "ac3",
-                    Conditions = new []
-                    {
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.AudioChannels,
-                            Value = "6",
-                            IsRequired = false
-                        }
-                    }
-                },
-
-                new CodecProfile
-                {
-                    Type = CodecType.VideoAudio,
-                    Codec = "wmav2,wmapro",
-                    Conditions = new []
-                    {
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.AudioChannels,
-                            Value = "2",
-                            IsRequired = false
-                        }
-                    }
-                },
-
-                new CodecProfile
-                {
-                    Type = CodecType.VideoAudio,
-                    Codec = "aac",
-                    Conditions = new []
-                    {
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.LessThanEqual,
-                            Property = ProfileConditionValue.AudioChannels,
-                            Value = "2",
-                            IsRequired = false
-                        },
-                        new ProfileCondition
-                        {
-                            Condition = ProfileConditionType.Equals,
-                            Property = ProfileConditionValue.AudioProfile,
-                            Value = "lc",
-                            IsRequired = false
-                        }
-                    }
-                }
-            };
-        }
-    }
-}

+ 81 - 17
MediaBrowser.Dlna/Profiles/XboxOneProfile.cs

@@ -12,18 +12,27 @@ namespace MediaBrowser.Dlna.Profiles
             Name = "Xbox One";
 
             TimelineOffsetSeconds = 40;
-            
+
             Identification = new DeviceIdentification
             {
-                ModelName = "Xbox One",
-                FriendlyName = "Xbox-SystemOS",
+                FriendlyName = "XboxOne",
 
                 Headers = new[]
                 {
-                    new HttpHeaderInfo {Name = "User-Agent", Value = "NSPlayer", Match = HeaderMatchType.Substring}
+                    new HttpHeaderInfo
+                    {
+                        Name = "FriendlyName.DLNA.ORG", Value = "XboxOne", Match = HeaderMatchType.Substring
+                    },
+                    new HttpHeaderInfo
+                    {
+                        Name = "User-Agent", Value = "NSPlayer/12", Match = HeaderMatchType.Substring
+                    }
                 }
             };
 
+            var videoProfile = "high|main|baseline|constrained baseline";
+            var videoLevel = "41";
+
             TranscodingProfiles = new[]
             {
                 new TranscodingProfile
@@ -43,8 +52,7 @@ namespace MediaBrowser.Dlna.Profiles
                     Container = "ts",
                     VideoCodec = "h264",
                     AudioCodec = "aac",
-                    Type = DlnaProfileType.Video,
-                    EstimateContentLength = true
+                    Type = DlnaProfileType.Video
                 }
             };
 
@@ -129,6 +137,7 @@ namespace MediaBrowser.Dlna.Profiles
                 new CodecProfile
                 {
                     Type = CodecType.Video,
+                    Codec = "mpeg4",
                     Conditions = new []
                     {
                         new ProfileCondition
@@ -144,16 +153,7 @@ namespace MediaBrowser.Dlna.Profiles
                             Property = ProfileConditionValue.VideoBitDepth,
                             Value = "8",
                             IsRequired = false
-                        }
-                    }
-                },
-
-                new CodecProfile
-                {
-                    Type = CodecType.Video,
-                    Codec = "mpeg4",
-                    Conditions = new []
-                    {
+                        },
                         new ProfileCondition
                         {
                             Condition = ProfileConditionType.LessThanEqual,
@@ -189,6 +189,20 @@ namespace MediaBrowser.Dlna.Profiles
                     Codec = "h264",
                     Conditions = new []
                     {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.NotEquals,
+                            Property = ProfileConditionValue.IsAnamorphic,
+                            Value = "true",
+                            IsRequired = false
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.VideoBitDepth,
+                            Value = "8",
+                            IsRequired = false
+                        },
                         new ProfileCondition
                         {
                             Condition = ProfileConditionType.LessThanEqual,
@@ -200,6 +214,20 @@ namespace MediaBrowser.Dlna.Profiles
                             Condition = ProfileConditionType.LessThanEqual,
                             Property = ProfileConditionValue.Height,
                             Value = "1080"
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.VideoLevel,
+                            Value = videoLevel,
+                            IsRequired = false
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.EqualsAny,
+                            Property = ProfileConditionValue.VideoProfile,
+                            Value = videoProfile,
+                            IsRequired = false
                         }
                     }
                 },
@@ -210,6 +238,20 @@ namespace MediaBrowser.Dlna.Profiles
                     Codec = "wmv2,wmv3,vc1",
                     Conditions = new []
                     {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.NotEquals,
+                            Property = ProfileConditionValue.IsAnamorphic,
+                            Value = "true",
+                            IsRequired = false
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.VideoBitDepth,
+                            Value = "8",
+                            IsRequired = false
+                        },
                         new ProfileCondition
                         {
                             Condition = ProfileConditionType.LessThanEqual,
@@ -239,6 +281,28 @@ namespace MediaBrowser.Dlna.Profiles
                     }
                 },
 
+                new CodecProfile
+                {
+                    Type = CodecType.Video,
+                    Conditions = new []
+                    {
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.NotEquals,
+                            Property = ProfileConditionValue.IsAnamorphic,
+                            Value = "true",
+                            IsRequired = false
+                        },
+                        new ProfileCondition
+                        {
+                            Condition = ProfileConditionType.LessThanEqual,
+                            Property = ProfileConditionValue.VideoBitDepth,
+                            Value = "8",
+                            IsRequired = false
+                        }
+                    }
+                },
+
                 new CodecProfile
                 {
                     Type = CodecType.VideoAudio,
@@ -278,7 +342,7 @@ namespace MediaBrowser.Dlna.Profiles
                     }
                 }
             };
-            
+
             ResponseProfiles = new[]
             {
                 new ResponseProfile

+ 2 - 2
MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml

@@ -49,7 +49,7 @@
   </TranscodingProfiles>
   <ContainerProfiles />
   <CodecProfiles>
-    <CodecProfile type="Video">
+    <CodecProfile type="Video" codec="h264">
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
@@ -58,7 +58,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
       </Conditions>
     </CodecProfile>
-    <CodecProfile type="Video" codec="mpeg2video">
+    <CodecProfile type="Video">
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />

+ 6 - 3
MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml

@@ -44,16 +44,19 @@
   </TranscodingProfiles>
   <ContainerProfiles />
   <CodecProfiles>
-    <CodecProfile type="Video">
+    <CodecProfile type="Video" codec="h264">
       <Conditions>
+        <ProfileCondition condition="EqualsAny" property="VideoProfile" value="baseline|constrained baseline" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
       </Conditions>
     </CodecProfile>
-    <CodecProfile type="Video" codec="h264">
+    <CodecProfile type="Video">
       <Conditions>
-        <ProfileCondition condition="EqualsAny" property="VideoProfile" value="baseline|constrained baseline" isRequired="false" />
+        <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
+        <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
       </Conditions>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="aac">

+ 9 - 5
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml

@@ -58,14 +58,10 @@
     </ContainerProfile>
   </ContainerProfiles>
   <CodecProfiles>
-    <CodecProfile type="Video">
+    <CodecProfile type="Video" codec="h264">
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
-      </Conditions>
-    </CodecProfile>
-    <CodecProfile type="Video" codec="h264">
-      <Conditions>
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
@@ -73,10 +69,18 @@
     </CodecProfile>
     <CodecProfile type="Video" codec="mpeg2video">
       <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
       </Conditions>
     </CodecProfile>
+    <CodecProfile type="Video">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
+      </Conditions>
+    </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3">
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />

+ 9 - 5
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml

@@ -61,14 +61,10 @@
     </ContainerProfile>
   </ContainerProfiles>
   <CodecProfiles>
-    <CodecProfile type="Video">
+    <CodecProfile type="Video" codec="h264">
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
-      </Conditions>
-    </CodecProfile>
-    <CodecProfile type="Video" codec="h264">
-      <Conditions>
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
@@ -76,10 +72,18 @@
     </CodecProfile>
     <CodecProfile type="Video" codec="mpeg2video">
       <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
       </Conditions>
     </CodecProfile>
+    <CodecProfile type="Video">
+      <Conditions>
+        <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
+      </Conditions>
+    </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3">
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />

+ 17 - 9
MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml

@@ -2,10 +2,10 @@
 <Profile xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <Name>Xbox One</Name>
   <Identification>
-    <FriendlyName>Xbox-SystemOS</FriendlyName>
-    <ModelName>Xbox One</ModelName>
+    <FriendlyName>XboxOne</FriendlyName>
     <Headers>
-      <HttpHeaderInfo name="User-Agent" value="NSPlayer" match="Substring" />
+      <HttpHeaderInfo name="FriendlyName.DLNA.ORG" value="XboxOne" match="Substring" />
+      <HttpHeaderInfo name="User-Agent" value="NSPlayer/12" match="Substring" />
     </Headers>
   </Identification>
   <FriendlyName>Emby</FriendlyName>
@@ -48,7 +48,7 @@
   <TranscodingProfiles>
     <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" context="Streaming" />
     <TranscodingProfile container="jpeg" type="Photo" videoCodec="jpeg" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" context="Streaming" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" context="Streaming" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" context="Streaming" />
   </TranscodingProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Video" container="mp4,mov">
@@ -58,14 +58,10 @@
     </ContainerProfile>
   </ContainerProfiles>
   <CodecProfiles>
-    <CodecProfile type="Video">
+    <CodecProfile type="Video" codec="mpeg4">
       <Conditions>
         <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
-      </Conditions>
-    </CodecProfile>
-    <CodecProfile type="Video" codec="mpeg4">
-      <Conditions>
         <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
@@ -74,18 +70,30 @@
     </CodecProfile>
     <CodecProfile type="Video" codec="h264">
       <Conditions>
+        <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
+        <ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
+        <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
+        <ProfileCondition condition="EqualsAny" property="VideoProfile" value="high|main|baseline|constrained baseline" isRequired="false" />
       </Conditions>
     </CodecProfile>
     <CodecProfile type="Video" codec="wmv2,wmv3,vc1">
       <Conditions>
+        <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
+        <ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="Width" value="1920" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
       </Conditions>
     </CodecProfile>
+    <CodecProfile type="Video">
+      <Conditions>
+        <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
+        <ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
+      </Conditions>
+    </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3,wmav2,wmapro">
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />

+ 14 - 4
MediaBrowser.Model/Dlna/StreamInfo.cs

@@ -102,7 +102,7 @@ namespace MediaBrowser.Model.Dlna
             }
 
             List<string> list = new List<string>();
-            foreach (NameValuePair pair in BuildParams(this, accessToken))
+            foreach (NameValuePair pair in BuildParams(this, accessToken, false))
             {
                 if (string.IsNullOrEmpty(pair.Value))
                 {
@@ -173,7 +173,7 @@ namespace MediaBrowser.Model.Dlna
         {
             List<string> list = new List<string>();
 
-            foreach (NameValuePair pair in BuildParams(item, accessToken))
+            foreach (NameValuePair pair in BuildParams(item, accessToken, true))
             {
                 list.Add(pair.Value);
             }
@@ -181,7 +181,7 @@ namespace MediaBrowser.Model.Dlna
             return string.Format("Params={0}", string.Join(";", list.ToArray()));
         }
 
-        private static List<NameValuePair> BuildParams(StreamInfo item, string accessToken)
+        private static List<NameValuePair> BuildParams(StreamInfo item, string accessToken, bool isDlna)
         {
             List<NameValuePair> list = new List<NameValuePair>();
 
@@ -211,7 +211,17 @@ namespace MediaBrowser.Model.Dlna
 
             list.Add(new NameValuePair("Level", item.VideoLevel.HasValue ? StringHelper.ToStringCultureInvariant(item.VideoLevel.Value) : string.Empty));
 
-            list.Add(new NameValuePair("ClientTime", item.IsDirectStream ? string.Empty : DateTime.UtcNow.Ticks.ToString(CultureInfo.InvariantCulture)));
+            if (isDlna)
+            {
+                // The player may see it as separate resources due to url differences
+                // And then try to request more than one at playback
+                list.Add(new NameValuePair("ClientTime", string.Empty));
+            }
+            else
+            {
+                list.Add(new NameValuePair("ClientTime", item.IsDirectStream ? string.Empty : DateTime.UtcNow.Ticks.ToString(CultureInfo.InvariantCulture)));
+            }
+
             list.Add(new NameValuePair("MaxRefFrames", item.MaxRefFrames.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxRefFrames.Value) : string.Empty));
             list.Add(new NameValuePair("MaxVideoBitDepth", item.MaxVideoBitDepth.HasValue ? StringHelper.ToStringCultureInvariant(item.MaxVideoBitDepth.Value) : string.Empty));
             list.Add(new NameValuePair("Profile", item.VideoProfile ?? string.Empty));

+ 23 - 1
MediaBrowser.Providers/TV/TvdbSeriesProvider.cs

@@ -10,6 +10,7 @@ using MediaBrowser.Model.Configuration;
 using MediaBrowser.Model.Entities;
 using MediaBrowser.Model.IO;
 using MediaBrowser.Model.Logging;
+using MediaBrowser.Model.Net;
 using MediaBrowser.Model.Providers;
 using System;
 using System.Collections.Generic;
@@ -190,6 +191,27 @@ namespace MediaBrowser.Providers.TV
         /// <param name="cancellationToken">The cancellation token.</param>
         /// <returns>Task.</returns>
         internal async Task DownloadSeriesZip(string seriesId, string seriesDataPath, long? lastTvDbUpdateTime, string preferredMetadataLanguage, CancellationToken cancellationToken)
+        {
+            try
+            {
+                await DownloadSeriesZip(seriesId, seriesDataPath, lastTvDbUpdateTime, preferredMetadataLanguage, preferredMetadataLanguage, cancellationToken).ConfigureAwait(false);
+                return;
+            }
+            catch (HttpException ex)
+            {
+                if (!ex.StatusCode.HasValue || ex.StatusCode.Value != HttpStatusCode.NotFound)
+                {
+                    throw;
+                }
+            }
+
+            if (!string.Equals(preferredMetadataLanguage, "en", StringComparison.OrdinalIgnoreCase))
+            {
+                await DownloadSeriesZip(seriesId, seriesDataPath, lastTvDbUpdateTime, "en", preferredMetadataLanguage, cancellationToken).ConfigureAwait(false);
+            }
+        }
+
+        private async Task DownloadSeriesZip(string seriesId, string seriesDataPath, long? lastTvDbUpdateTime, string preferredMetadataLanguage, string saveAsMetadataLanguage, CancellationToken cancellationToken)
         {
             var url = string.Format(SeriesGetZip, TVUtils.TvdbApiKey, seriesId, preferredMetadataLanguage);
 
@@ -221,7 +243,7 @@ namespace MediaBrowser.Providers.TV
                 await SanitizeXmlFile(file).ConfigureAwait(false);
             }
 
-            await ExtractEpisodes(seriesDataPath, Path.Combine(seriesDataPath, preferredMetadataLanguage + ".xml"), lastTvDbUpdateTime).ConfigureAwait(false);
+            await ExtractEpisodes(seriesDataPath, Path.Combine(seriesDataPath, saveAsMetadataLanguage + ".xml"), lastTvDbUpdateTime).ConfigureAwait(false);
         }
 
         public TvdbOptions GetTvDbOptions()

+ 6 - 0
MediaBrowser.Server.Implementations/Library/LibraryManager.cs

@@ -1637,6 +1637,12 @@ namespace MediaBrowser.Server.Implementations.Library
                 refresh = true;
             }
 
+            if (!string.Equals(viewType, item.ViewType, StringComparison.OrdinalIgnoreCase))
+            {
+                item.ViewType = viewType;
+                await item.UpdateToRepository(ItemUpdateType.MetadataEdit, cancellationToken).ConfigureAwait(false);
+            }
+
             if (!refresh && item != null)
             {
                 refresh = (DateTime.UtcNow - item.DateLastSaved).TotalHours >= 24;

+ 14 - 8
MediaBrowser.Server.Implementations/Photos/BaseDynamicImageProvider.cs

@@ -94,7 +94,7 @@ namespace MediaBrowser.Server.Implementations.Photos
 
         protected abstract Task<List<BaseItem>> GetItemsWithImages(IHasImages item);
 
-        private const string Version = "29";
+        private const string Version = "31";
         protected string GetConfigurationCacheKey(List<BaseItem> items, string itemName)
         {
             var parts = Version + "_" + (itemName ?? string.Empty) + "_" +
@@ -103,9 +103,9 @@ namespace MediaBrowser.Server.Implementations.Photos
             return parts.GetMD5().ToString("N");
         }
 
-        protected void CreateThumbCollage(IHasImages primaryItem, List<BaseItem> items, string outputPath)
+        protected void CreateThumbCollage(IHasImages primaryItem, List<BaseItem> items, string outputPath, bool drawText)
         {
-            CreateCollage(primaryItem, items, outputPath, 960, 540, true, primaryItem.Name);
+            CreateCollage(primaryItem, items, outputPath, 960, 540, drawText, primaryItem.Name);
         }
 
         protected virtual IEnumerable<string> GetStripCollageImagePaths(IHasImages primaryItem, IEnumerable<BaseItem> items)
@@ -120,9 +120,9 @@ namespace MediaBrowser.Server.Implementations.Photos
             CreateCollage(primaryItem, items, outputPath, 600, 900, true, primaryItem.Name);
         }
 
-        protected void CreateSquareCollage(IHasImages primaryItem, List<BaseItem> items, string outputPath)
+        protected void CreateSquareCollage(IHasImages primaryItem, List<BaseItem> items, string outputPath, bool drawText)
         {
-            CreateCollage(primaryItem, items, outputPath, 800, 800, true, primaryItem.Name);
+            CreateCollage(primaryItem, items, outputPath, 800, 800, drawText, primaryItem.Name);
         }
 
         protected void CreateThumbCollage(IHasImages primaryItem, List<BaseItem> items, string outputPath, int width, int height, bool drawText, string text)
@@ -162,17 +162,23 @@ namespace MediaBrowser.Server.Implementations.Photos
                 return false;
             }
 
+            var drawText = !(item is UserView);
+
             if (imageType == ImageType.Thumb)
             {
-                CreateThumbCollage(item, itemsWithImages, outputPath);
+                CreateThumbCollage(item, itemsWithImages, outputPath, drawText);
                 return true;
             }
 
             if (imageType == ImageType.Primary)
             {
-                if (item is PhotoAlbum || item is Playlist)
+                if (item is UserView)
+                {
+                    CreateSquareCollage(item, itemsWithImages, outputPath, drawText);
+                }
+                else if (item is PhotoAlbum || item is Playlist)
                 {
-                    CreateSquareCollage(item, itemsWithImages, outputPath);
+                    CreateSquareCollage(item, itemsWithImages, outputPath, drawText);
                 }
                 else
                 {

+ 2 - 2
SharedVersion.cs

@@ -1,4 +1,4 @@
 using System.Reflection;
 
-//[assembly: AssemblyVersion("3.0.*")]
-[assembly: AssemblyVersion("3.0.5582.2")]
+[assembly: AssemblyVersion("3.0.*")]
+//[assembly: AssemblyVersion("3.0.5582.2")]