mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
chromecast updates
This commit is contained in:
parent
2e25b47fb2
commit
f6995379a2
5 changed files with 41 additions and 161 deletions
|
@ -182,126 +182,6 @@
|
|||
return counts.join(' • ');
|
||||
},
|
||||
|
||||
getSongHeaderCellHtml: function (text, cssClass, enableSorting, sortField, selectedSortField, sortDirection) {
|
||||
|
||||
var html = cssClass ? '<th class="' + cssClass + '">' : '<th>';
|
||||
|
||||
if (text && enableSorting) {
|
||||
html += '<a class="lnkColumnSort" data-sortfield="' + sortField + '" href="#" style="text-decoration:underline;">';
|
||||
}
|
||||
|
||||
html += text;
|
||||
|
||||
if (text && enableSorting) {
|
||||
|
||||
html += '</a>';
|
||||
|
||||
if (sortField == selectedSortField) {
|
||||
|
||||
if (sortDirection == "Descending") {
|
||||
html += '<span style="font-weight:bold;margin-left:5px;vertical-align:top;font-size:12px;">↓</span>';
|
||||
} else {
|
||||
html += '<span style="font-weight:bold;margin-left:5px;vertical-align:top;font-size:12px;">↑</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
html += '</th>';
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
getSongTableHtml: function (items, options) {
|
||||
|
||||
options = options || {};
|
||||
|
||||
var html = '';
|
||||
|
||||
var cssClass = "detailTable";
|
||||
|
||||
html += '<div class="detailTableContainer"><table class="' + cssClass + '"><thead>';
|
||||
|
||||
html += '<tr>';
|
||||
|
||||
html += LibraryBrowser.getSongHeaderCellHtml('Track', '', options.enableColumnSorting, 'Name', options.sortBy, options.sortOrder);
|
||||
|
||||
if (options.showAlbum) {
|
||||
html += LibraryBrowser.getSongHeaderCellHtml('Album', '', options.enableColumnSorting, 'Album,SortName', options.sortBy, options.sortOrder);
|
||||
}
|
||||
if (options.showArtist) {
|
||||
html += LibraryBrowser.getSongHeaderCellHtml('Artist', 'tabletColumn', options.enableColumnSorting, 'Artist,Album,SortName', options.sortBy, options.sortOrder);
|
||||
}
|
||||
if (options.showAlbumArtist) {
|
||||
html += LibraryBrowser.getSongHeaderCellHtml('Album Artist', 'tabletColumn', options.enableColumnSorting, 'AlbumArtist,Album,SortName', options.sortBy, options.sortOrder);
|
||||
}
|
||||
|
||||
html += LibraryBrowser.getSongHeaderCellHtml('Runtime', 'tabletColumn', options.enableColumnSorting, 'Runtime,AlbumArtist,Album,SortName', options.sortBy, options.sortOrder);
|
||||
html += LibraryBrowser.getSongHeaderCellHtml('Plays', 'desktopColumn', options.enableColumnSorting, 'PlayCount,AlbumArtist,Album,SortName', options.sortBy, options.sortOrder);
|
||||
|
||||
html += LibraryBrowser.getSongHeaderCellHtml('', '', options.enableColumnSorting);
|
||||
|
||||
html += '</tr></thead>';
|
||||
|
||||
html += '<tbody>';
|
||||
|
||||
for (var i = 0, length = items.length; i < length; i++) {
|
||||
|
||||
var item = items[i];
|
||||
|
||||
html += '<tr>';
|
||||
|
||||
html += '<td><a href="' + LibraryBrowser.getHref(item, "music") + '">' + (item.Name || "") + '</a></td>';
|
||||
|
||||
if (options.showAlbum) {
|
||||
if (item.Album && item.ParentId) {
|
||||
html += '<td><a href="itemdetails.html?id=' + item.ParentId + '">' + item.Album + '</a></td>';
|
||||
} else {
|
||||
html += '<td>' + (item.Album || '') + '</td>';
|
||||
}
|
||||
}
|
||||
|
||||
if (options.showArtist) {
|
||||
|
||||
if (item.Artists && item.Artists.length) {
|
||||
|
||||
var artistLinksHtml = LibraryBrowser.getArtistLinksHtml(item.Artists);
|
||||
|
||||
html += '<td class="tabletColumn">' + artistLinksHtml + '</td>';
|
||||
} else {
|
||||
html += '<td class="tabletColumn"></td>';
|
||||
}
|
||||
}
|
||||
|
||||
if (options.showAlbumArtist) {
|
||||
|
||||
if (item.AlbumArtist) {
|
||||
|
||||
html += '<td class="tabletColumn">' + LibraryBrowser.getArtistLinksHtml([item.AlbumArtist]) + '</td>';
|
||||
|
||||
} else {
|
||||
html += '<td class="tabletColumn"></td>';
|
||||
}
|
||||
}
|
||||
|
||||
var time = Dashboard.getDisplayTime(item.RunTimeTicks || 0);
|
||||
|
||||
html += '<td class="tabletColumn">' + time + '</td>';
|
||||
|
||||
html += '<td class="desktopColumn">' + (item.UserData ? item.UserData.PlayCount : 0) + '</td>';
|
||||
|
||||
html += '<td class="detailTableButtonsCell">';
|
||||
html += '<button class="btnPlay" data-icon="ellipsis-v" type="button" data-iconpos="notext" onclick="LibraryBrowser.showPlayMenu(this, \'' + item.Id + '\', \'Audio\', false, \'Audio\', null, true);" data-inline="true" title="Play">Play</button>';
|
||||
html += '</td>';
|
||||
|
||||
html += '</tr>';
|
||||
}
|
||||
|
||||
html += '</tbody>';
|
||||
html += '</table></div>';
|
||||
|
||||
return html;
|
||||
},
|
||||
|
||||
getArtistLinksHtml: function (artists) {
|
||||
|
||||
var html = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue