labor4 0 Posted May 18, 2020 Share Posted May 18, 2020 This following request, iterated ("create multiple libraries at once"), will cause the first iteration to create two entries of the same library. So the *bad* result would be LIB1 LIB1 LIB2 LIB3 LIBX $url = "$myserver/Library/VirtualFolders?collectionType=homevideos&refreshLibrary=true&name=$display_name_urlen"; $header[] = "X-Emby-Token:$mytoken"; $header[] = 'Content-Type: application/json'; $fields=json_encode($grab_template); $method = 'post'; mycurlload($url, $fields, $method, $header); Deleting that library in the GUI will delete both duplicate libs at once (they are somehow linked). However, if I set GET param "refreshLibrary" to false, it won't fail. Not sure if "refreshLibrary" is related to GUI reload (therefore irrelevant to API), but I thought I might report it anyway. Background: $grab_template is a modified copy of what a browser would POST in the body. cheers Link to comment Share on other sites More sharing options...
Luke 37071 Posted May 19, 2020 Share Posted May 19, 2020 Hi, did you compare your request to what the web interface is doing? Link to comment Share on other sites More sharing options...
labor4 0 Posted May 19, 2020 Author Share Posted May 19, 2020 hi i more or less copied everything from the browser's POST request. Link to comment Share on other sites More sharing options...
Luke 37071 Posted May 19, 2020 Share Posted May 19, 2020 Are you able to reproduce the same situation using only the web app? Link to comment Share on other sites More sharing options...
labor4 0 Posted May 19, 2020 Author Share Posted May 19, 2020 you mean sending a manual POST with a browser? or if the browser shows problems doing the same? the latter: no, that works. Link to comment Share on other sites More sharing options...
labor4 0 Posted May 19, 2020 Author Share Posted May 19, 2020 (edited) i thought that maybe it was a timing problem and added 1 second sleep in between the iterations, but no luck my bet is that the browser does something in between that resets the create-cache (or an old entry in a build function), because the duplicate library is not standalone as itself. is it as if their id's are linked, and deleting one will delete both. Edited May 19, 2020 by labor4 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now