killride 45 Posted April 8, 2020 Posted April 8, 2020 Hi guys, How do I get the number of seasons of an item? Thanks
killride 45 Posted April 8, 2020 Author Posted April 8, 2020 @@PenkethBoy Can you send me a example please?
killride 45 Posted April 8, 2020 Author Posted April 8, 2020 emby/items?&api_key=xxxxx&searchterm=peaky&Recursive=true&ExcludeItemTypes=Episode,Person,Studio,Season&Fields=ChildCount Here is the output : { "Items": [ { "Name": "Peaky Blinders", "ServerId": "b34dc91cb5a941f0ae5f75710981c6c7", "Id": "8701", "RunTimeTicks": 32999999488, "IsFolder": true, "Type": "Series", "AirDays": [], "ImageTags": { "Primary": "8957de6b78867f48369b676562769e93", "Banner": "5a1985c351f44f68092047801bd3ec6b", "Logo": "4af0ad8d5ad1c872b0d402452f19ca85", "Thumb": "d5265c90f2a62cbe50770c8475be8f0d" }, "BackdropImageTags": [ "bc8fa5dd88fc6ef613179134dc38ad27" ] } ], "TotalRecordCount": 1 } No childcount in the list
PenkethBoy 2066 Posted April 8, 2020 Posted April 8, 2020 use swagger to test and get the api string you need - access via dashboard main page at bottom is API link go to the "item service" add the id of the series you want to find the seasons for - to "Ids" - cant get id from webapp url when on series detail page. add Childcount to the "Fields" option enable recursive and test
PenkethBoy 2066 Posted April 8, 2020 Posted April 8, 2020 (edited) emby/items?&api_key=xxxxx&searchterm=peaky&Recursive=true&ExcludeItemTypes=Episode,Person,Studio,Season&Fields=ChildCount Here is the output : { "Items": [ { "Name": "Peaky Blinders", "ServerId": "b34dc91cb5a941f0ae5f75710981c6c7", "Id": "8701", "RunTimeTicks": 32999999488, "IsFolder": true, "Type": "Series", "AirDays": [], "ImageTags": { "Primary": "8957de6b78867f48369b676562769e93", "Banner": "5a1985c351f44f68092047801bd3ec6b", "Logo": "4af0ad8d5ad1c872b0d402452f19ca85", "Thumb": "d5265c90f2a62cbe50770c8475be8f0d" }, "BackdropImageTags": [ "bc8fa5dd88fc6ef613179134dc38ad27" ] } ], "TotalRecordCount": 1 } No childcount in the list dont use the search term use the id - and dont exclude stuff - keep it simple and use swagger - much easier to learn Edited April 8, 2020 by PenkethBoy
killride 45 Posted April 8, 2020 Author Posted April 8, 2020 (edited) I use Swagger : He gave me this : emby/Items?Recursive=true&Fields=Childcount&Ids=8807&api_key=xxx result : { "Items": [ { "Name": "South Park", "ServerId": "b34dc91cb5a941f0ae5f75710981c6c7", "Id": "8807", "RunTimeTicks": 15000000512, "IsFolder": true, "Type": "Series", "AirDays": [], "ImageTags": { "Primary": "9cd91cc8d6375e0856513d3866b1bfbe", "Banner": "b4ca25a1dcc53798ffb14acb7c750379", "Logo": "425114a756b8859f95ec1cba2e65ba13", "Thumb": "918ab362ee869d55fc8bd524268f332c" }, "BackdropImageTags": [ "0bb9367efa2173713ec284dfd4178ce3" ] } ], "TotalRecordCount": 1 } No seasoncount Edited April 8, 2020 by killride
PenkethBoy 2066 Posted April 8, 2020 Posted April 8, 2020 Actually - you need to use the emby/users/{userid}/items end point not the emby/items endpoint - to get childcount to work
PenkethBoy 2066 Posted April 8, 2020 Posted April 8, 2020 swagger does not create api strings that way? He gave me this : emby/items?&api_key=xxxx&Fields=Childcount&Ids=8807 swagger gives strings like this ../emby/Users/{userid}/Items?Fields=childcount&Ids=1785&api_key=xxxx
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