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 {
|
.posterTileItem {
|
||||||
width: 15.9%;
|
width: 15.8%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.posterTileItem .tileImage {
|
.posterTileItem .tileImage {
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
<div id="songTabs" style="display: none;">
|
<div id="songTabs" style="display: none;">
|
||||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||||
<a href="musicrecommended.html" data-role="button">Suggested</a>
|
<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="musicalbums.html" data-role="button">Albums</a>
|
||||||
<a href="musicartists.html" data-role="button">Artists</a>
|
<a href="musicartists.html" data-role="button">Artists</a>
|
||||||
<a href="musicgenres.html" data-role="button">Genres</a>
|
<a href="musicgenres.html" data-role="button">Genres</a>
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
<div id="albumTabs" style="display: none;">
|
<div id="albumTabs" style="display: none;">
|
||||||
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
<div data-role="controlgroup" data-type="horizontal" class="libraryViewNav" data-mini="true">
|
||||||
<a href="musicrecommended.html" data-role="button">Suggested</a>
|
<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="musicalbums.html" class="ui-btn-active" data-role="button">Albums</a>
|
||||||
<a href="musicartists.html" data-role="button">Artists</a>
|
<a href="musicartists.html" data-role="button">Artists</a>
|
||||||
<a href="musicgenres.html" data-role="button">Genres</a>
|
<a href="musicgenres.html" data-role="button">Genres</a>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
(function ($, document, LibraryBrowser) {
|
(function ($, document, LibraryBrowser) {
|
||||||
|
|
||||||
var currentItem;
|
var currentItem;
|
||||||
|
var shape;
|
||||||
|
|
||||||
function reload(page) {
|
function reload(page) {
|
||||||
|
|
||||||
|
@ -209,38 +210,72 @@
|
||||||
|
|
||||||
$("#radioMovies", page).on("click", function () {
|
$("#radioMovies", page).on("click", function () {
|
||||||
|
|
||||||
loadItems(page, { IncludeItemTypes: "Movie" });
|
shape = "backdrop";
|
||||||
|
loadItems(page, {
|
||||||
|
IncludeItemTypes: "Movie",
|
||||||
|
PersonTypes: "",
|
||||||
|
Artists: ""
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#radioShows", page).on("click", function () {
|
$("#radioShows", page).on("click", function () {
|
||||||
|
|
||||||
loadItems(page, { IncludeItemTypes: "Series" });
|
shape = "backdrop";
|
||||||
|
loadItems(page, {
|
||||||
|
IncludeItemTypes: "Series",
|
||||||
|
PersonTypes: "",
|
||||||
|
Artists: ""
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#radioTrailers", page).on("click", function () {
|
$("#radioTrailers", page).on("click", function () {
|
||||||
|
|
||||||
loadItems(page, { IncludeItemTypes: "Trailer" });
|
shape = "poster";
|
||||||
|
loadItems(page, {
|
||||||
|
IncludeItemTypes: "Trailer",
|
||||||
|
PersonTypes: "",
|
||||||
|
Artists: ""
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#radioGames", page).on("click", function () {
|
$("#radioGames", page).on("click", function () {
|
||||||
|
|
||||||
loadItems(page, { IncludeItemTypes: "Game" });
|
shape = "poster";
|
||||||
|
loadItems(page, {
|
||||||
|
IncludeItemTypes: "Game",
|
||||||
|
PersonTypes: "",
|
||||||
|
Artists: ""
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#radioGuestStar", page).on("click", function () {
|
$("#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 () {
|
$("#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 () {
|
$("#radioSongs", page).on("click", function () {
|
||||||
|
|
||||||
loadItems(page, { IncludeItemTypes: "Audio", PersonTypes: "Artist" });
|
loadItems(page, {
|
||||||
|
IncludeItemTypes: "Audio",
|
||||||
|
PersonTypes: "Artist",
|
||||||
|
Artists: ""
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -303,7 +338,10 @@
|
||||||
else if (currentItem.Type == "Studio") {
|
else if (currentItem.Type == "Studio") {
|
||||||
query.Studios = currentItem.Name;
|
query.Studios = currentItem.Name;
|
||||||
}
|
}
|
||||||
|
else if (currentItem.Type == "Artist") {
|
||||||
|
query.Artists = currentItem.Name;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function loadItems(page, options) {
|
function loadItems(page, options) {
|
||||||
|
|
||||||
|
@ -338,7 +376,8 @@
|
||||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
useAverageAspectRatio: true,
|
useAverageAspectRatio: true,
|
||||||
preferBackdrop: true
|
preferBackdrop: true,
|
||||||
|
shape: shape
|
||||||
});
|
});
|
||||||
|
|
||||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
|
|
|
@ -245,11 +245,20 @@
|
||||||
html += '<td><a href="' + LibraryBrowser.getHref(item, "music") + '">' + (item.Name || "") + '</a></td>';
|
html += '<td><a href="' + LibraryBrowser.getHref(item, "music") + '">' + (item.Name || "") + '</a></td>';
|
||||||
|
|
||||||
if (options.showAlbum) {
|
if (options.showAlbum) {
|
||||||
|
if (item.Album) {
|
||||||
html += '<td><a href="itemdetails.html?id=' + item.ParentId + '">' + item.Album + '</a></td>';
|
html += '<td><a href="itemdetails.html?id=' + item.ParentId + '">' + item.Album + '</a></td>';
|
||||||
|
} else {
|
||||||
|
html += '<td></td>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.showArtist) {
|
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);
|
var time = DashboardPage.getDisplayText(item.RunTimeTicks || 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue