Jump to content

Using the /Collections API to create a new collection


Recommended Posts

Posted

Im running into a problem with the /Collections api

the URL I am sending is the following

http://mediabox:8096/Collections?api_key=XXXXXXXXXXX&IsLocked=false&Name=AFI%20top%2010%20Animation&Ids=265539,265222,265112,232588,265111,265495,230435,209878,265114,265510

Which should create a new Collection name "AFI top 10 Animation" with 10 movies in the collection.

However, I am getting "Unable to find the specified file." for the response.

Any help would be appreciated

Posted

The log shows zero. No errors, no log of the request at all

Posted

Figured it out.  Its a post request...

 

  • Like 1
  • 1 month later...
Posted

I figured it out.  I guess my problem was with the parsing of id's. 

If it helps anyone for future reference, here's my python snippet. 

movie_ids = ",".join(str(movie) for movie in movies)
response = requests.post(f'https://yourservername.home/Collections?api_key={api_key}&IsLocked=false&Name={collection_name}&Movies&Ids={movie_ids}')

 

  • Thanks 1
Posted
19 hours ago, akacharos said:

I figured it out.  I guess my problem was with the parsing of id's. 

If it helps anyone for future reference, here's my python snippet. 

movie_ids = ",".join(str(movie) for movie in movies)
response = requests.post(f'https://yourservername.home/Collections?api_key={api_key}&IsLocked=false&Name={collection_name}&Movies&Ids={movie_ids}')

 

Sorry, been dealing with a ton of server (non-emby) issues over the last 2 days.  Glad you got it working

  • Thanks 1

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