Skip to content

Commit

Permalink
Fix: Contextmenu for songs #1356
Browse files Browse the repository at this point in the history
  • Loading branch information
jcorporation committed Oct 8, 2024
1 parent 299eac0 commit 34e994f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This is a small maintenance release.
- Feat: New custom Lua function: mympd.splitlines(), mympd.trim(), mympd.read_file()
- Upd: Translations
- Upd: Mongoose to current master
- Fix: Contextmenu for songs #1356

***

Expand Down
6 changes: 6 additions & 0 deletions htdocs/js/views.js
Original file line number Diff line number Diff line change
Expand Up @@ -718,4 +718,10 @@ function setEntryData(entry, data) {
break;
// No Default
}
if (data.Thumbnail !== undefined) {
setData(entry, 'cssImageUrl', data.Thumbnail);
}
else {
setData(entry, 'cssImageUrl', getCssImageUri('/assets/coverimage-notavailable'));
}
}
1 change: 0 additions & 1 deletion htdocs/js/viewsGrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ function updateGrid(obj, list, perCardCallback, createCardBodyCallback, createCa
card.appendChild(
elCreateEmpty('div', {"class": ["card-title", "cover-loading", "cover-grid", "d-flex"]})
);
setData(card, 'cssImageUrl', obj.result.data[i].Thumbnail);
if (userAgentData.hasIO === true) {
const observer = new IntersectionObserver(setGridImage, {root: null, rootMargin: '0px'});
observer.observe(card);
Expand Down
1 change: 0 additions & 1 deletion htdocs/js/viewsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ function updateList(obj, list, perCardCallback, createCardBodyCallback, createCa
row.appendChild(
elCreateEmpty('div', {"class": ["col", "list-image"]})
);
setData(card, 'cssImageUrl', obj.result.data[i].Thumbnail);
if (userAgentData.hasIO === true) {
const observer = new IntersectionObserver(setListImage, {root: null, rootMargin: '0px'});
observer.observe(card);
Expand Down

0 comments on commit 34e994f

Please sign in to comment.