1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

consolidate Artist & MusicArtist

This commit is contained in:
Luke Pulverenti 2013-11-21 15:48:26 -05:00
parent ae1805916c
commit 5cdd9d0fb1
21 changed files with 316 additions and 55 deletions

View file

@ -79,6 +79,7 @@
<a href="musicrecommended.html">Suggested</a> <a href="musicrecommended.html">Suggested</a>
<a href="songs.html">Songs</a> <a href="songs.html">Songs</a>
<a href="musicalbums.html">Albums</a> <a href="musicalbums.html">Albums</a>
<a href="musicalbumartists.html">Album Artists</a>
<a href="musicartists.html">Artists</a> <a href="musicartists.html">Artists</a>
<a href="musicgenres.html" class="ui-btn-active">Genres</a> <a href="musicgenres.html" class="ui-btn-active">Genres</a>
<a href="musicvideos.html">Music Videos</a> <a href="musicvideos.html">Music Videos</a>
@ -89,6 +90,7 @@
<a href="musicrecommended.html">Suggested</a> <a href="musicrecommended.html">Suggested</a>
<a href="songs.html">Songs</a> <a href="songs.html">Songs</a>
<a href="musicalbums.html">Albums</a> <a href="musicalbums.html">Albums</a>
<a href="musicalbumartists.html">Album Artists</a>
<a href="musicartists.html" class="ui-btn-active">Artists</a> <a href="musicartists.html" class="ui-btn-active">Artists</a>
<a href="musicgenres.html">Genres</a> <a href="musicgenres.html">Genres</a>
<a href="musicvideos.html">Music Videos</a> <a href="musicvideos.html">Music Videos</a>

View file

@ -55,6 +55,7 @@
<a href="musicrecommended.html">Suggested</a> <a href="musicrecommended.html">Suggested</a>
<a href="songs.html" class="ui-btn-active">Songs</a> <a href="songs.html" class="ui-btn-active">Songs</a>
<a href="musicalbums.html">Albums</a> <a href="musicalbums.html">Albums</a>
<a href="musicalbumartists.html">Album Artists</a>
<a href="musicartists.html">Artists</a> <a href="musicartists.html">Artists</a>
<a href="musicgenres.html">Genres</a> <a href="musicgenres.html">Genres</a>
<a href="musicvideos.html">Music Videos</a> <a href="musicvideos.html">Music Videos</a>
@ -65,6 +66,7 @@
<a href="musicrecommended.html">Suggested</a> <a href="musicrecommended.html">Suggested</a>
<a href="songs.html">Songs</a> <a href="songs.html">Songs</a>
<a href="musicalbums.html" class="ui-btn-active">Albums</a> <a href="musicalbums.html" class="ui-btn-active">Albums</a>
<a href="musicalbumartists.html">Album Artists</a>
<a href="musicartists.html">Artists</a> <a href="musicartists.html">Artists</a>
<a href="musicgenres.html">Genres</a> <a href="musicgenres.html">Genres</a>
<a href="musicvideos.html">Music Videos</a> <a href="musicvideos.html">Music Videos</a>
@ -75,6 +77,7 @@
<a href="musicrecommended.html">Suggested</a> <a href="musicrecommended.html">Suggested</a>
<a href="songs.html">Songs</a> <a href="songs.html">Songs</a>
<a href="musicalbums.html">Albums</a> <a href="musicalbums.html">Albums</a>
<a href="musicalbumartists.html">Album Artists</a>
<a href="musicartists.html">Artists</a> <a href="musicartists.html">Artists</a>
<a href="musicgenres.html">Genres</a> <a href="musicgenres.html">Genres</a>
<a href="musicvideos.html" class="ui-btn-active">Music Videos</a> <a href="musicvideos.html" class="ui-btn-active">Music Videos</a>

View file

