Jump to content

EDCM - Emby Dynamic Collections Manager 0.0.1-Alpha


EatSleepCodeDel

Recommended Posts

EatSleepCodeDel

Hi, Emby community!

I would like to introduce EDCM, the Emby Dynamic Collections Manager. This tool is a companion to Emby to automatically create and update Emby Collections based on rule sets. For example, to automatically create a collection for all TV shows from HBO with a rating of 8 and above, the following ruleset can be created:

[Highly Rated HBO Series]
Type=Series
Studios = HBO
MinCommunityRating = 8

This will find any library items matching the specified criteria and add them to a collection named 'Highly Rated HBO Series'. If new shows are added to your library that match the requirements, they will to the collection automatically. All rules from the Get Items API endpoint are supported.

Currently, EDCM is very much an alpha release, but no calls are made that are dangerous to your library or Emby itself, so I invite you to give it a go and let me know your thoughts. Any feedback is appreciated!

Check out my EDCM GitHub repository on how to install and run it. I have created a ~70mb Docker image, ready to go!

I hope you enjoy :)

 

  • Like 2
  • Agree 1
  • Thanks 1
Link to comment
Share on other sites

Thanks for sharing.

Link to comment
Share on other sites

hthgihwaymonk
Posted (edited)

Interesting idea to use existing filtering to create collections.
I like how you didn't bake a paywall into it.

Have you noticed if you've hit a limit yet in the number of items that you can pass using ?
 

        # Add to collection here:
        results_id_string = ",".join([result["Id"] for result in results])
        response = emby_api.Collections(
            params={"Name": section, "Ids": results_id_string}
        )


 

Edited by hthgihwaymonk
Link to comment
Share on other sites

EatSleepCodeDel
Quote

Interesting idea to use existing filtering to create collections.
I like how you didn't bake a paywall into it.

Thanks, :) I'm all about FOSS (for my projects anyway).

Quote

Have you noticed if you've hit a limit yet in the number of items that you can pass

Not in terms of not receiving an OK 200 response. I have found if I start making the rule sets for a collection too specific, I don't get any results back (typically 7-8 rules in a set), however, that seems to be the breadth of my library.

Link to comment
Share on other sites

hthgihwaymonk

Seems when I get above 300+ish items in a collection, created using the api, it fails

  • Like 1
Link to comment
Share on other sites

EatSleepCodeDel
29 minutes ago, hthgihwaymonk said:

Seems when I get above 300+ish items in a collection, created using the api, it fails

Ah sorry, I miss read your first post. I was thinking of the size of the query, not the size of the items for a collection. I am getting 414 status codes on some collections that have a lot of entries. I will need to split up the POST requests. Thank you for flagging!

 

@LukeDo you know the limit of items I can pass to a collection?

Link to comment
Share on other sites

Happy2Play
14 minutes ago, EatSleepCodeDel said:

Ah sorry, I miss read your first post. I was thinking of the size of the query, not the size of the items for a collection. I am getting 414 status codes on some collections that have a lot of entries. I will need to split up the POST requests. Thank you for flagging!

 

@LukeDo you know the limit of items I can pass to a collection?

Pretty sure the same discussion from years ago with playlists

 

  • Like 1
Link to comment
Share on other sites

EatSleepCodeDel

Thanks, Happy2Play. I have implemented a workaround that breaks the params into batches. More API calls, but it doesn't seem to rate limit. Largest set of batches I have come across is 64 in my tests so far.

Link to comment
Share on other sites

hthgihwaymonk

So that's interesting, from that thread you linked @Happy2Play.
I think I read that one before but missed this comment by luke - 
You can also put those values in the body though. You don't have to put them all in the url.

Link to comment
Share on other sites

hthgihwaymonk
Posted (edited)

I've been using MDBLists to create collections and have had to limit them to under 300 items as I had not had time to break them into sets before creating them with the api. But I may look at sending them in the body

Edited by hthgihwaymonk
Link to comment
Share on other sites

The server itself has no limit. That uri error is coming from elsewhere. So yes that does in effect end up creating a limit. What we need to do is create new api methods that put all of these params in the body of the request and then there won't be an issue.

  • Thanks 1
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...