mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
save library options on dialog close
This commit is contained in:
parent
89f41cdea2
commit
c50d82e592
3 changed files with 25 additions and 2 deletions
|
@ -1757,6 +1757,26 @@
|
|||
contentType: 'application/json'
|
||||
});
|
||||
};
|
||||
self.updateVirtualFolderOptions = function (id, libraryOptions) {
|
||||
|
||||
if (!id) {
|
||||
throw new Error("null name");
|
||||
}
|
||||
|
||||
var url = "Library/VirtualFolders/LibraryOptions";
|
||||
|
||||
url = self.getUrl(url);
|
||||
|
||||
return self.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
data: JSON.stringify({
|
||||
Id: id,
|
||||
LibraryOptions: libraryOptions
|
||||
}),
|
||||
contentType: 'application/json'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Renames a virtual folder
|
||||
|
|
|
@ -46,8 +46,6 @@
|
|||
EnableArchiveMediaFiles: parent.querySelector('.chkArhiveAsMedia').checked
|
||||
};
|
||||
|
||||
options.EnableAudioArchiveFiles = options.EnableArchiveMediaFiles;
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
|
|
|
@ -134,6 +134,11 @@
|
|||
|
||||
function onDialogClosing() {
|
||||
|
||||
var dlg = this;
|
||||
|
||||
var libraryOptions = libraryoptionseditor.getLibraryOptions(dlg.querySelector('.libraryOptions'));
|
||||
|
||||
ApiClient.updateVirtualFolderOptions(currentOptions.library.ItemId, libraryOptions);
|
||||
}
|
||||
|
||||
function onDialogClosed() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue