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

rework text subtitles

This commit is contained in:
Luke Pulverenti 2014-01-10 08:52:01 -05:00
parent 1447aafd24
commit 8ef09d054d
11 changed files with 300 additions and 146 deletions

View file

@ -83,6 +83,12 @@
$('#playButtonContainer', page).hide();
$('#playExternalButtonContainer', page).hide();
}
if (item.LocalTrailerCount && item.LocationType !== "Offline") {
$('#trailerButtonContainer', page).show();
} else {
$('#trailerButtonContainer', page).hide();
}
$(".autoNumeric").autoNumeric('init');
@ -189,7 +195,7 @@
$('#scenesCollapsible', page).show();
renderScenes(page, item, 4);
}
if (!item.LocalTrailerCount && !item.RemoteTrailers.length) {
if (item.LocalTrailerCount || !item.RemoteTrailers.length) {
$('#trailersCollapsible', page).addClass('hide');
} else {
$('#trailersCollapsible', page).removeClass('hide');
@ -1120,6 +1126,24 @@
LibraryBrowser.showPlayMenu(this, currentItem.Id, currentItem.Type, mediaType, userdata.PlaybackPositionTicks);
});
$('#btnPlayTrailer', page).on('click', function () {
ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), currentItem.Id).done(function (trailers) {
var trailer = trailers[0];
var userdata = trailer.UserData || {};
var mediaType = trailer.MediaType;
if (trailer.Type == "MusicArtist" || trailer.Type == "MusicAlbum") {
mediaType = "Audio";
}
LibraryBrowser.showPlayMenu(this, trailer.Id, trailer.Type, mediaType, userdata.PlaybackPositionTicks);
});
});
$('#btnPlayExternal', page).on('click', function () {
ApiClient.markPlayed(Dashboard.getCurrentUserId(), currentItem.Id, new Date());