I’m using a Plex plugin called Themerr-plex, and there’s a step where it need to retrieve TMDB collection IDs. Since Plex itself doesn’t save collection IDs after scraping collections, we have to use the collection name to request collection data from TMDB using Plex’s built-in TMDB API. However, the data returned is in English by default. Because everyone’s collection title language may vary depending on the region, I would like to specify the language when requesting collection data. I’ve tried various request methods, but I can only get English data or no data at all. Does anyone know how to specify the language when using the built-in TMDB API?
If no language is added, the request looks like this: query_url = 'search/collection?query={}'
Here is a complete request example:
http://127.0.0.1:32400/services/tmdb?uri=/search/collection?query=James-Bond-Collection
http://127.0.0.1:32400/services/tmdb?uri=/search/collection?query=%E8%A9%B9%E5%A7%86%E6%96%AF%C2%B7%E9%82%A6%E5%BE%B7%EF%BC%88%E7%B3%BB%E5%88%97%EF%BC%89
Below are the methods I’ve tested for adding language:
search/collection?query={}&language=zh-CN
search/collection?query={}&language=zh
search/collection?query={}&language=CN
search/collection?query={}&language=8
search/collection?query={}&lang=zh-CN
search/collection?query={}&lang=zh
search/collection?query={}&lang=CN
search/collection?query={}&lang=8
search/collection?query={}?lang=zh-CN
search/collection?query={}?lang=zh
search/collection?query={}?lang=CN
search/collection?query={}?lang=8
None of these methods have been successful in retrieving collection data in the specified language. The data returned is either in English or no data is retrieved at all. Does anyone know what should be done in this situation?
The current method being used is precise matching, which requires the user’s collection title to match exactly with the retrieved collection title to obtain the ID. Ignoring this condition might result in matching errors. Therefore, we still prefer to match collections by title, which necessitates having the search language match the data language.