@ -0,0 +1,85 @@
<!DOCTYPE html>
<html>
<head>
<title>Media Browser</title>
</head>
<body>
<div id="musicAlbumArtistsPage" data-role="page" class="page libraryPage" data-theme="a" data-view="music">
<div class="libraryViewNav">
<a href="musicrecommended.html">Suggested</a>
<a href="songs.html">Songs</a>
<a href="musicalbums.html">Albums</a>
<a href="musicalbumartists.html" class="ui-btn-active">Album Artists</a>
<a href="musicartists.html">Artists</a>
<a href="musicgenres.html">Genres</a>
<a href="musicvideos.html">Music Videos</a>
</div>
<div class="alphabetPicker">
</div>
<div data-role="content">
<div class="viewSettings">
<div class="viewControls">
<button data-mini="true" data-icon="sort" data-inline="true" onclick="$('#sortPanel', $.mobile.activePage).panel( 'toggle' );">Sort</button>
<button data-mini="true" data-icon="filter" data-inline="true" onclick="$('#filterPanel', $.mobile.activePage).panel( 'toggle' );">Filter</button>
</div>
<div class="listTopPaging">
</div>
<div class="viewSummary"></div>
</div>
<div id="items" class="itemsContainer"></div>
</div>
<div data-role="panel" id="sortPanel" data-position="right" data-display="overlay" data-theme="b" data-position-fixed="true">
<form>
<fieldset data-role="controlgroup">
<legend>
<strong>Sort By:</strong>
</legend>
<input class="radioSortBy defaultSort" data-theme="c" type="radio" name="radioSortBy" id="radioSortName" value="on" checked="checked" data-sortby="SortName" data-mini="true">
<label for="radioSortName">Name</label>
<input class="radioSortBy" data-theme="c" type="radio" name="radioSortBy" id="radioAlbumCount" value="on" checked="checked" data-sortby="AlbumCount,SortName" data-mini="true">
<label for="radioAlbumCount">Album count</label>
<input class="radioSortBy" data-theme="c" type="radio" name="radioSortBy" id="radioMusicVideoCount" value="on" checked="checked" data-sortby="MusicVideoCount,SortName" data-mini="true">
<label for="radioMusicVideoCount">Music video count</label>
<input class="radioSortBy" data-theme="c" type="radio" name="radioSortBy" id="radioSongCount" value="on" checked="checked" data-sortby="SongCount,SortName" data-mini="true">
<label for="radioSongCount">Song count</label>
</fieldset>
<fieldset data-role="controlgroup">
<legend>
<strong>Sort Order:</strong>
</legend>
<input class="radioSortOrder" data-theme="c" type="radio" name="radioSortOrder" id="radioAscending" value="on" checked="checked" data-sortorder="Ascending" data-mini="true">
<label for="radioAscending">Ascending</label>
<input class="radioSortOrder" data-theme="c" type="radio" name="radioSortOrder" id="radioDescending" value="off" data-sortorder="Descending" data-mini="true">
<label for="radioDescending">Descending</label>
</fieldset>
</form>
</div>
<div data-role="panel" id="filterPanel" data-position="right" data-display="overlay" data-theme="b" data-position-fixed="true">
<form>
<fieldset data-role="controlgroup">
<legend>
<strong>Filters:</strong>
</legend>
<input class="chkStandardFilter" type="checkbox" name="chkIsFavorite" id="chkIsFavorite" data-theme="c" data-filter="IsFavorite" data-mini="true">
<label for="chkIsFavorite">Favorite</label>
<input class="chkStandardFilter" type="checkbox" name="chkLikes" id="chkLikes" data-theme="c" data-filter="Likes" data-mini="true">
<label for="chkLikes">Likes</label>
<input class="chkStandardFilter" type="checkbox" name="chkDislikes" id="chkDislikes" data-theme="c" data-filter="Dislikes" data-mini="true">
<label for="chkDislikes">Dislikes</label>
</fieldset>
</form>
</div>
</div>
</body>
</html>

View file

@ -9,6 +9,7 @@
<a href="musicrecommended.html">Suggested</a> <a href="musicrecommended.html">Suggested</a>
<a href="songs.html">Songs</a> <a href="songs.html">Songs</a>
<a href="musicalbums.html" class="ui-btn-active">Albums</a> <a href="musicalbums.html" class="ui-btn-active">Albums</a>
<a href="musicalbumartists.html">Album Artists</a>
<a href="musicartists.html">Artists</a> <a href="musicartists.html">Artists</a>
<a href="musicgenres.html">Genres</a> <a href="musicgenres.html">Genres</a>
<a href="musicvideos.html">Music Videos</a> <a href="musicvideos.html">Music Videos</a>

View file

@ -9,6 +9,7 @@
<a href="musicrecommended.html">Suggested</a> <a href="musicrecommended.html">Suggested</a>
<a href="songs.html">Songs</a> <a href="songs.html">Songs</a>
<a href="musicalbums.html">Albums</a> <a href="musicalbums.html">Albums</a>
<a href="musicalbumartists.html">Album Artists</a>
<a href="musicartists.html" class="ui-btn-active">Artists</a> <a href="musicartists.html" class="ui-btn-active">Artists</a>
<a href="musicgenres.html">Genres</a> <a href="musicgenres.html">Genres</a>
<a href="musicvideos.html">Music Videos</a> <a href="musicvideos.html">Music Videos</a>

View file

@ -9,6 +9,7 @@
<a href="musicrecommended.html">Suggested</a> <a href="musicrecommended.html">Suggested</a>
<a href="songs.html">Songs</a> <a href="songs.html">Songs</a>
<a href="musicalbums.html">Albums</a> <a href="musicalbums.html">Albums</a>
<a href="musicalbumartists.html">Album Artists</a>
<a href="musicartists.html">Artists</a> <a href="musicartists.html">Artists</a>
<a href="musicgenres.html" class="ui-btn-active">Genres</a> <a href="musicgenres.html" class="ui-btn-active">Genres</a>
<a href="musicvideos.html">Music Videos</a> <a href="musicvideos.html">Music Videos</a>

View file

@ -9,6 +9,7 @@
<a href="musicrecommended.html" class="ui-btn-active">Suggested</a> <a href="musicrecommended.html" class="ui-btn-active">Suggested</a>
<a href="songs.html">Songs</a> <a href="songs.html">Songs</a>
<a href="musicalbums.html">Albums</a> <a href="musicalbums.html">Albums</a>
<a href="musicalbumartists.html">Album Artists</a>
<a href="musicartists.html">Artists</a> <a href="musicartists.html">Artists</a>
<a href="musicgenres.html">Genres</a> <a href="musicgenres.html">Genres</a>
<a href="musicvideos.html">Music Videos</a> <a href="musicvideos.html">Music Videos</a>

View file

@ -10,6 +10,7 @@
<a href="musicrecommended.html">Suggested</a> <a href="musicrecommended.html">Suggested</a>
<a href="songs.html">Songs</a> <a href="songs.html">Songs</a>
<a href="musicalbums.html">Albums</a> <a href="musicalbums.html">Albums</a>
<a href="musicalbumartists.html">Album Artists</a>
<a href="musicartists.html">Artists</a> <a href="musicartists.html">Artists</a>
<a href="musicgenres.html">Genres</a> <a href="musicgenres.html">Genres</a>
<a href="musicvideos.html" class="ui-btn-active">Music Videos</a> <a href="musicvideos.html" class="ui-btn-active">Music Videos</a>

View file

