Jump to content

ApiClient; How to check whether an arbitrary string matches an existing boxset


Sludge Vohaul
Go to solution Solved by Luke,

Recommended Posts

Sludge Vohaul

Hello,

 
I am one more time stuck with collection issues.
 
I have an arbitrary string and need to check whether a collection matching this string already exists.
 
Background:
I am working on a "Plex metadata exporter - Emby metadata importer" tool for movies.
In Plex after a movie had been imported and identified, one can add it to one or more (suggested) collections.
These collections seem to consist of the name string only in the preconfigured language, no metadata like imbd  IDs or the like.
So, when I try to import a plex movie object into Emby, I need to check whether a collection matching the name string already exists and create a new one if it doesn't.
 
Example:
The to be imported Plex movie object is in a collection:
All I have is the collection name string: "Boondock Saints Filmreihe" (the "The" is missing, English/German mix)
 
In Emby, there is already a manually created collection:
Path: ".../collections/Der blutige Pfad Gottes Filmreihe [boxset]"
Title: "Der blutige Pfad Gottes Filmreihe"
MovieDB Id: 87186
 
Currently, the tool creates the following new collection in Emby. This is wrong, as the already existing collection should be used:
Path: ".../collections/Boondock Saints Filmreihe [boxset]"
Title: "Der blutige Pfad Gottes Filmreihe"
MovieDB Id: 87186
 
Conclusion:
All I can think of is querying the available movie DBs from the tool and check the IDs, which is quite a lot of work.
Is there any better way?
 
Thanks again,
sv
 
Link to comment
Share on other sites

  • Solution

you could try to use the search api to find the collection in the library, although based on your example it won't work in this particular case, but it might for others. failing that i think you will need to use moviedb.

  • Like 1
Link to comment
Share on other sites

Sludge Vohaul

Yea, as you said there a cases where a local search does not help.

I'll postpone this topic in the tool...

 

Thanks,

sv

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