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);
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
<br />
|
||||
<h1>${HeaderSearchForSubtitles}</h1>
|
||||
|
||||
<p style="margin: 1.5em 0;" class="originalFile"><span class="mediaInfoLabel pathLabel"></span><span class="pathValue"></span></p>
|
||||
|
||||
<form class="subtitleSearchForm" style="max-width:none;">
|
||||
<div style="display: inline-block; width: 85%;">
|
||||
<label for="selectLanguage">${LabelLanguage}</label>
|
||||
|
|
|
@ -657,6 +657,7 @@
|
|||
"ValueGuestStar": "Guest star",
|
||||
"MediaInfoSize": "Size",
|
||||
"MediaInfoPath": "Path",
|
||||
"MediaInfoFile": "File",
|
||||
"MediaInfoFormat": "Format",
|
||||
"MediaInfoContainer": "Container",
|
||||
"MediaInfoDefault": "Default",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue