mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix subs not starting initially
This commit is contained in:
parent
3009413b24
commit
0154f42bfe
10 changed files with 30 additions and 94 deletions
|
@ -360,9 +360,11 @@
|
|||
requiresSettingStartTimeOnStart = elem.currentTime == 0;
|
||||
}
|
||||
|
||||
tracks = tracks || [];
|
||||
|
||||
if (enableViblast(val)) {
|
||||
|
||||
setTracks(elem, tracks || []);
|
||||
setTracks(elem, tracks);
|
||||
|
||||
viblast(elem).setup({
|
||||
key: getViblastKey(),
|
||||
|
@ -375,10 +377,20 @@
|
|||
|
||||
elem.src = val;
|
||||
|
||||
setTracks(elem, tracks || []);
|
||||
setTracks(elem, tracks);
|
||||
|
||||
$(elem).one("loadedmetadata", onLoadedMetadata);
|
||||
}
|
||||
|
||||
var currentTrackIndex = -1;
|
||||
for (var i = 0, length = tracks.length; i < length; i++) {
|
||||
if (tracks[i].isDefault) {
|
||||
currentTrackIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
self.setCurrentTrackElement(currentTrackIndex);
|
||||
}
|
||||
|
||||
currentSrc = val;
|
||||
|
|
|
@ -1654,32 +1654,32 @@
|
|||
} else if (item.MediaType == "Audio" || item.Type == "MusicAlbum" || item.Type == "MusicArtist") {
|
||||
|
||||
if (item.Name && options.showTitle) {
|
||||
icon = 'fa-music';
|
||||
icon = 'library-music';
|
||||
}
|
||||
cssClass += " defaultBackground";
|
||||
|
||||
} else if (item.Type == "Recording" || item.Type == "Program" || item.Type == "TvChannel") {
|
||||
|
||||
if (item.Name && options.showTitle) {
|
||||
icon = 'fa-folder-open';
|
||||
icon = 'folder-open';
|
||||
}
|
||||
|
||||
cssClass += " defaultBackground";
|
||||
} else if (item.MediaType == "Video" || item.Type == "Season" || item.Type == "Series") {
|
||||
|
||||
if (item.Name && options.showTitle) {
|
||||
icon = 'fa-video-camera';
|
||||
icon = 'videocam';
|
||||
}
|
||||
cssClass += " defaultBackground";
|
||||
} else if (item.Type == "Person") {
|
||||
|
||||
if (item.Name && options.showTitle) {
|
||||
icon = 'fa-user';
|
||||
icon = 'person';
|
||||
}
|
||||
cssClass += " defaultBackground";
|
||||
} else {
|
||||
if (item.Name && options.showTitle) {
|
||||
icon = 'fa-folder-open';
|
||||
icon = 'folder-open';
|
||||
}
|
||||
cssClass += " defaultBackground";
|
||||
}
|
||||
|
@ -1765,7 +1765,7 @@
|
|||
html += '<a' + transition + ' class="' + anchorCssClass + '" href="' + href + '"' + defaultActionAttribute + '>';
|
||||
html += '<div class="' + imageCssClass + '" style="' + style + '"' + dataSrc + '>';
|
||||
if (icon) {
|
||||
html += '<i class="fa ' + icon + '"></i>';
|
||||
html += '<iron-icon icon="' + icon + '"></iron-icon>';
|
||||
}
|
||||
html += '</div>';
|
||||
|
||||
|
|
|
@ -88,15 +88,6 @@
|
|||
|
||||
LibraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
if (user.Policy.EnableMediaPlayback && result.Items.length) {
|
||||
$('.btnTrailerReel', page).show();
|
||||
} else {
|
||||
$('.btnTrailerReel', page).hide();
|
||||
}
|
||||
});
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
@ -130,36 +121,6 @@
|
|||
$('select.selectPageSize', viewPanel).val(query.Limit).selectmenu('refresh');
|
||||
}
|
||||
|
||||
function playReel(page) {
|
||||
|
||||
$('.popupTrailerReel', page).popup('close');
|
||||
|
||||
var reelQuery = {
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
SortBy: 'Random',
|
||||
Limit: 50,
|
||||
Fields: "MediaSources,Chapters"
|
||||
};
|
||||
|
||||
if ($('.chkUnwatchedOnly', page).checked()) {
|
||||
reelQuery.Filters = "IsPlayed";
|
||||
}
|
||||
|
||||
ApiClient.getJSON(ApiClient.getUrl('Trailers', reelQuery)).done(function (result) {
|
||||
|
||||
MediaController.play({
|
||||
items: result.Items
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
var page = $(this).parents('.page');
|
||||
|
||||
playReel(page);
|
||||
return false;
|
||||
}
|
||||
|
||||
function initPage(page, tabContent, viewPanel) {
|
||||
|
||||
$('.radioSortBy', viewPanel).on('click', function () {
|
||||
|
@ -222,14 +183,6 @@
|
|||
query.StartIndex = 0;
|
||||
reloadItems(tabContent, viewPanel);
|
||||
});
|
||||
|
||||
$('.btnTrailerReel', tabContent).on('click', function () {
|
||||
|
||||
$('.popupTrailerReel', page).popup('open');
|
||||
|
||||
});
|
||||
|
||||
$('.popupTrailerReelForm', page).off('submit', onSubmit).on('submit', onSubmit);
|
||||
}
|
||||
|
||||
$(document).on('pageinitdepends', "#moviesRecommendedPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue