mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
display original file in subtitle editor
This commit is contained in:
parent
165e7bf677
commit
9e8e2dddad
3 changed files with 21 additions and 3 deletions
|
@ -297,14 +297,27 @@
|
|||
});
|
||||
}
|
||||
|
||||
function reload(page, itemId) {
|
||||
function reload(context, itemId) {
|
||||
|
||||
$('.noSearchResults', page).hide();
|
||||
$('.noSearchResults', context).hide();
|
||||
|
||||
function onGetItem(item) {
|
||||
currentItem = item;
|
||||
|
||||
fillSubtitleList(page, item);
|
||||
fillSubtitleList(context, item);
|
||||
var file = item.Path || '';
|
||||
var index = Math.max(file.lastIndexOf('/'), file.lastIndexOf('\\'));
|
||||
if (index > -1) {
|
||||
file = file.substring(index + 1);
|
||||
}
|
||||
|
||||
if (file) {
|
||||
context.querySelector('.pathValue').innerHTML = file;
|
||||
context.querySelector('.originalFile').classList.remove('hide');
|
||||
} else {
|
||||
context.querySelector('.pathValue').innerHTML = '';
|
||||
context.querySelector('.originalFile').classList.add('hide');
|
||||
}
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
@ -362,6 +375,8 @@
|
|||
dlg.innerHTML = html;
|
||||
document.body.appendChild(dlg);
|
||||
|
||||
dlg.querySelector('.pathLabel').innerHTML = Globalize.translate('MediaInfoFile');
|
||||
|
||||
$('.subtitleSearchForm', dlg).off('submit', onSearchSubmit).on('submit', onSearchSubmit);
|
||||
|
||||
paperDialogHelper.open(dlg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue