From 69aead1984e0328b2dd7eae2c82238351e21c09d Mon Sep 17 00:00:00 2001 From: danactive Date: Thu, 23 Dec 2021 18:28:45 -0800 Subject: [PATCH] fix(API > Edit Album): Replace broken video images with JPG file types --- api/server/plugins/editAlbum/public/edit_admin_xml.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api/server/plugins/editAlbum/public/edit_admin_xml.js b/api/server/plugins/editAlbum/public/edit_admin_xml.js index f96b28f93..8f2f3e0fe 100644 --- a/api/server/plugins/editAlbum/public/edit_admin_xml.js +++ b/api/server/plugins/editAlbum/public/edit_admin_xml.js @@ -228,11 +228,13 @@ const album = { $.each(album.json.album.item, (i, item) => { const filename = getFilename(item.filename); const year = filename.substr(0, filename.indexOf('-')); + const isJpg = filename.includes('jpg') || filename.includes('jpeg') + const filenamePhoto = isJpg ? filename : filename.replace('mp4', 'jpg') $('
') .click(album.photo.Invoke) .data('photo', item) - .html([''].join('')) + .html([''].join('')) .appendTo('#listPhotos'); }); },