mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add support for Tv show
This commit is contained in:
parent
c3354a36e3
commit
811a809e1b
1 changed files with 19 additions and 7 deletions
|
@ -116,23 +116,35 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
|
||||||
console.debug(JSON.stringify(item, null, 4));
|
console.debug(JSON.stringify(item, null, 4));
|
||||||
if (item.Type == "Audio" || item.MediaStreams[0].Type == "Audio") {
|
if (item.Type == "Audio" || item.MediaStreams[0].Type == "Audio") {
|
||||||
var songName = item.Name;
|
var songName = item.Name;
|
||||||
if (item.Album != null && (item.Artists != null)) {
|
if (item.Album != null && item.Artists != null) {
|
||||||
var albumName = item.Album;
|
var albumName = item.Album;
|
||||||
var artistName;
|
var artistName;
|
||||||
if (item.ArtistItems != null) {
|
if (item.ArtistItems != null) {
|
||||||
artistName = item.ArtistItems[0].Name;
|
artistName = item.ArtistItems[0].Name;
|
||||||
context.querySelector(".nowPlayingAlbum").innerHTML = '<a style="color:inherit;" class="button-link emby-button" is="emby-linkbutton" href="itemdetails.html?id=' + item.AlbumId + '&serverId=' + (item.ServerId || serverId) + '">' + albumName + '</a>';
|
context.querySelector(".nowPlayingAlbum").innerHTML = '<a style="color:inherit;" class="button-link emby-button" is="emby-linkbutton" href="itemdetails.html?id=' + item.AlbumId + '&serverId=' + (item.ServerId || serverId) + '">' + albumName + '</a>';
|
||||||
context.querySelector(".nowPlayingArtist").innerHTML = '<a style="color:inherit;" class="button-link emby-button" is="emby-linkbutton" href="itemdetails.html?id=' + item.ArtistItems[0].Id + '&serverId=' + (item.ServerId || serverId) + '">' + artistName + '</a>';
|
context.querySelector(".nowPlayingArtist").innerHTML = '<a style="color:inherit;" class="button-link emby-button" is="emby-linkbutton" href="itemdetails.html?id=' + item.ArtistItems[0].Id + '&serverId=' + (item.ServerId || serverId) + '">' + artistName + '</a>';
|
||||||
context.querySelector(".contextMenuAlbum").innerHTML = '<a style="color:inherit;" class="button-link emby-button" is="emby-linkbutton" href="itemdetails.html?id=' + item.AlbumId + '&serverId=' + (item.ServerId || serverId) + '"><i class="actionsheetMenuItemIcon listItemIcon listItemIcon-transparent material-icons">album</i> View album</a>';
|
context.querySelector(".contextMenuAlbum").innerHTML = '<a style="color:inherit;" class="button-link emby-button" is="emby-linkbutton" href="itemdetails.html?id=' + item.AlbumId + '&serverId=' + (item.ServerId || serverId) + '"><i class="actionsheetMenuItemIcon listItemIcon listItemIcon-transparent material-icons">album</i> ' + globalize.translate("ViewAlbum") + '</a>';
|
||||||
context.querySelector(".contextMenuArtist").innerHTML = '<a style="color:inherit;" class="button-link emby-button" is="emby-linkbutton" href="itemdetails.html?id=' + item.ArtistItems[0].Id + '&serverId=' + (item.ServerId || serverId) + '"><i class="actionsheetMenuItemIcon listItemIcon listItemIcon-transparent material-icons">person</i> View artist</a>';
|
context.querySelector(".contextMenuArtist").innerHTML = '<a style="color:inherit;" class="button-link emby-button" is="emby-linkbutton" href="itemdetails.html?id=' + item.ArtistItems[0].Id + '&serverId=' + (item.ServerId || serverId) + '"><i class="actionsheetMenuItemIcon listItemIcon listItemIcon-transparent material-icons">person</i> ' + globalize.translate("ViewArtist") + '</a>';
|
||||||
} else {
|
} else {
|
||||||
context.querySelector(".nowPlayingAlbum").innerHTML = albumName;
|
|
||||||
artistName = item.Artists;
|
artistName = item.Artists;
|
||||||
|
context.querySelector(".nowPlayingAlbum").innerHTML = albumName;
|
||||||
context.querySelector(".nowPlayingArtist").innerHTML = artistName;
|
context.querySelector(".nowPlayingArtist").innerHTML = artistName;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
context.querySelector(".nowPlayingSongName").innerHTML = songName;
|
context.querySelector(".nowPlayingSongName").innerHTML = songName;
|
||||||
} else {
|
} else if (item.Type == "Episode") {
|
||||||
|
if (item.SeasonName != null) {
|
||||||
|
context.querySelector(".nowPlayingSeason").innerHTML = '<a style="color:inherit;" class="button-link emby-button" is="emby-linkbutton" href="itemdetails.html?id=' + item.SeasonId + '&serverId=' + (item.ServerId || serverId) + '">' + item.SeasonName + '</a>';
|
||||||
|
}
|
||||||
|
if (item.SeriesName != null) {
|
||||||
|
if (item.SeriesId !=null) {
|
||||||
|
context.querySelector(".nowPlayingSerie").innerHTML = '<a style="color:inherit;" class="button-link emby-button" is="emby-linkbutton" href="itemdetails.html?id=' + item.SeriesId + '&serverId=' + (item.ServerId || serverId) + '">' + item.SeriesName + '</a>';
|
||||||
|
} else {
|
||||||
|
context.querySelector(".nowPlayingSerie").innerHTML = item.SeriesName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
context.querySelector(".nowPlayingEpisode").innerHTML = item.Name;
|
||||||
|
} else {
|
||||||
context.querySelector(".nowPlayingPageTitle").innerHTML = displayName;
|
context.querySelector(".nowPlayingPageTitle").innerHTML = displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,9 +155,9 @@ define(["browser", "datetime", "backdrop", "libraryBrowser", "listView", "imageL
|
||||||
}
|
}
|
||||||
|
|
||||||
var url = item ? seriesImageUrl(item, {
|
var url = item ? seriesImageUrl(item, {
|
||||||
maxHeight: 300
|
maxHeight: 300 * 2
|
||||||
}) || imageUrl(item, {
|
}) || imageUrl(item, {
|
||||||
maxHeight: 300
|
maxHeight: 300 * 2
|
||||||
}) : null;
|
}) : null;
|
||||||
|
|
||||||
console.debug("updateNowPlayingInfo");
|
console.debug("updateNowPlayingInfo");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue