diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index ce3c38f..bf36fb4 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -19,6 +19,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 1
+ ref: ${{ github.head_ref || github.ref }}
- name: Setup Bun
uses: oven-sh/setup-bun@v1
@@ -55,7 +56,6 @@ jobs:
commit_message: 'style: auto-fix linting issues'
commit_user_name: 'github-actions[bot]'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
- only_if_changed: true
- name: Run HTML Lint
run: bun run lint:html
diff --git a/js/events.js b/js/events.js
index be7c97d..d660f6b 100644
--- a/js/events.js
+++ b/js/events.js
@@ -1458,10 +1458,12 @@ export async function handleTrackAction(
const layout = localStorage.getItem('libraryLikedTracksView') || 'list';
const tempDiv = document.createElement('div');
if (layout === 'grid') {
- tracksContainer.className = 'card-grid';
+ tracksContainer.classList.remove('track-list');
+ tracksContainer.classList.add('card-grid');
tempDiv.innerHTML = ui.createTrackCardHTML(item);
} else {
- tracksContainer.className = 'track-list';
+ tracksContainer.classList.remove('card-grid');
+ tracksContainer.classList.add('track-list');
const index = tracksContainer.children.length;
tempDiv.innerHTML = ui.createTrackItemHTML(item, index, true, false, false, true);
}
@@ -1470,7 +1472,7 @@ export async function handleTrackAction(
if (newEl) {
tracksContainer.appendChild(newEl);
trackDataStore.set(newEl, item);
- ui.updateLikeState(newEl, item.type === 'video' ? 'video' : 'track', item.id);
+ ui.updateLikeState(newEl, 'track', item.id);
const likedToolbar = document.getElementById('library-liked-tracks-toolbar');
if (likedToolbar) likedToolbar.style.display = 'flex';
const shuffleBtn = document.getElementById('shuffle-liked-tracks-btn');
diff --git a/js/ui.js b/js/ui.js
index 30102eb..10fa97a 100644
--- a/js/ui.js
+++ b/js/ui.js
@@ -738,13 +738,18 @@ export class UIRenderer {
videoCoverCandidate && (typeof videoCoverCandidate === 'string' || typeof videoCoverCandidate === 'number')
? this.api.getVideoCoverUrl(videoCoverCandidate)
: null;
- const cover = video.image || video.cover;
+ const coverFallback = video.image || video.cover;
+ const coverPrimitive =
+ coverFallback != null &&
+ (typeof coverFallback === 'string' || typeof coverFallback === 'number')
+ ? coverFallback
+ : null;
let imageHTML;
if (videoCoverUrl) {
imageHTML = ``;
- } else if (cover) {
- imageHTML = this.getCoverHTML(cover, escapeHtml(video.title));
+ } else if (coverPrimitive) {
+ imageHTML = this.getCoverHTML(coverPrimitive, escapeHtml(video.title));
} else {
imageHTML = `