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}" />
</div>
<div data-role="fieldcontain" id="fldAlbumArtist" style="display: none;">
<label for="txtAlbumArtist">${LabelAlbumArtist}</label>
<input type="text" id="txtAlbumArtist" />
<label for="txtAlbumArtist">${LabelAlbumArtists}</label>
<input type="text" id="txtAlbumArtist" placeholder="${LabelArtistsHelp}" />
</div>
<div data-role="fieldcontain" id="fldAlbum" style="display: none;">
<label for="txtAlbum">${LabelAlbum}</label>

View file

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

View file

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

View file

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

View file

@ -406,8 +406,8 @@
$('#players', page).hide();
}
if (item.Artists && item.Artists.length && item.Type != "MusicAlbum") {
$('#artist', page).show().html(getArtistLinksHtml(item.Artists, context)).trigger('create');
if (item.ArtistItems && item.ArtistItems.length && item.Type != "MusicAlbum") {
$('#artist', page).show().html(getArtistLinksHtml(item.ArtistItems, context)).trigger('create');
} else {
$('#artist', page).hide();
}
@ -512,7 +512,7 @@
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(' • ');
},
getArtistLinksHtml: function (artists) {
getArtistLinksHtml: function (artists, cssClass) {
var html = [];
@ -222,7 +222,8 @@
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);
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') {
@ -1744,12 +1748,10 @@
var contextParam = context ? ('&context=' + context) : '';
if (item.AlbumArtist && item.Type == "Audio") {
html.push('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(item.AlbumArtist) + contextParam + '">' + item.AlbumArtist + '</a>');
} else if (item.AlbumArtist && item.Type == "MusicAlbum") {
html.push('<a class="detailPageParentLink" href="itembynamedetails.html?context=music&musicartist=' + ApiClient.encodeName(item.AlbumArtist) + contextParam + '">' + item.AlbumArtist + '</a>');
} 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>');
if (item.AlbumArtists) {
html.push(LibraryBrowser.getArtistLinksHtml(item.AlbumArtists, "detailPageParentLink"));
} else if (item.ArtistItems && item.ArtistItems.length && item.Type == "MusicVideo") {
html.push(LibraryBrowser.getArtistLinksHtml(item.ArtistItems, "detailPageParentLink"));
} else if (item.SeriesName && item.Type == "Episode") {
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) {
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) {
html.push(item.Album);
}
if (html.length) {

View file

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

View file

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