diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-28 14:17:26 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-28 14:17:26 -0400 |
| commit | 1dafb46b71aef08e45f265e6c1070d0a9270a78f (patch) | |
| tree | 8170f8a176e31bb521f7e746a47e337bb26003d9 | |
| parent | 934b3e668cdad0ad29f7d6a3f613fc4d687c6743 (diff) | |
| parent | 810edea54777f4d8b940bdfe071c180337be2cbb (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
| -rw-r--r-- | MediaBrowser.Dlna/PlayTo/DidlBuilder.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Dlna/PlayTo/DlnaController.cs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/MediaBrowser.Dlna/PlayTo/DidlBuilder.cs b/MediaBrowser.Dlna/PlayTo/DidlBuilder.cs index 1327da148..80235740f 100644 --- a/MediaBrowser.Dlna/PlayTo/DidlBuilder.cs +++ b/MediaBrowser.Dlna/PlayTo/DidlBuilder.cs @@ -40,7 +40,7 @@ namespace MediaBrowser.Dlna.PlayTo /// <param name="streamUrl">The stream URL.</param> /// <param name="streams">The streams.</param> /// <returns>System.String.</returns> - public static string Build(BaseItem dto, string userId, string serverAddress, string streamUrl, IEnumerable<MediaStream> streams) + public static string Build(BaseItem dto, string userId, string serverAddress, string streamUrl, IEnumerable<MediaStream> streams, bool includeImageRes) { string response = string.Format(DIDL_START, dto.Id, userId); response += string.Format(DIDL_TITLE, dto.Name.Replace("&", "and")); @@ -51,7 +51,7 @@ namespace MediaBrowser.Dlna.PlayTo var imageUrl = GetImageUrl(dto, serverAddress); - if (!string.IsNullOrEmpty(imageUrl)) + if (!string.IsNullOrWhiteSpace(imageUrl)) { response += string.Format(DIDL_IMAGE, imageUrl); } @@ -65,7 +65,7 @@ namespace MediaBrowser.Dlna.PlayTo response += string.Format(DESCRIPTION, UNKNOWN); response += GetVideoDIDL(dto, streamUrl, streams); - if (!string.IsNullOrEmpty(imageUrl)) + if (includeImageRes && !string.IsNullOrWhiteSpace(imageUrl)) { response += string.Format(DIDL_IMAGE_RES, imageUrl); } @@ -84,7 +84,7 @@ namespace MediaBrowser.Dlna.PlayTo response += GetAudioDIDL(dto, streamUrl, streams); - if (!string.IsNullOrEmpty(imageUrl)) + if (includeImageRes && !string.IsNullOrWhiteSpace(imageUrl)) { response += string.Format(DIDL_ALBUMIMAGE_RES, imageUrl); } diff --git a/MediaBrowser.Dlna/PlayTo/DlnaController.cs b/MediaBrowser.Dlna/PlayTo/DlnaController.cs index e4bd8819d..e99c7b50e 100644 --- a/MediaBrowser.Dlna/PlayTo/DlnaController.cs +++ b/MediaBrowser.Dlna/PlayTo/DlnaController.cs @@ -435,7 +435,7 @@ namespace MediaBrowser.Dlna.PlayTo playlistItem.StreamUrl = StreamHelper.GetVideoUrl(_device.Properties, playlistItem, streams, serverAddress); } - playlistItem.Didl = DidlBuilder.Build(item, _session.UserId.ToString(), serverAddress, playlistItem.StreamUrl, streams); + playlistItem.Didl = DidlBuilder.Build(item, _session.UserId.ToString(), serverAddress, playlistItem.StreamUrl, streams, profile.EnableAlbumArtInDidl); return playlistItem; } |
