chef 3808 Posted March 25, 2021 Posted March 25, 2021 I have no idea how to do this LOL... Which service endpoint is responsible for chapter data? I thought it was, 'Item' but...  Â
Luke 40065 Posted March 26, 2021 Posted March 26, 2021 Hi, just pull down the item you want and there will be a .Chapters property. 1
chef 3808 Posted March 26, 2021 Author Posted March 26, 2021 Sorry, quick follow up. I should see them as part of the Entities.BaseItem
rbjtech 4996 Posted March 26, 2021 Posted March 26, 2021 (edited) I can query them via the API ? curl -X GET "http://***:8096/emby/Items?Fields=Chapters&Ids=440729&api_key=***" -H "accept: application/json" QueryResult_BaseItemDto{ Items[BaseItemDto{...}] TotalRecordCountinteger($int32) } Output - Â { "Items": [ { "Name": "Spartacus", "ServerId": "e9f679de4d284ca2bf07eb4e72a19ea7", "Id": "440729", "RunTimeTicks": 118038180000, "IsFolder": false, "Type": "Movie", "ImageTags": { "Primary": "8142d00c86f41cfa35c4e3576a507359", "Logo": "3ee63bb9bdf748e7b47632c3d7b3bdb1", "Thumb": "33c6391c68abb9fe673a5aefb3052831" }, "BackdropImageTags": [ "95a5992d37af26fda7fe16a3359dab98", "23494a9c7ae96dfea94460d238bd3021" ], "Chapters": [ { "StartPositionTicks": 0, "Name": "Overture", "ImageTag": "fd1ef87c51224ed35e7fdc63dbe9ccc1" }, { "StartPositionTicks": 2433680000, "Name": "Main Titles", "ImageTag": "fd1ef87c51224ed35e7fdc63dbe9ccc1" }, { "StartPositionTicks": 4645470000, "Name": "A Disease Called Human Slavery", "ImageTag": "fd1ef87c51224ed35e7fdc63dbe9ccc1" ..... }, Edited March 26, 2021 by rbjtech 1
chef 3808 Posted March 26, 2021 Author Posted March 26, 2021 (edited) Ah, BaseItemDto, that is different from the BaseItem object. I'll check it out now. Cool! EDIT: Yep, that's it. Thank you Edited March 26, 2021 by chef
chef 3808 Posted March 26, 2021 Author Posted March 26, 2021 (edited) Here is a new question about Chapters... When you want to link to a primary image from the server, the url looks like this: $"/Items/{item.InternalId}/Images/primary?quality=90&maxHeight=1008&maxWidth=700";  Chapters seem to have an "ImagePaths" property, which I would assume is the physical directory of the image... I think... It also has a "ImageTag" property... What does the URL look like for requesting the chapter image? Can you link an image in a URL using Tags? If not, am I suppose to wrap my own Service Endpoint to handle the "ImagePath" for the chapter? Edited March 26, 2021 by chef
Luke 40065 Posted March 26, 2021 Posted March 26, 2021 Have you checked out the urls used by the web app? 1
chef 3808 Posted March 26, 2021 Author Posted March 26, 2021 (edited) Perfect! getting Chapters is: $"/Items/{item.Id}/Images/Chapter/{index}?maxWidth=637";  What is the best way to get the Dto version of a baseItem? LibraryManager will give me the BaseItem. Perhaps I need to request the data based on a User?  Edited March 26, 2021 by chef
chef 3808 Posted March 26, 2021 Author Posted March 26, 2021 Looks like you can use the "IDtoService" to convert the object... maybe....
Luke 40065 Posted March 26, 2021 Posted March 26, 2021 You can, but you can probably also just use the original server objects this is just server side code.
chef 3808 Posted March 26, 2021 Author Posted March 26, 2021 29 minutes ago, Luke said: You can, but you can probably also just use the original server objects this is just server side code. Although there are some properties in BaseItemDto that are not in BaseItem. Chapters for instance. Â
chef 3808 Posted March 27, 2021 Author Posted March 27, 2021 (edited) It's not pretty yet, but I got chapters working! Â Â Edited March 27, 2021 by chef 3
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