tstiegler 4 Posted October 2, 2023 Posted October 2, 2023 Hi, I want to set season ID's and episode indexes of episodes using Java API call ItemUpdateServiceApi.postItemsByItemid(BaseItemDto body, String itemId). I retrieved the "body" using ItemsServiceApi.getItems(...). But it seems that the returned BaseItemDto doesn't contain all necessary information for the update post because the called end point "GET /items" or "GET /Users/{user_id}/Items/" don't provide the full data set. I need to call "/emby/Users/{user_id}/Items/{item_id}" instead. But what is the java API call to achieve this? Many thanks, Thomas
softworkz 5066 Posted October 2, 2023 Posted October 2, 2023 The latest ApiClients can be found here: https://github.com/MediaBrowser/Emby.ApiClients/tree/master Java ApiClient: https://github.com/MediaBrowser/Emby.ApiClients/tree/master/Clients/Java The API call you are looking for is in this class: https://github.com/MediaBrowser/Emby.ApiClients/blob/master/Clients/Java/src/main/java/EmbyClient/Java/UserLibraryServiceApi.java There's a beta branch in this repository which corresponds to the latest beta server.
tstiegler 4 Posted October 2, 2023 Author Posted October 2, 2023 Thanks a lot. The exception isn't thrown anymore when using BaseItemDto data = new UserLibraryServiceApi.getUsersByUseridItemsById(...), but season index and and episode index are not updated. I use data.setSeasonId(episodeInfo.season.toString()); data.setIndexNumber(episodeInfo.episode); to set it before calling new ItemUpdateServiceApi.postItemsByItemid(data, id); Is this correct? Thanks, Thomas
tstiegler 4 Posted October 2, 2023 Author Posted October 2, 2023 It seems I have found it. I need to call data.setParentIndexNumber(episodeInfo.season); data.setIndexNumber(episodeInfo.episode); to set season index and episode index. 1 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now