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) {
|
function onGetItem(item) {
|
||||||
currentItem = 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();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
@ -362,6 +375,8 @@
|
||||||
dlg.innerHTML = html;
|
dlg.innerHTML = html;
|
||||||
document.body.appendChild(dlg);
|
document.body.appendChild(dlg);
|
||||||
|
|
||||||
|
dlg.querySelector('.pathLabel').innerHTML = Globalize.translate('MediaInfoFile');
|
||||||
|
|
||||||
$('.subtitleSearchForm', dlg).off('submit', onSearchSubmit).on('submit', onSearchSubmit);
|
$('.subtitleSearchForm', dlg).off('submit', onSearchSubmit).on('submit', onSearchSubmit);
|
||||||
|
|
||||||
paperDialogHelper.open(dlg);
|
paperDialogHelper.open(dlg);
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
<br />
|
<br />
|
||||||
<h1>${HeaderSearchForSubtitles}</h1>
|
<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;">
|
<form class="subtitleSearchForm" style="max-width:none;">
|
||||||
<div style="display: inline-block; width: 85%;">
|
<div style="display: inline-block; width: 85%;">
|
||||||
<label for="selectLanguage">${LabelLanguage}</label>
|
<label for="selectLanguage">${LabelLanguage}</label>
|
||||||
|
|
|
@ -657,6 +657,7 @@
|
||||||
"ValueGuestStar": "Guest star",
|
"ValueGuestStar": "Guest star",
|
||||||
"MediaInfoSize": "Size",
|
"MediaInfoSize": "Size",
|
||||||
"MediaInfoPath": "Path",
|
"MediaInfoPath": "Path",
|
||||||
|
"MediaInfoFile": "File",
|
||||||
"MediaInfoFormat": "Format",
|
"MediaInfoFormat": "Format",
|
||||||
"MediaInfoContainer": "Container",
|
"MediaInfoContainer": "Container",
|
||||||
"MediaInfoDefault": "Default",
|
"MediaInfoDefault": "Default",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue