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

Merge branch 'dev' into Video-Playlist-Controls

This commit is contained in:
T. Adams 2015-03-13 21:57:10 -07:00
commit 4be4ca4cef
8 changed files with 67 additions and 37 deletions

View file

@ -73,8 +73,8 @@
<input type="text" id="txtArtist" placeholder="${LabelArtistsHelp}" /> <input type="text" id="txtArtist" placeholder="${LabelArtistsHelp}" />
</div> </div>
<div data-role="fieldcontain" id="fldAlbumArtist" style="display: none;"> <div data-role="fieldcontain" id="fldAlbumArtist" style="display: none;">
<label for="txtAlbumArtist">${LabelAlbumArtist}</label> <label for="txtAlbumArtist">${LabelAlbumArtists}</label>
<input type="text" id="txtAlbumArtist" /> <input type="text" id="txtAlbumArtist" placeholder="${LabelArtistsHelp}" />
</div> </div>
<div data-role="fieldcontain" id="fldAlbum" style="display: none;"> <div data-role="fieldcontain" id="fldAlbum" style="display: none;">
<label for="txtAlbum">${LabelAlbum}</label> <label for="txtAlbum">${LabelAlbum}</label>

View file

@ -501,12 +501,20 @@
$('#txtAirsBeforeEpisode', page).val(('AirsBeforeEpisodeNumber' in item) ? item.AirsBeforeEpisodeNumber : ""); $('#txtAirsBeforeEpisode', page).val(('AirsBeforeEpisodeNumber' in item) ? item.AirsBeforeEpisodeNumber : "");
$('#txtAlbum', page).val(item.Album || ""); $('#txtAlbum', page).val(item.Album || "");
$('#txtAlbumArtist', page).val(item.AlbumArtist || "");
$('#txtAlbumArtist', page).val((item.AlbumArtists || []).map(function (a) {
return a.Name;
}).join(';'));
$('#selectDisplayOrder', page).val(item.DisplayOrder).selectmenu('refresh'); $('#selectDisplayOrder', page).val(item.DisplayOrder).selectmenu('refresh');
var artists = item.Artists || []; $('#txtArtist', page).val((item.ArtistItems || []).map(function (a) {
$('#txtArtist', page).val(artists.join(';'));
return a.Name;
}).join(';'));
var date; var date;
@ -802,6 +810,26 @@
.jstree("delete_node", '#' + id); .jstree("delete_node", '#' + id);
} }
function getAlbumArtists(form) {
return $('#txtAlbumArtist', form).val().split(';').map(function (a) {
return {
Name: a
};
});
}
function getArtists(form) {
return $('#txtArtist', form).val().split(';').map(function (a) {
return {
Name: a
};
});
}
function editItemMetadataPage() { function editItemMetadataPage() {
var self = this; var self = this;
@ -834,8 +862,8 @@
DisplayOrder: $('#selectDisplayOrder', form).val(), DisplayOrder: $('#selectDisplayOrder', form).val(),
Players: $('#txtPlayers', form).val(), Players: $('#txtPlayers', form).val(),
Album: $('#txtAlbum', form).val(), Album: $('#txtAlbum', form).val(),
AlbumArtist: $('#txtAlbumArtist', form).val(), AlbumArtist: getAlbumArtists(form),
Artists: $('#txtArtist', form).val().split(';'), ArtistItems: getArtists(form),
Metascore: $('#txtMetascore', form).val(), Metascore: $('#txtMetascore', form).val(),
AwardSummary: $('#txtAwardSummary', form).val(), AwardSummary: $('#txtAwardSummary', form).val(),
Overview: $('#txtOverview', form).val(), Overview: $('#txtOverview', form).val(),

View file

@ -462,7 +462,7 @@
switch (index) { switch (index) {
case 0: case 0:
return 'smalllibrarytiles-automobile'; return 'librarytiles-automobile';
case 1: case 1:
return 'resume'; return 'resume';
case 2: case 2:
@ -493,6 +493,9 @@
else if (section == 'smalllibrarytiles-automobile') { else if (section == 'smalllibrarytiles-automobile') {
Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index, true); Sections.loadLibraryTiles(elem, userId, 'homePageSmallBackdrop', index, true);
} }
else if (section == 'librarytiles-automobile') {
Sections.loadLibraryTiles(elem, userId, 'backdrop', index, true);
}
else if (section == 'librarybuttons') { else if (section == 'librarybuttons') {
Sections.loadlibraryButtons(elem, userId, index); Sections.loadlibraryButtons(elem, userId, index);
} }

View file

@ -229,7 +229,7 @@
MediaTypes: "", MediaTypes: "",
IncludeItemTypes: "MusicVideo", IncludeItemTypes: "MusicVideo",
PersonTypes: "", PersonTypes: "",
Artists: "" ArtistIds: ""
}); });
}); });
@ -241,7 +241,7 @@
MediaTypes: "", MediaTypes: "",
IncludeItemTypes: "Movie", IncludeItemTypes: "Movie",
PersonTypes: "", PersonTypes: "",
Artists: "" ArtistIds: ""
}); });
}); });
@ -253,7 +253,7 @@
MediaTypes: "", MediaTypes: "",
IncludeItemTypes: "Series", IncludeItemTypes: "Series",
PersonTypes: "", PersonTypes: "",
Artists: "" ArtistIds: ""
}); });
}); });
@ -264,7 +264,7 @@
MediaTypes: "", MediaTypes: "",
IncludeItemTypes: "Trailer", IncludeItemTypes: "Trailer",
PersonTypes: "", PersonTypes: "",
Artists: "" ArtistIds: ""
}); });
}); });
@ -275,7 +275,7 @@
IncludeItemTypes: "", IncludeItemTypes: "",
MediaTypes: "Game", MediaTypes: "Game",
PersonTypes: "", PersonTypes: "",
Artists: "" ArtistIds: ""
}); });
}); });
@ -286,7 +286,7 @@
MediaTypes: "", MediaTypes: "",
IncludeItemTypes: "Episode", IncludeItemTypes: "Episode",
PersonTypes: "", PersonTypes: "",
Artists: "" ArtistIds: ""
}); });
}); });
@ -297,7 +297,7 @@
MediaTypes: "", MediaTypes: "",
IncludeItemTypes: "MusicAlbum", IncludeItemTypes: "MusicAlbum",
PersonTypes: "", PersonTypes: "",
Artists: "" ArtistIds: ""
}); });
}); });
@ -307,7 +307,7 @@
MediaTypes: "", MediaTypes: "",
IncludeItemTypes: "Audio", IncludeItemTypes: "Audio",
PersonTypes: "", PersonTypes: "",
Artists: "" ArtistIds: ""
}); });
}); });
} }
@ -378,10 +378,10 @@
query.Genres = currentItem.Name; query.Genres = currentItem.Name;
} }
else if (currentItem.Type == "Studio") { else if (currentItem.Type == "Studio") {
query.Studios = currentItem.Name; query.StudioIds = currentItem.Id;
} }
else if (currentItem.Type == "MusicArtist") { else if (currentItem.Type == "MusicArtist") {
query.Artists = currentItem.Name; query.ArtistIds = currentItem.Id;
} }
} }

View file

@ -406,8 +406,8 @@
$('#players', page).hide(); $('#players', page).hide();
} }
if (item.Artists && item.Artists.length && item.Type != "MusicAlbum") { if (item.ArtistItems && item.ArtistItems.length && item.Type != "MusicAlbum") {
$('#artist', page).show().html(getArtistLinksHtml(item.Artists, context)).trigger('create'); $('#artist', page).show().html(getArtistLinksHtml(item.ArtistItems, context)).trigger('create');
} else { } else {
$('#artist', page).hide(); $('#artist', page).hide();
} }
@ -512,7 +512,7 @@
var artist = artists[i]; var artist = artists[i];
html.push('<a class="textlink" href="itembynamedetails.html?context=' + context + '&musicartist=' + ApiClient.encodeName(artist) + '">' + artist + '</a>'); html.push('<a class="textlink" href="itembynamedetails.html?context=' + context + '&id=' + artist.Id + '">' + artist.Name + '</a>');
} }

View file

@ -214,7 +214,7 @@
return counts.join(' • '); return counts.join(' • ');
}, },
getArtistLinksHtml: function (artists) { getArtistLinksHtml: function (artists, cssClass) {
var html = []; var html = [];
@ -222,7 +222,8 @@
var artist = artists[i]; var artist = artists[i];
html.push('<a href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(artist) + '">' + artist + '</a>'); var css = cssClass ? (' class="' + cssClass + '"') : '';
html.push('<a' + css + ' href="itembynamedetails.html?context=music&id=' + artist.Id + '">' + artist.Name + '</a>');
} }
@ -797,7 +798,10 @@
textlines.push(displayName); textlines.push(displayName);
if (item.Type == 'Audio') { if (item.Type == 'Audio') {
textlines.push(item.Artists.join(', ') || '&nbsp;'); textlines.push(item.ArtistItems.map(function (a) {
return a.Name;
}).join(', ') || '&nbsp;');
} }
if (item.Type == 'Game') { if (item.Type == 'Game') {
@ -1744,12 +1748,10 @@
var contextParam = context ? ('&context=' + context) : ''; var contextParam = context ? ('&context=' + context) : '';
if (item.AlbumArtist && item.Type == "Audio") { if (item.AlbumArtists) {
html.push('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(item.AlbumArtist) + contextParam + '">' + item.AlbumArtist + '</a>'); html.push(LibraryBrowser.getArtistLinksHtml(item.AlbumArtists, "detailPageParentLink"));
} else if (item.AlbumArtist && item.Type == "MusicAlbum") { } else if (item.ArtistItems && item.ArtistItems.length && item.Type == "MusicVideo") {
html.push('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(item.AlbumArtist) + contextParam + '">' + item.AlbumArtist + '</a>'); html.push(LibraryBrowser.getArtistLinksHtml(item.ArtistItems, "detailPageParentLink"));
} else if (item.Artists && item.Artists.length && item.Type == "MusicVideo") {
html.push('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(item.Artists[0]) + contextParam + '">' + item.Artists[0] + '</a>');
} else if (item.SeriesName && item.Type == "Episode") { } else if (item.SeriesName && item.Type == "Episode") {
html.push('<a class="detailPageParentLink" href="itemdetails.html?id=' + item.SeriesId + contextParam + '">' + item.SeriesName + '</a>'); html.push('<a class="detailPageParentLink" href="itemdetails.html?id=' + item.SeriesId + contextParam + '">' + item.SeriesName + '</a>');
@ -1769,11 +1771,8 @@
} else if (item.Album && item.Type == "MusicVideo" && item.AlbumId) { } else if (item.Album && item.Type == "MusicVideo" && item.AlbumId) {
html.push('<a class="detailPageParentLink" href="itemdetails.html?id=' + item.AlbumId + contextParam + '">' + item.Album + '</a>'); html.push('<a class="detailPageParentLink" href="itemdetails.html?id=' + item.AlbumId + contextParam + '">' + item.Album + '</a>');
} else if (item.AlbumArtist && item.Type == "MusicAlbum") {
} else if (item.Album) { } else if (item.Album) {
html.push(item.Album); html.push(item.Album);
} }
if (html.length) { if (html.length) {

View file

@ -423,7 +423,7 @@
else if (firstItem.Type == "MusicArtist") { else if (firstItem.Type == "MusicArtist") {
promise = self.getItemsForPlayback({ promise = self.getItemsForPlayback({
Artists: firstItem.Name, ArtistIds: firstItem.Id,
Filters: "IsNotFolder", Filters: "IsNotFolder",
Recursive: true, Recursive: true,
SortBy: "SortName", SortBy: "SortName",
@ -949,7 +949,7 @@
if (item.Type == "MusicArtist") { if (item.Type == "MusicArtist") {
query.MediaTypes = "Audio"; query.MediaTypes = "Audio";
query.Artists = item.Name; query.ArtistIds = item.Id;
} }
else if (item.Type == "MusicGenre") { else if (item.Type == "MusicGenre") {

View file

@ -37,12 +37,12 @@
html += '</td>'; html += '</td>';
html += '<td>'; html += '<td>';
html += LibraryBrowser.getArtistLinksHtml(item.Artists || []); html += LibraryBrowser.getArtistLinksHtml(item.ArtistItems || []);
html += '</td>'; html += '</td>';
html += '<td>'; html += '<td>';
if (item.AlbumArtist) { if (item.AlbumArtist) {
html += LibraryBrowser.getArtistLinksHtml([item.AlbumArtist]); html += LibraryBrowser.getArtistLinksHtml(item.AlbumArtists || []);
} }
html += '</td>'; html += '</td>';