The Free Software Media System - Server Backend & API
Use Guid for BaseItemDto parent ids
Niels van Velzen2afcaa6ae1f0
diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.csindex 4ed7c40be5..f5ca006dd1 100644--- a/Emby.Server.Implementations/Dto/DtoService.cs+++ b/Emby.Server.Implementations/Dto/DtoService.cs@@ -458,11 +458,6 @@ namespace Emby.Server.Implementations.Dto}}- private string GetDtoId(BaseItem item)- {- return item.Id.ToString("N", CultureInfo.InvariantCulture);- }-private void SetMusicVideoProperties(BaseItemDto dto, MusicVideo item){if (!string.IsNullOrEmpty(item.Album))@@ -1324,7 +1319,7 @@ namespace Emby.Server.Implementations.Dtoif (image != null){- dto.ParentLogoItemId = GetDtoId(parent);+ dto.ParentLogoItemId = parent.Id;dto.ParentLogoImageTag = GetTagAndFillBlurhash(dto, parent, image);}}@@ -1335,7 +1330,7 @@ namespace Emby.Server.Implementations.Dtoif (image != null){- dto.ParentArtItemId = GetDtoId(parent);+ dto.ParentArtItemId = parent.Id;dto.ParentArtImageTag = GetTagAndFillBlurhash(dto, parent, image);}}@@ -1346,7 +1341,7 @@ namespace Emby.Server.Implementations.Dtoif (image != null){- dto.ParentThumbItemId = GetDtoId(parent);+ dto.ParentThumbItemId = parent.Id;dto.ParentThumbImageTag = GetTagAndFillBlurhash(dto, parent, image);}}@@ -1357,7 +1352,7 @@ namespace Emby.Server.Implementations.Dtoif (images.Count > 0){- dto.ParentBackdropItemId = GetDtoId(parent);+ dto.ParentBackdropItemId = parent.Id;dto.ParentBackdropImageTags = GetTagsAndFillBlurhashes(dto, parent, ImageType.Backdrop, images);}}diff --git a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.csindex 323b960210..fbce7af2d4 100644--- a/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs+++ b/Emby.Server.Implementations/LiveTv/LiveTvDtoService.cs@@ -176,7 +176,7 @@ namespace Emby.Server.Implementations.LiveTvtry{dto.ParentThumbImageTag = _imageProcessor.GetImageCacheTag(librarySeries, image);- dto.ParentThumbItemId = librarySeries.Id.ToString("N", CultureInfo.InvariantCulture);+ dto.ParentThumbItemId = librarySeries.Id;}catch (Exception ex){@@ -193,7 +193,7 @@ namespace Emby.Server.Implementations.LiveTv{_imageProcessor.GetImageCacheTag(librarySeries, image)};- dto.ParentBackdropItemId = librarySeries.Id.ToString("N", CultureInfo.InvariantCulture);+ dto.ParentBackdropItemId = librarySeries.Id;}catch (Exception ex){@@ -240,7 +240,7 @@ namespace Emby.Server.Implementations.LiveTv_imageProcessor.GetImageCacheTag(program, image)};- dto.ParentBackdropItemId = program.Id.ToString("N", CultureInfo.InvariantCulture);+ dto.ParentBackdropItemId = program.Id;}catch (Exception ex){diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.csindex a784025e3d..094dc73b27 100644--- a/MediaBrowser.Model/Dto/BaseItemDto.cs+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs@@ -297,13 +297,13 @@ namespace MediaBrowser.Model.Dto/// Gets or sets wether the item has a logo, this will hold the Id of the Parent that has one./// </summary>/// <value>The parent logo item id.</value>- public string ParentLogoItemId { get; set; }+ public Guid? ParentLogoItemId { get; set; }/// <summary>/// Gets or sets wether the item has any backdrops, this will hold the Id of the Parent that has one./// </summary>/// <value>The parent backdrop item id.</value>- public string ParentBackdropItemId { get; set; }+ public Guid? ParentBackdropItemId { get; set; }/// <summary>/// Gets or sets the parent backdrop image tags.@@ -509,7 +509,7 @@ namespace MediaBrowser.Model.Dto/// Gets or sets wether the item has fan art, this will hold the Id of the Parent that has one./// </summary>/// <value>The parent art item id.</value>- public string ParentArtItemId { get; set; }+ public Guid? ParentArtItemId { get; set; }/// <summary>/// Gets or sets the parent art image tag.@@ -540,7 +540,7 @@ namespace MediaBrowser.Model.Dto/// Gets or sets the parent thumb item id./// </summary>/// <value>The parent thumb item id.</value>- public string ParentThumbItemId { get; set; }+ public Guid? ParentThumbItemId { get; set; }/// <summary>/// Gets or sets the parent thumb image tag.