mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added Artists filter
This commit is contained in:
parent
0595f24311
commit
b922da75e8
4 changed files with 62 additions and 14 deletions
|
@ -532,7 +532,7 @@
|
|||
}
|
||||
|
||||
.posterTileItem {
|
||||
width: 15.9%;
|
||||
width: 15.8%;
|
||||
}
|
||||
|
||||
.posterTileItem .tileImage {
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<div id="songTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="musicrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="#" data-role="button" class="ui-btn-active">Songs</a>
|
||||
<a href="songs.html" data-role="button" class="ui-btn-active">Songs</a>
|
||||
<a href="musicalbums.html" data-role="button">Albums</a>
|
||||
<a href="musicartists.html" data-role="button">Artists</a>
|
||||
<a href="musicgenres.html" data-role="button">Genres</a>
|
||||
|
@ -66,7 +66,7 @@
|
|||
<div id="albumTabs" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||
<a href="musicrecommended.html" data-role="button">Suggested</a>
|
||||
<a href="#" data-role="button">Songs</a>
|
||||
<a href="songs.html" data-role="button">Songs</a>
|
||||
<a href="musicalbums.html" class="ui-btn-active" data-role="button">Albums</a>
|
||||
<a href="musicartists.html" data-role="button">Artists</a>
|
||||
<a href="musicgenres.html" data-role="button">Genres</a>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
(function ($, document, LibraryBrowser) {
|
||||
|
||||
var currentItem;
|
||||
var shape;
|
||||
|
||||
function reload(page) {
|
||||
|
||||
|
@ -209,38 +210,72 @@
|
|||
|
||||
$("#radioMovies", page).on("click", function () {
|
||||
|
||||
loadItems(page, { IncludeItemTypes: "Movie" });
|
||||
shape = "backdrop";
|
||||
loadItems(page, {
|
||||
IncludeItemTypes: "Movie",
|
||||
PersonTypes: "",
|
||||
Artists: ""
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$("#radioShows", page).on("click", function () {
|
||||
|
||||
loadItems(page, { IncludeItemTypes: "Series" });
|
||||
shape = "backdrop";
|
||||
loadItems(page, {
|
||||
IncludeItemTypes: "Series",
|
||||
PersonTypes: "",
|
||||
Artists: ""
|
||||
});
|
||||
});
|
||||
|
||||
$("#radioTrailers", page).on("click", function () {
|
||||
|
||||
loadItems(page, { IncludeItemTypes: "Trailer" });
|
||||
shape = "poster";
|
||||
loadItems(page, {
|
||||
IncludeItemTypes: "Trailer",
|
||||
PersonTypes: "",
|
||||
Artists: ""
|
||||
});
|
||||
});
|
||||
|
||||
$("#radioGames", page).on("click", function () {
|
||||
|
||||
loadItems(page, { IncludeItemTypes: "Game" });
|
||||
shape = "poster";
|
||||
loadItems(page, {
|
||||
IncludeItemTypes: "Game",
|
||||
PersonTypes: "",
|
||||
Artists: ""
|
||||
});
|
||||
});
|
||||
|
||||
$("#radioGuestStar", page).on("click", function () {
|
||||
|
||||
loadItems(page, { IncludeItemTypes: "Episode", PersonTypes: "GuestStar" });
|
||||
shape = "backdrop";
|
||||
loadItems(page, {
|
||||
IncludeItemTypes: "Episode",
|
||||
PersonTypes: "GuestStar",
|
||||
Artists: ""
|
||||
});
|
||||
});
|
||||
|
||||
$("#radioAlbums", page).on("click", function () {
|
||||
|
||||
loadItems(page, { IncludeItemTypes: "MusicAlbum", PersonTypes: "Artist" });
|
||||
shape = "cd";
|
||||
loadItems(page, {
|
||||
IncludeItemTypes: "MusicAlbum",
|
||||
PersonTypes: "Artist",
|
||||
Artists: ""
|
||||
});
|
||||
});
|
||||
|
||||
$("#radioSongs", page).on("click", function () {
|
||||
|
||||
loadItems(page, { IncludeItemTypes: "Audio", PersonTypes: "Artist" });
|
||||
loadItems(page, {
|
||||
IncludeItemTypes: "Audio",
|
||||
PersonTypes: "Artist",
|
||||
Artists: ""
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -303,6 +338,9 @@
|
|||
else if (currentItem.Type == "Studio") {
|
||||
query.Studios = currentItem.Name;
|
||||
}
|
||||
else if (currentItem.Type == "Artist") {
|
||||
query.Artists = currentItem.Name;
|
||||
}
|
||||
}
|
||||
|
||||
function loadItems(page, options) {
|
||||
|
@ -338,7 +376,8 @@
|
|||
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
preferBackdrop: true
|
||||
preferBackdrop: true,
|
||||
shape: shape
|
||||
});
|
||||
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
|
|
|
@ -245,11 +245,20 @@
|
|||
html += '<td><a href="' + LibraryBrowser.getHref(item, "music") + '">' + (item.Name || "") + '</a></td>';
|
||||
|
||||
if (options.showAlbum) {
|
||||
if (item.Album) {
|
||||
html += '<td><a href="itemdetails.html?id=' + item.ParentId + '">' + item.Album + '</a></td>';
|
||||
} else {
|
||||
html += '<td></td>';
|
||||
}
|
||||
}
|
||||
|
||||
if (options.showArtist) {
|
||||
html += '<td>' + item.Artist + '</td>';
|
||||
|
||||
if (item.Artist) {
|
||||
html += '<td><a href="itembynamedetails.html?context=music&artist=' + item.Artist + '">' + item.Artist + '</a></td>';
|
||||
} else {
|
||||
html += '<td></td>';
|
||||
}
|
||||
}
|
||||
|
||||
var time = DashboardPage.getDisplayText(item.RunTimeTicks || 0);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue