1
0
Fork 0
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:
Luke Pulverenti 2016-08-13 23:12:26 -04:00
parent 89f41cdea2
commit c50d82e592
3 changed files with 25 additions and 2 deletions

View file

@ -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

View file

@ -46,8 +46,6 @@
EnableArchiveMediaFiles: parent.querySelector('.chkArhiveAsMedia').checked
};
options.EnableAudioArchiveFiles = options.EnableArchiveMediaFiles;
return options;
}

View file

@ -134,6 +134,11 @@
function onDialogClosing() {
var dlg = this;
var libraryOptions = libraryoptionseditor.getLibraryOptions(dlg.querySelector('.libraryOptions'));
ApiClient.updateVirtualFolderOptions(currentOptions.library.ItemId, libraryOptions);
}
function onDialogClosed() {