mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #5893 from Narfinger/master
Show error when library ids are invalid
This commit is contained in:
commit
411fff219c
2 changed files with 12 additions and 0 deletions
|
@ -18,6 +18,7 @@ import '../formdialog.scss';
|
||||||
import '../../elements/emby-toggle/emby-toggle';
|
import '../../elements/emby-toggle/emby-toggle';
|
||||||
import '../../styles/flexstyles.scss';
|
import '../../styles/flexstyles.scss';
|
||||||
import './style.scss';
|
import './style.scss';
|
||||||
|
import alert from '../alert';
|
||||||
import toast from '../toast/toast';
|
import toast from '../toast/toast';
|
||||||
import confirm from '../confirm/confirm';
|
import confirm from '../confirm/confirm';
|
||||||
import template from './mediaLibraryEditor.template.html';
|
import template from './mediaLibraryEditor.template.html';
|
||||||
|
@ -30,6 +31,16 @@ function onEditLibrary() {
|
||||||
isCreating = true;
|
isCreating = true;
|
||||||
loading.show();
|
loading.show();
|
||||||
const dlg = dom.parentWithClass(this, 'dlg-libraryeditor');
|
const dlg = dom.parentWithClass(this, 'dlg-libraryeditor');
|
||||||
|
// when the library has moved or symlinked, the ItemId is not correct anymore
|
||||||
|
// this can lead to a forever spinning value on edit the library parameters
|
||||||
|
if (!currentOptions.library.ItemId) {
|
||||||
|
loading.hide();
|
||||||
|
dialogHelper.close(dlg);
|
||||||
|
alert({
|
||||||
|
text: globalize.translate('LibraryInvalidItemIdError')
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
}
|
||||||
let libraryOptions = libraryoptionseditor.getLibraryOptions(dlg.querySelector('.libraryOptions'));
|
let libraryOptions = libraryoptionseditor.getLibraryOptions(dlg.querySelector('.libraryOptions'));
|
||||||
libraryOptions = Object.assign(currentOptions.library.LibraryOptions || {}, libraryOptions);
|
libraryOptions = Object.assign(currentOptions.library.LibraryOptions || {}, libraryOptions);
|
||||||
ApiClient.updateVirtualFolderOptions(currentOptions.library.ItemId, libraryOptions).then(() => {
|
ApiClient.updateVirtualFolderOptions(currentOptions.library.ItemId, libraryOptions).then(() => {
|
||||||
|
|
|
@ -977,6 +977,7 @@
|
||||||
"LibraryAccessHelp": "Select the libraries to share with this user. Administrators will be able to edit all folders using the metadata manager.",
|
"LibraryAccessHelp": "Select the libraries to share with this user. Administrators will be able to edit all folders using the metadata manager.",
|
||||||
"LibraryScanFanoutConcurrency": "Parallel library scan tasks limit",
|
"LibraryScanFanoutConcurrency": "Parallel library scan tasks limit",
|
||||||
"LibraryScanFanoutConcurrencyHelp": "Maximum number of parallel tasks during library scans. Setting this to 0 will choose a limit based on your systems core count. WARNING: Setting this number too high may cause issues with network file systems; if you encounter problems lower this number.",
|
"LibraryScanFanoutConcurrencyHelp": "Maximum number of parallel tasks during library scans. Setting this to 0 will choose a limit based on your systems core count. WARNING: Setting this number too high may cause issues with network file systems; if you encounter problems lower this number.",
|
||||||
|
"LibraryInvalidItemIdError": "The library is in an invalid state and cannot be edited. You are possibly encountering a bug: the path in the database is not the correct path on the filesystem.",
|
||||||
"LimitSupportedVideoResolution": "Limit maximum supported video resolution",
|
"LimitSupportedVideoResolution": "Limit maximum supported video resolution",
|
||||||
"LimitSupportedVideoResolutionHelp": "Use 'Maximum Allowed Video Transcoding Resolution' as maximum supported video resolution.",
|
"LimitSupportedVideoResolutionHelp": "Use 'Maximum Allowed Video Transcoding Resolution' as maximum supported video resolution.",
|
||||||
"List": "List",
|
"List": "List",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue