From 43685029438131eac78836d65a01e7a8f9914373 Mon Sep 17 00:00:00 2001 From: ferferga Date: Sat, 30 May 2020 17:10:38 +0200 Subject: [PATCH] Apply API changes to listview --- src/components/listview/listview.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/listview/listview.js b/src/components/listview/listview.js index c51f0c58e8..a4b89fcbc3 100644 --- a/src/components/listview/listview.js +++ b/src/components/listview/listview.js @@ -92,8 +92,10 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan options.tag = item.ParentPrimaryImageTag; itemId = item.ParentPrimaryImageItemId; } + let blurHashes = item.ImageBlurHashes || {}; + let blurhashstr = (blurHashes[options.type] || {})[options.tag]; - return { url: apiClient.getScaledImageUrl(itemId, options), blurHash: (item.ImageBlurHashes || {})[options.type][options.tag]}; + return { url: apiClient.getScaledImageUrl(itemId, options), blurhash: blurhashstr}; } function getChannelImageUrl(item, width) { @@ -107,8 +109,10 @@ define(['itemHelper', 'mediaInfo', 'indicators', 'connectionManager', 'layoutMan if (item.ChannelId && item.ChannelPrimaryImageTag) { options.tag = item.ChannelPrimaryImageTag; } + let blurHashes = item.ImageBlurHashes || {}; + let blurhashstr = (blurHashes[options.type])[options.tag]; - return { url: apiClient.getScaledImageUrl(item.ChannelId, options), blurhash: (item.ImageBlurHashes || {})[options.type][options.tag]}; + return { url: apiClient.getScaledImageUrl(item.ChannelId, options), blurhash: blurhashstr}; } function getTextLinesHtml(textlines, isLargeStyle) {