Show media title (Artist – Title) instead of filename when available
- Extract title and artist tags via mutagen easy=True in get_media_info - Display "Artist – Title" in both grid and list views, fall back to filename - Show original filename in tooltip on hover Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1705,10 +1705,10 @@ function renderBrowserList(items, container) {
|
||||
}
|
||||
row.appendChild(icon);
|
||||
|
||||
// Name
|
||||
// Name (show media title if available)
|
||||
const name = document.createElement('div');
|
||||
name.className = 'browser-list-name';
|
||||
name.textContent = item.name;
|
||||
name.textContent = item.title || item.name;
|
||||
row.appendChild(name);
|
||||
|
||||
// Bitrate
|
||||
@@ -1736,9 +1736,9 @@ function renderBrowserList(items, container) {
|
||||
row.appendChild(document.createElement('div'));
|
||||
}
|
||||
|
||||
// Tooltip on row when name is ellipsed
|
||||
// Tooltip: show filename when title is displayed, or when name is ellipsed
|
||||
row.addEventListener('mouseenter', () => {
|
||||
if (name.scrollWidth > name.clientWidth) {
|
||||
if (item.title || name.scrollWidth > name.clientWidth) {
|
||||
row.title = item.name;
|
||||
} else {
|
||||
row.title = '';
|
||||
@@ -1820,7 +1820,7 @@ function renderBrowserGrid(items, container) {
|
||||
|
||||
const name = document.createElement('div');
|
||||
name.className = 'browser-item-name';
|
||||
name.textContent = item.name;
|
||||
name.textContent = item.title || item.name;
|
||||
info.appendChild(name);
|
||||
|
||||
if (item.type !== 'folder') {
|
||||
@@ -1838,9 +1838,9 @@ function renderBrowserGrid(items, container) {
|
||||
|
||||
div.appendChild(info);
|
||||
|
||||
// Tooltip on card when name is ellipsed
|
||||
// Tooltip: show filename when title is displayed, or when name is ellipsed
|
||||
div.addEventListener('mouseenter', () => {
|
||||
if (name.scrollWidth > name.clientWidth || name.scrollHeight > name.clientHeight) {
|
||||
if (item.title || name.scrollWidth > name.clientWidth || name.scrollHeight > name.clientHeight) {
|
||||
div.title = item.name;
|
||||
} else {
|
||||
div.title = '';
|
||||
|
||||
Reference in New Issue
Block a user