@ -114,7 +114,7 @@
if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "BoxSet") { if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "BoxSet") {
return "movies"; return "movies";
} }
if (item.Type == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "Artist" || item.Type == "MusicVideo") { if (item.Type == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "MusicVideo") {
return "music"; return "music";
} }
if (item.MediaType == "Game") { if (item.MediaType == "Game") {
@ -311,7 +311,7 @@
var artist = artists[i]; var artist = artists[i];
html.push('<a class="textlink" href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(artist) + '">' + artist + '</a>'); html.push('<a class="textlink" href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(artist) + '">' + artist + '</a>');
} }

View file

@ -18,10 +18,10 @@
function getBaseRemoteOptions() { function getBaseRemoteOptions() {
var options = {}; var options = {};
if (currentItem.Type == "Artist") { if (currentItem.Type == "Year") {
options.artist = currentItem.Name; options.year = currentItem.Name;
} }
else if (currentItem.Type == "Artist") { else if (currentItem.Type == "MusicArtist") {
options.artist = currentItem.Name; options.artist = currentItem.Name;
} }
else if (currentItem.Type == "Person") { else if (currentItem.Type == "Person") {
@ -157,7 +157,7 @@
if (currentItem.Type == "Episode") { if (currentItem.Type == "Episode") {
cssClass += " remoteBackdropImage"; cssClass += " remoteBackdropImage";
} }
else if (currentItem.Type == "MusicAlbum" || currentItem.Type == "MusicArtist" || currentItem.Type == "Artist") { else if (currentItem.Type == "MusicAlbum" || currentItem.Type == "MusicArtist") {
cssClass += " remoteDiscImage"; cssClass += " remoteDiscImage";
} }
else { else {
@ -300,7 +300,7 @@
updateTabs(page, item); updateTabs(page, item);
if (item.Type == "Person" || item.Type == "Studio" || item.Type == "MusicGenre" || item.Type == "Genre" || item.Type == "Artist" || item.Type == "GameGenre") { if (item.Type == "Person" || item.Type == "Studio" || item.Type == "MusicGenre" || item.Type == "Genre" || item.Type == "MusicArtist" || item.Type == "GameGenre") {
$('#btnEditPeople', page).hide(); $('#btnEditPeople', page).hide();
} else { } else {
$('#btnEditPeople', page).show(); $('#btnEditPeople', page).show();

View file

@ -39,7 +39,7 @@
} }
if (!item.ImageTags || !item.ImageTags.Logo) { if (!item.ImageTags || !item.ImageTags.Logo) {
if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "Series" || item.Type == "Artist" || item.Type == "MusicArtist" || item.Type == "BoxSet") { if (item.Type == "Movie" || item.Type == "Trailer" || item.Type == "Series" || item.Type == "MusicArtist" || item.Type == "BoxSet") {
htmlName += '<img src="css/images/editor/missinglogo.png" title="Missing logo image." />'; htmlName += '<img src="css/images/editor/missinglogo.png" title="Missing logo image." />';
} }
} }
@ -252,10 +252,10 @@
return; return;
} }
name = getParameterByName('artist', url); name = getParameterByName('musicartist', url);
if (name) { if (name) {
self.currentItemType = "Artist"; self.currentItemType = "MusicArtist";
self.currentItemName = name; self.currentItemName = name;
return; return;
} }
@ -294,7 +294,7 @@
return ApiClient.getGameGenre(currentItemName, Dashboard.getCurrentUserId()); return ApiClient.getGameGenre(currentItemName, Dashboard.getCurrentUserId());
} }
if (currentItemType == "Artist") { if (currentItemType == "MusicArtist" && currentItemName) {
return ApiClient.getArtist(currentItemName, Dashboard.getCurrentUserId()); return ApiClient.getArtist(currentItemName, Dashboard.getCurrentUserId());
} }
@ -314,7 +314,7 @@
item.Type == "Genre" || item.Type == "Genre" ||
item.Type == "MusicGenre" || item.Type == "MusicGenre" ||
item.Type == "GameGenre" || item.Type == "GameGenre" ||
item.Type == "Artist") { item.Type == "MusicArtist") {
query = item.Type + "=" + ApiClient.encodeName(item.Name); query = item.Type + "=" + ApiClient.encodeName(item.Name);
} else { } else {
@ -387,7 +387,7 @@
setFieldVisibilities(page, item); setFieldVisibilities(page, item);
fillItemInfo(page, item); fillItemInfo(page, item);
if (item.Type == "Person" || item.Type == "Studio" || item.Type == "MusicGenre" || item.Type == "Genre" || item.Type == "Artist") { if (item.Type == "Person" || item.Type == "Studio" || item.Type == "MusicGenre" || item.Type == "Genre" || item.Type == "MusicArtist") {
$('#btnEditPeople', page).hide(); $('#btnEditPeople', page).hide();
} else { } else {
$('#btnEditPeople', page).show(); $('#btnEditPeople', page).show();
@ -523,7 +523,7 @@
$('#fldImdb', page).hide(); $('#fldImdb', page).hide();
} }
if (item.Type == "Audio" || item.Type == "Artist" || item.Type == "MusicArtist" || item.Type == "MusicAlbum") { if (item.Type == "Audio" || item.Type == "MusicArtist" || item.Type == "MusicAlbum") {
$('#fldMusicBrainz', page).show(); $('#fldMusicBrainz', page).show();
} else { } else {
$('#fldMusicBrainz', page).hide(); $('#fldMusicBrainz', page).hide();
@ -995,7 +995,7 @@
var updatePromise; var updatePromise;
if (currentItem.Type == "Artist") { if (currentItem.Type == "MusicArtist") {
updatePromise = ApiClient.updateArtist(item); updatePromise = ApiClient.updateArtist(item);
} }
else if (currentItem.Type == "Genre") { else if (currentItem.Type == "Genre") {
@ -1129,7 +1129,7 @@
if (val) { if (val) {
if (currentItem.Type == "MusicArtist" || currentItem.Type == "Artist") { if (currentItem.Type == "MusicArtist") {
$('#btnOpenMusicbrainz', page).attr('href', 'http://musicbrainz.org/artist/' + val); $('#btnOpenMusicbrainz', page).attr('href', 'http://musicbrainz.org/artist/' + val);
} else { } else {
$('#btnOpenMusicbrainz', page).attr('href', 'http://musicbrainz.org/release/' + val); $('#btnOpenMusicbrainz', page).attr('href', 'http://musicbrainz.org/release/' + val);
@ -1213,7 +1213,7 @@
var force = true; var force = true;
if (currentItem.Type == "Artist") { if (currentItem.Type == "MusicArtist") {
refreshPromise = ApiClient.refreshArtist(currentItem.Name, force); refreshPromise = ApiClient.refreshArtist(currentItem.Name, force);
} }
else if (currentItem.Type == "Genre") { else if (currentItem.Type == "Genre") {

View file

@ -37,7 +37,7 @@
return ApiClient.getGameGenre(name, Dashboard.getCurrentUserId()); return ApiClient.getGameGenre(name, Dashboard.getCurrentUserId());
} }
name = getParameterByName('artist'); name = getParameterByName('musicartist');
if (name) { if (name) {
return ApiClient.getArtist(name, Dashboard.getCurrentUserId()); return ApiClient.getArtist(name, Dashboard.getCurrentUserId());
@ -134,7 +134,7 @@
if (context == "music" && item.Type == "MusicGenre") { if (context == "music" && item.Type == "MusicGenre") {
$('#musicGenreTabs', page).show(); $('#musicGenreTabs', page).show();
} }
if (context == "music" && item.Type == "Artist") { if (context == "music" && item.Type == "MusicArtist") {
$('#artistTabs', page).show(); $('#artistTabs', page).show();
} }
if (context == "games" && item.Type == "GameGenre") { if (context == "games" && item.Type == "GameGenre") {
@ -389,7 +389,7 @@
else if (currentItem.Type == "Studio") { else if (currentItem.Type == "Studio") {
query.Studios = currentItem.Name; query.Studios = currentItem.Name;
} }
else if (currentItem.Type == "Artist") { else if (currentItem.Type == "MusicArtist") {
query.Artists = currentItem.Name; query.Artists = currentItem.Name;
} }
} }

View file

@ -24,7 +24,7 @@
return ApiClient.getGenre(name, Dashboard.getCurrentUserId()); return ApiClient.getGenre(name, Dashboard.getCurrentUserId());
} }
name = getParameterByName('artist'); name = getParameterByName('musicartist');
if (name) { if (name) {
return ApiClient.getArtist(name, Dashboard.getCurrentUserId()); return ApiClient.getArtist(name, Dashboard.getCurrentUserId());

View file

@ -153,7 +153,7 @@
imgUrl = "css/images/items/list/person.png"; imgUrl = "css/images/items/list/person.png";
isDefault = true; isDefault = true;
} }
else if (item.Type == "Artist") { else if (item.Type == "MusicArtist") {
imgUrl = "css/images/items/list/audiocollection.png"; imgUrl = "css/images/items/list/audiocollection.png";
isDefault = true; isDefault = true;
@ -229,7 +229,7 @@
//html += '<p class="itemMiscInfo">' + childText + '</p>'; //html += '<p class="itemMiscInfo">' + childText + '</p>';
} }
else if (item.Type == "Genre" || item.Type == "Studio" || item.Type == "Person" || item.Type == "Artist" || item.Type == "MusicGenre" || item.Type == "GameGenre") { else if (item.Type == "Genre" || item.Type == "Studio" || item.Type == "Person" || item.Type == "MusicArtist" || item.Type == "MusicGenre" || item.Type == "GameGenre") {
html += LibraryBrowser.getItemCountsHtml(options, item); html += LibraryBrowser.getItemCountsHtml(options, item);
} }
@ -426,7 +426,7 @@
if (item.AlbumArtist) { if (item.AlbumArtist) {
html += '<td><a href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(item.AlbumArtist) + '">' + item.AlbumArtist + '</a></td>'; html += '<td><a href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(item.AlbumArtist) + '">' + item.AlbumArtist + '</a></td>';
} else { } else {
html += '<td></td>'; html += '<td></td>';
@ -470,7 +470,7 @@
var artist = artists[i]; var artist = artists[i];
html.push('<a href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(artist) + '">' + artist + '</a>'); html.push('<a href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(artist) + '">' + artist + '</a>');
} }
@ -495,7 +495,7 @@
html += '<ul data-role="listview" style="min-width: 150px;" data-theme="c">'; html += '<ul data-role="listview" style="min-width: 150px;" data-theme="c">';
html += '<li data-role="list-divider" data-theme="a">Play Menu</li>'; html += '<li data-role="list-divider" data-theme="a">Play Menu</li>';
if (itemType == "Artist") { if (itemType == "MusicArtist") {
html += '<li><a href="#" onclick="MediaPlayer.playArtist(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Play</a></li>'; html += '<li><a href="#" onclick="MediaPlayer.playArtist(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Play</a></li>';
} else if (itemType != "MusicGenre") { } else if (itemType != "MusicGenre") {
html += '<li><a href="#" onclick="MediaPlayer.playById(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Play</a></li>'; html += '<li><a href="#" onclick="MediaPlayer.playById(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Play</a></li>';
@ -508,7 +508,7 @@
html += '<li><a href="#" onclick="MediaPlayer.playInstantMixFromAlbum(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Instant Mix</a></li>'; html += '<li><a href="#" onclick="MediaPlayer.playInstantMixFromAlbum(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Instant Mix</a></li>';
html += '<li><a href="#" onclick="MediaPlayer.shuffleFolder(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Shuffle</a></li>'; html += '<li><a href="#" onclick="MediaPlayer.shuffleFolder(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Shuffle</a></li>';
} }
else if (itemType == "Artist") { else if (itemType == "MusicArtist") {
html += '<li><a href="#" onclick="MediaPlayer.playInstantMixFromArtist(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Instant Mix</a></li>'; html += '<li><a href="#" onclick="MediaPlayer.playInstantMixFromArtist(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Instant Mix</a></li>';
html += '<li><a href="#" onclick="MediaPlayer.shuffleArtist(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Shuffle</a></li>'; html += '<li><a href="#" onclick="MediaPlayer.shuffleArtist(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Shuffle</a></li>';
} }
@ -522,7 +522,7 @@
} }
if (isPlaying) { if (isPlaying) {
if (itemType == "Artist") { if (itemType == "MusicArtist") {
html += '<li><a href="#" onclick="MediaPlayer.queueArtist(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Queue</a></li>'; html += '<li><a href="#" onclick="MediaPlayer.queueArtist(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Queue</a></li>';
} else if (itemType != "MusicGenre") { } else if (itemType != "MusicGenre") {
html += '<li><a href="#" onclick="MediaPlayer.queue(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Queue</a></li>'; html += '<li><a href="#" onclick="MediaPlayer.queue(\'' + itemId + '\');LibraryBrowser.closePlayMenu();">Queue</a></li>';
@ -587,8 +587,11 @@
if (item.Type == "Person") { if (item.Type == "Person") {
return "itembynamedetails.html?person=" + ApiClient.encodeName(item.Name) + "&context=" + itemByNameContext; return "itembynamedetails.html?person=" + ApiClient.encodeName(item.Name) + "&context=" + itemByNameContext;
} }
if (item.Type == "Artist") {
return "itembynamedetails.html?artist=" + ApiClient.encodeName(item.Name) + "&context=" + (itemByNameContext || "music"); if (item.Type == "MusicArtist") {
if (itemByNameContext == "music") {
return "itembynamedetails.html?musicartist=" + ApiClient.encodeName(item.Name) + "&context=" + (itemByNameContext || "music");
}
} }
return item.IsFolder ? (id ? "itemList.html?parentId=" + id : "#") : "itemdetails.html?id=" + id; return item.IsFolder ? (id ? "itemList.html?parentId=" + id : "#") : "itemdetails.html?id=" + id;
@ -634,7 +637,7 @@
return ApiClient.getGameGenreImageUrl(item.Name, options); return ApiClient.getGameGenreImageUrl(item.Name, options);
} }
if (item.Type == "Artist") { if (item.Type == "MusicArtist") {
return ApiClient.getArtistImageUrl(item.Name, options); return ApiClient.getArtistImageUrl(item.Name, options);
} }
@ -1055,7 +1058,7 @@
} }
} }
if (!item.IsFolder && item.Type !== "Genre" && item.Type !== "Studio" && item.Type !== "Person" && item.Type !== "Artist" && item.Type !== "MusicGenre" && item.Type !== "GameGenre") { if (!item.IsFolder && item.Type !== "Genre" && item.Type !== "Studio" && item.Type !== "Person" && item.Type !== "MusicArtist" && item.Type !== "MusicGenre" && item.Type !== "GameGenre") {
var date = item.DateCreated; var date = item.DateCreated;
var isPlayed = item.UserData && item.UserData.Played; var isPlayed = item.UserData && item.UserData.Played;
@ -1175,13 +1178,13 @@
var html = []; var html = [];
if (item.AlbumArtist && item.Type == "Audio") { if (item.AlbumArtist && item.Type == "Audio") {
html.push('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(item.AlbumArtist) + '">' + item.AlbumArtist + '</a>'); html.push('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(item.AlbumArtist) + '">' + item.AlbumArtist + '</a>');
} }
else if (item.AlbumArtist && item.Type == "MusicAlbum") { else if (item.AlbumArtist && item.Type == "MusicAlbum") {
html.push('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(item.AlbumArtist) + '">' + item.AlbumArtist + '</a>'); html.push('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(item.AlbumArtist) + '">' + item.AlbumArtist + '</a>');
} }
else if (item.Artists && item.Artists.length && item.Type == "MusicVideo") { else if (item.Artists && item.Artists.length && item.Type == "MusicVideo") {
html.push('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&artist=' + ApiClient.encodeName(item.Artists[0]) + '">' + item.Artists[0] + '</a>'); html.push('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(item.Artists[0]) + '">' + item.Artists[0] + '</a>');
} }
else if (item.SeriesName && item.Type == "Episode") { else if (item.SeriesName && item.Type == "Episode") {
@ -1259,7 +1262,7 @@
} }
if (providerIds.Musicbrainz) { if (providerIds.Musicbrainz) {
if (item.Type == "MusicArtist" || item.Type == "Artist") { if (item.Type == "MusicArtist") {
links.push('<a class="textlink" href="http://musicbrainz.org/artist/' + providerIds.Musicbrainz + '" target="_blank">MusicBrainz</a>'); links.push('<a class="textlink" href="http://musicbrainz.org/artist/' + providerIds.Musicbrainz + '" target="_blank">MusicBrainz</a>');
} else { } else {
links.push('<a class="textlink" href="http://musicbrainz.org/release/' + providerIds.Musicbrainz + '" target="_blank">MusicBrainz Release</a>'); links.push('<a class="textlink" href="http://musicbrainz.org/release/' + providerIds.Musicbrainz + '" target="_blank">MusicBrainz Release</a>');
@ -1494,7 +1497,7 @@
else if (type == "GameGenre") { else if (type == "GameGenre") {
itemId = item.Name; itemId = item.Name;
} }
else if (type == "Artist") { else if (type == "MusicArtist") {
itemId = item.Name; itemId = item.Name;
} }
@ -1566,7 +1569,7 @@
else if (type == "Studio") { else if (type == "Studio") {
ApiClient.updateFavoriteStudioStatus(Dashboard.getCurrentUserId(), id, markAsFavorite); ApiClient.updateFavoriteStudioStatus(Dashboard.getCurrentUserId(), id, markAsFavorite);
} }
else if (type == "Artist") { else if (type == "MusicArtist") {
ApiClient.updateFavoriteArtistStatus(Dashboard.getCurrentUserId(), id, markAsFavorite); ApiClient.updateFavoriteArtistStatus(Dashboard.getCurrentUserId(), id, markAsFavorite);
} }
else if (type == "Genre") { else if (type == "Genre") {
@ -1653,7 +1656,7 @@
else if (type == "Studio") { else if (type == "Studio") {
ApiClient.updateStudioRating(Dashboard.getCurrentUserId(), id, likes); ApiClient.updateStudioRating(Dashboard.getCurrentUserId(), id, likes);
} }
else if (type == "Artist") { else if (type == "MusicArtist") {
ApiClient.updateArtistRating(Dashboard.getCurrentUserId(), id, likes); ApiClient.updateArtistRating(Dashboard.getCurrentUserId(), id, likes);
} }
else if (type == "Genre") { else if (type == "Genre") {
@ -1678,7 +1681,7 @@
else if (type == "Studio") { else if (type == "Studio") {
ApiClient.clearStudioRating(Dashboard.getCurrentUserId(), id); ApiClient.clearStudioRating(Dashboard.getCurrentUserId(), id);
} }
else if (type == "Artist") { else if (type == "MusicArtist") {
ApiClient.clearArtistRating(Dashboard.getCurrentUserId(), id); ApiClient.clearArtistRating(Dashboard.getCurrentUserId(), id);
} }
else if (type == "Genre") { else if (type == "Genre") {
@ -1740,7 +1743,7 @@
type: "Primary" type: "Primary"
}); });
} }
else if (item.Type == "Artist") { else if (item.Type == "MusicArtist") {
url = ApiClient.getArtistImageUrl(item.Name, { url = ApiClient.getArtistImageUrl(item.Name, {
maxheight: 480, maxheight: 480,
tag: imageTags.Primary, tag: imageTags.Primary,
@ -1792,7 +1795,7 @@
type: "Backdrop" type: "Backdrop"
}); });
} }
else if (item.Type == "Artist") { else if (item.Type == "MusicArtist") {
url = ApiClient.getArtistImageUrl(item.Name, { url = ApiClient.getArtistImageUrl(item.Name, {
maxheight: 480, maxheight: 480,
tag: item.BackdropImageTags[0], tag: item.BackdropImageTags[0],
@ -1844,7 +1847,7 @@
type: "Thumb" type: "Thumb"
}); });
} }
else if (item.Type == "Artist") { else if (item.Type == "MusicArtist") {
url = ApiClient.getArtistImageUrl(item.Name, { url = ApiClient.getArtistImageUrl(item.Name, {
maxheight: 480, maxheight: 480,
tag: imageTags.Thumb, tag: imageTags.Thumb,
@ -1895,7 +1898,7 @@
var identifierName = "id"; var identifierName = "id";
var identifierValue = item.Id; var identifierValue = item.Id;
if (item.Type == "Person" || item.Type == "Genre" || item.Type == "Studio" || item.Type == "Artist" || item.Type == "MusicGenre" || item.Type == "GameGenre") { if (item.Type == "Person" || item.Type == "Genre" || item.Type == "Studio" || item.Type == "MusicArtist" || item.Type == "MusicGenre" || item.Type == "GameGenre") {
identifierName = item.Type; identifierName = item.Type;
identifierValue = ApiClient.encodeName(item.Name); identifierValue = ApiClient.encodeName(item.Name);
} }
@ -2062,7 +2065,7 @@
html += '&nbsp;&nbsp;/&nbsp;&nbsp;'; html += '&nbsp;&nbsp;/&nbsp;&nbsp;';
} }
var param = item.Type == "Audio" || item.Type == "Artist" || item.Type == "MusicArtist" || item.Type == "MusicAlbum" ? "musicgenre" : "genre"; var param = item.Type == "Audio" || item.Type == "MusicArtist" || item.Type == "MusicAlbum" ? "musicgenre" : "genre";
if (item.MediaType == "Game") { if (item.MediaType == "Game") {
param = "gamegenre"; param = "gamegenre";

View file

@ -40,14 +40,14 @@
function renderChannels(page, channels) { function renderChannels(page, channels) {
var pagingHtml = LibraryBrowser.getPagingHtml({ //var pagingHtml = LibraryBrowser.getPagingHtml({
StartIndex: 0, // StartIndex: 0,
Limit: channels.length // Limit: channels.length
}, channels.length, true); //}, channels.length, true);
$('.listTopPaging', page).html(pagingHtml).trigger('create'); //$('.listTopPaging', page).html(pagingHtml).trigger('create');
$('#items', page).html(getChannelsHtml(channels)).trigger('create'); $('#items', page).html(getChannelsHtml(channels)).trigger('create');
} }

View file

@ -747,7 +747,7 @@
self.canPlay = function (item) { self.canPlay = function (item) {
if (item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "Artist" || item.Type == "MusicGenre") { if (item.Type == "MusicAlbum" || item.Type == "MusicArtist" || item.Type == "MusicGenre") {
return true; return true;
} }

View file

@ -0,0 +1,162 @@
(function ($, document) {
// The base query options
var query = {
SortBy: "SortName",
SortOrder: "Ascending",
IncludeItemTypes: "MusicArtist",
Recursive: true,
Fields: "DateCreated",
StartIndex: 0
};
function reloadItems(page) {
Dashboard.showLoadingMsg();
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
// Scroll back up so they can see the results from the beginning
$(document).scrollTop(0);
var html = '';
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
updateFilterControls(page);
var checkSortOption = $('.radioSortBy:checked', page);
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
preferBackdrop: false,
context: "music",
shape: "square"
});
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
$('#items', page).html(html).trigger('create');
$('.btnChangeToDefaultSort', page).on('click', function () {
query.StartIndex = 0;
query.SortOrder = 'Ascending';
query.SortBy = $('.defaultSort', page).data('sortby');
reloadItems(page);
});
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
reloadItems(page);
});
$('.btnNextPage', page).on('click', function () {
query.StartIndex += query.Limit;
reloadItems(page);
});
$('.btnPreviousPage', page).on('click', function () {
query.StartIndex -= query.Limit;
reloadItems(page);
});
$('.selectPageSize', page).on('change', function () {
query.Limit = parseInt(this.value);
query.StartIndex = 0;
reloadItems(page);
});
LibraryBrowser.saveQueryValues('musicartists', query);
Dashboard.hideLoadingMsg();
});
}
function updateFilterControls(page) {
// Reset form values using the last used query
$('.radioSortBy', page).each(function () {
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
}).checkboxradio('refresh');
$('.radioSortOrder', page).each(function () {
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
}).checkboxradio('refresh');
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
}
$(document).on('pageinit', "#musicAlbumArtistsPage", function () {
var page = this;
$('.radioSortBy', this).on('click', function () {
query.SortBy = this.getAttribute('data-sortby');
query.StartIndex = 0;
reloadItems(page);
});
$('.radioSortOrder', this).on('click', function () {
query.SortOrder = this.getAttribute('data-sortorder');
query.StartIndex = 0;
reloadItems(page);
});
$('.chkStandardFilter', this).on('change', function () {
var filterName = this.getAttribute('data-filter');
var filters = query.Filters || "";
filters = (',' + filters).replace(',' + filterName, '').substring(1);
if (this.checked) {
filters = filters ? (filters + ',' + filterName) : filterName;
}
query.StartIndex = 0;
query.Filters = filters;
reloadItems(page);
});
$('.alphabetPicker', this).on('alphaselect', function (e, character) {
query.NameStartsWithOrGreater = character;
query.StartIndex = 0;
reloadItems(page);
}).on('alphaclear', function (e) {
query.NameStartsWithOrGreater = '';
reloadItems(page);
});
}).on('pagebeforeshow', "#musicAlbumArtistsPage", function () {
var limit = LibraryBrowser.getDefaultPageSize();
// If the default page size has changed, the start index will have to be reset
if (limit != query.Limit) {
query.Limit = limit;
query.StartIndex = 0;
}
LibraryBrowser.loadSavedQueryValues('musicartists', query);
reloadItems(this);
}).on('pageshow', "#musicAlbumArtistsPage", function () {
updateFilterControls(this);
});
})(jQuery, document);

View file

@ -163,7 +163,7 @@
return false; return false;
} }
if (item.Type == "Artist") { if (item.Type == "MusicArtist") {
sendPlayArtistCommand(item, sessionIds[0], popup); sendPlayArtistCommand(item, sessionIds[0], popup);

View file

@ -125,7 +125,7 @@
imgUrl = "css/images/items/searchhints/tv.png"; imgUrl = "css/images/items/searchhints/tv.png";
} }
else if (hint.Type == "Audio" || hint.Type == "MusicAlbum" || hint.Type == "Artist") { else if (hint.Type == "Audio" || hint.Type == "MusicAlbum" || hint.Type == "MusicArtist") {
imgUrl = "css/images/items/searchhints/music.png"; imgUrl = "css/images/items/searchhints/music.png";

View file

@ -896,8 +896,8 @@ var Dashboard = {
else if (type == "person") { else if (type == "person") {
url = "itembynamedetails.html?person=" + ApiClient.encodeName(cmd.ItemName) + "&context=" + context; url = "itembynamedetails.html?person=" + ApiClient.encodeName(cmd.ItemName) + "&context=" + context;
} }
else if (type == "artist") { else if (type == "musicartist") {
url = "itembynamedetails.html?artist=" + ApiClient.encodeName(cmd.ItemName) + "&context=" + (context || "music"); url = "itembynamedetails.html?musicartist=" + ApiClient.encodeName(cmd.ItemName) + "&context=" + (context || "music");
} }
if (url) { if (url) {

View file

@ -9,6 +9,7 @@
<a href="musicrecommended.html">Suggested</a> <a href="musicrecommended.html">Suggested</a>
<a href="songs.html" class="ui-btn-active">Songs</a> <a href="songs.html" class="ui-btn-active">Songs</a>
<a href="musicalbums.html">Albums</a> <a href="musicalbums.html">Albums</a>
<a href="musicalbumartists.html">Album Artists</a>
<a href="musicartists.html">Artists</a> <a href="musicartists.html">Artists</a>
<a href="musicgenres.html">Genres</a> <a href="musicgenres.html">Genres</a>
<a href="musicvideos.html">Music Videos</a> <a href="musicvideos.html">Music Videos</a>