mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Show error message when ItemIds are invalid instead of infinitely spinning
This commit is contained in:
parent
1a9f51c9b0
commit
8bdae2381c
1 changed files with 8 additions and 0 deletions
|
@ -31,6 +31,14 @@ function onEditLibrary() {
|
|||
loading.show();
|
||||
const dlg = dom.parentWithClass(this, 'dlg-libraryeditor');
|
||||
let libraryOptions = libraryoptionseditor.getLibraryOptions(dlg.querySelector('.libraryOptions'));
|
||||
// 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 == undefined) {
|
||||
toast('The library setting is in an invalid state, cannot edit. You are most likely suffering from a bug where the path in the database is not the absolute path in the filesystem');
|
||||
loading.hide();
|
||||
dialogHelper.close(dlg);
|
||||
return false;
|
||||
}
|
||||
libraryOptions = Object.assign(currentOptions.library.LibraryOptions || {}, libraryOptions);
|
||||
ApiClient.updateVirtualFolderOptions(currentOptions.library.ItemId, libraryOptions).then(() => {
|
||||
hasChanges = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue