Open dynamiccookies opened 2 years ago
The Collections API has not been released on the master branch of Radarr yet.
Additionally, /api/v3/collection/{id}
uses the internal database's ID, not the tmdbId. BUT, in talking with devs on the Discord server, Qstick said they would add the option to search by tmdbId!
I'm still not sure if the searching by tmdbId will only search movies currently in the library that are part of that collection, or if it will search all movies for that collection regardless of their hasFile
status.
The goal for this issue will be to pull the collection tmdbId from the movie's JSON data:
"collection": {
"name": "Iron Man Collection",
"tmdbId": 131292,
"images": []
},
Currently the entire collection array is being returned here:
so to pull the ID it would just be if (collection) var collectionId = collection.tmdbId;
At that point, the new collection API specific to querying by tmdbId could be used to return the collection data.
If this doesn't return the full collection data regardless of whether they're in the library, the next step would be to query the tmdb online API.
As of Radarr stable release 4.2.4.6635, the API allows for searching collections by tmdbId. However, unfortunately, it only returns movies in the collection that you currently have added to your Radarr server. It does not return any missing items.
Just submitted request to Qstick on discord for feature enhancement.
Discovered it does query all missing and non-missing movies. I just had to run the Refresh Collections job to update the metadata.
Unfortunately, there doesn't seem to be a hasFile
attribute on in the movie results. So, I'll either need to take the collection results and check each movie against another API call, or perhaps they'll add the feature.
It turns out hasFile
will be deprecated in a future release, and it's recommended to use sizeOnDisk
for determining whether a file exists on the server. If no file exists, the value will be 0.
Unforunately, sizeOnDisk
is also missing from the Collections return JSON, so this will need to wait until it can be added.
If you see one movie in a collection, you may want to search/add the entire collection.