Jump to content

duplicate on LIB creation


labor4

Recommended Posts

labor4
            

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

Hi, did you compare your request to what the web interface is doing?

Link to comment
Share on other sites

Are you able to reproduce the same situation using only the web app?

Link to comment
Share on other sites

labor4

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

labor4

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 by labor4
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...