GlennNZ 83 Posted March 11, 2019 Share Posted March 11, 2019 (edited) Hi all, Please point out where I am going wrong here.... I am gathering a list of Movies from main Selection via c#, I then call for further information each item from this list. A number of these items are different and it seems to be parent/child issues. I was of the understanding, repeated in a few places that a single call to the above /Users/{UserId}/Items/{Id} Should return all of the items possible results, and I can confirm that &Fields does not work; as is reported/it should. http://192.168.1.209:8096/emby/Users/e8a76f63558941209615d219a09a8f8a/Items/144422/?api_key=3773fzzz0b44515b12f467d0691de87 Returns the below ONLY: Missing - everything really. {Name: "Johnny.English.Strikes.Again.2018.1080p.BluRay.DTS-X.7.1.X264-iFT",ServerId: "09571969b3ac4f29b2921fd5f4f040de",Id: "144422",Etag: "3a537d5737cc9e5d146e3ea9d210563c",DateCreated: "2018-12-20T06:24:05.0000000+00:00",CanDelete: false,CanDownload: false,SupportsSync: true,SortName: "johnny english strikes again 0000002018 0000001080p bluray dtsx 0000000007 0000000001 x0000000264ift",ExternalUrls: [ ],Path: "\\QNAPNAS1\dvdss\Johnny.English.Strikes.Again.2018.1080p.BluRay.DTS-X.7.1.X264-iFT",Taglines: [ ],Genres: [ ],PlayAccess: "Full",RemoteTrailers: [ ],ProviderIds: { },IsFolder: true,ParentId: "7",Type: "Folder",Studios: [ ],GenreItems: [ ],UserData: {PlaybackPositionTicks: 0,PlayCount: 0,IsFavorite: false,Played: false,Key: "efad44c7-81e1-6b5e-1815-2328cb3477d5"},RecursiveItemCount: 1,ChildCount: 1,DisplayPreferencesId: "efad44c781e16b5e18152328cb3477d5",Tags: [ ],ImageTags: {Primary: "0b3f883eb6195d1e845f44576a985460"},BackdropImageTags: ["45c57742bbe31a66113cda7309e9a859","5b6867020956296cb756168f62d594ad","2e70bf78cf9cc61100730d92f5d4a3c2","9d633ec0f41d55929dad7a0f46cc740d","ca3ee219a7c4cfc47a2a55f97921311d","bb664704e68fddcbd029df6ef7e23b38","d18b525f437101bfa043ab69ba907c8b","59183d91e83600b51e1fbebec02d5ac1","19700670fd97842f9bd9da6d8e4f1dbb","215cc8e8734af6e7a9fa03c1aff48740","7a1c446a338c2afec0274d32e78e74b0","9fbeeb271b057a91d270d8b76b0eb5e6","d3f25c1651b6fc474f32f9849752b7ca","9de5f4f7fd58064ea598ede7ee0dd2cd","903ee0f27a43376f71f777e692fce51a","17db293131618d9227a4241474b31d05","06fd2ad4fc1a1106aeb54868bf6ed84c"],LockedFields: [ ],LockData: false}Whereas http://192.168.1.209:8096/emby/Users/e8a76f63558941209615d219a09a8f8a/Items?ParentId=144422&api_key=3773fafzzzzzz12f467d0691de87&Fields=Overview,People Returns as requested plus the selected fields.. NB: Using ParentId here... {Items: [{Name: "Johnny English Strikes Again",ServerId: "09571969b3ac4f29b2921fd5f4f040de",Id: "145868",HasSubtitles: true,PremiereDate: "2018-09-12T14:00:00.0000000+00:00",CriticRating: 34,OfficialRating: "PG",Overview: "Disaster strikes when a criminal mastermind reveals the identities of all active undercover agents in Britain. The secret service can now rely on only one man - Johnny English. Currently teaching at a minor prep school, Johnny springs back into action to find the mysterious hacker. For this mission to succeed, he’ll need all of his skills - what few he has - as the man with yesterday’s analogue methods faces off against tomorrow’s digital technology.",CommunityRating: 6.4,RunTimeTicks: 53131849728,ProductionYear: 2018,IsFolder: false,Type: "Movie",People: [{Name: "Rowan Atkinson",Id: "423",Role: "Johnny English",Type: "Actor",PrimaryImageTag: "151327cac80296ea435437fda678e7f9"},{Name: "Ben Miller",Id: "424",Role: "Bough",Type: "Actor",PrimaryImageTag: "dcbcc02618bd48348205070f47b0ea9a"},{Name: "Olga Kurylenko",Id: "425",Role: "Ophelia Bhulatova",Type: "Actor",PrimaryImageTag: "b1f5dd2039393729c67a1bf472ed4599"},{Name: "Jake Lacy",Id: "427",Role: "Jason Volta",Type: "Actor",PrimaryImageTag: "c2f4ee30e0eff61afe06219ec8659100"},{Name: "Emma Thompson",Id: "426",Role: "Prime Minister",Type: "Actor",PrimaryImageTag: "1d73fbe866b3cd3810032d36b1843a2d"},{Name: "Adam James",Id: "2509",Role: "Pegasus",Type: "Actor",PrimaryImageTag: "3ee47983fa888775aecf252919f8eef7"},{Name: "Amit Shah",Id: "2510",Role: "Samir",Type: "Actor",PrimaryImageTag: "8b79d1c7b9e3d9e7645b12da085781ba"},{Name: "Matthew Beard",Id: "2511",Role: "P",Type: "Actor",PrimaryImageTag: "2e6dc5c55956634bb37000b5e13d3a01"},{Name: "Michael Gambon",Id: "2512",Role: "Agent Five",Type: "Actor",PrimaryImageTag: "ae11cbef4c6db58a6dc02aacef964dc2"},{Name: "Charles Dance",Id: "2513",Role: "Agent Seven",Type: "Actor",PrimaryImageTag: "ea25abdc0a3b4872510b8410e179c707"},{Name: "Edward Fox",Id: "2514",Role: "Agent Nine",Type: "Actor",PrimaryImageTag: "1a00ea4af85d12793c4d376fe46bf362"},{Name: "Kevin Eldon",Id: "2515",Role: "MI7 Night Duty Agent",Type: "Actor",PrimaryImageTag: "b9a7805c344c8c1fdfbeabead4797c67"},{Name: "Pauline McLynn",Id: "2516",Role: "Mrs. Trattner",Type: "Actor",PrimaryImageTag: "93beaeb4010227ca95047b7e5cacf12b"},{Name: "Jonny Sweet",Id: "2517",Role: "Tour Guide",Type: "Actor",PrimaryImageTag: "5f1958dfc8b78aaeae8cf058fe23d802"},{Name: "Samantha Russell",Id: "2518",Role: "Swedish Prime Minister",Type: "Actor",PrimaryImageTag: "0126590604ecab0013599cbcc5761388"},{Name: "David Mumeni",Id: "2519",Role: "Fabian",Type: "Actor",PrimaryImageTag: "787ffebf10468d9006dfae7354dad495"},{Name: "Miranda Hennessy",Id: "2520",Role: "Tara",Type: "Actor"},{Name: "Vicki Pepperdine",Id: "2521",Role: "Lydia",Type: "Actor",PrimaryImageTag: "a569bcc7b9ae2630e4f6d5de15458400"},{Name: "Marvin Beyster",Id: "2522",Role: "Mike Smollen",Type: "Actor",PrimaryImageTag: "285db3a3a915459b54f1d2a90ae9f6b7"},{Name: "Neil Edmond",Id: "2523",Role: "Driving Instructor",Type: "Actor"},{Name: "Gus Brown",Id: "2524",Role: "Headmaster",Type: "Actor"},{Name: "Peter Vo",Id: "2525",Role: "Secret Agent #2 (uncredited)",Type: "Actor"},{Name: "David Kerr",Id: "422",Type: "Director",PrimaryImageTag: "e8423432dd0037c2a7618d5d043e45ff"}],What do you suggest I call to get complete item information from this main list of items/in my case movies? One work around - which seems I am missing something obvious: Is to take main list of items/movies given, check whether ChildCount and then repull item data with parentId=filled Is there a way to get Base ItemID? (regardless of child existing etc?) Thanks Glenn Edited March 11, 2019 by GlennNZ Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted March 11, 2019 Author Share Posted March 11, 2019 Thanks. Sorry that was typo - posted examples use &Fields (this is reported behaviour, & is not working with single item request as it should) The issue, as described above, is how to get child ID always? Glenn Sent from my iPad using Tapatalk Link to comment Share on other sites More sharing options...
PenkethBoy 2063 Posted March 11, 2019 Share Posted March 11, 2019 (edited) try adding &Recursive=true to your first query string you are querying by ID so its only by default going to return that ID - but i would not do it that way to get child id's But the second string is the better option as you are using ParentID - i also add &recursive=true and &GroupItemsIntoCollections=False (so collections are flattened) All of those you can try via Swagger - and/or just look in the debug logs for what Emby uses via the web app to get clues Edited March 11, 2019 by PenkethBoy Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted March 12, 2019 Author Share Posted March 12, 2019 Update: I elected to use the web-browser as an eample of what is supported/what you should do. After looking at web-browser calls within Developer tools I moved to using http://192.168.1.209:8096/emby/Users/e013zzzzze389108b4365368e95c/Items?SortBy=DateCreated%2CSortName&SortOrder=Descending&IncludeItemTypes=Movie&Recursive=true&Fields=BasicSyncInfo%2CMediaSourceCount%2CSortName%2CPrimaryImageAspectRatio&ImageTypeLimit=1&EnableImageTypes=Primary%2CBackdrop%2CBanner%2CThumb%2CDisc%2CLogo&StartIndex=0&ParentId=f137a2dd21bbc1b99aa5c0f6bf0zzzz For the base, rather than pulling all items from 'movies' from Root. Using this ID - then pull each item separately. Seems to be successful. Glenn Link to comment Share on other sites More sharing options...
Luke 37118 Posted March 12, 2019 Share Posted March 12, 2019 I wouldn't pull each item separately right after that call. Just look at what happened with the Ombi software doing that. User's servers would get hammered and then they'd come to us complaining of slow performance. If you need multiple items at once then use the items endpoint. If you need one at a time based on some kind of user action, then that's when you would retrieve the single item. Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted March 12, 2019 Author Share Posted March 12, 2019 I wouldn't pull each item separately right after that call. Just look at what happened with the Ombi software doing that. User's servers would get hammered and then they'd come to us complaining of slow performance. If you need multiple items at once then use the items endpoint. If you need one at a time based on some kind of user action, then that's when you would retrieve the single item. Thanks, Luke. It is off-one database sql local copy - which does take forever to run. Then at each startup missing, new items are created. I’ll google Ombi so I completely follow - but is one-off, once -only - so should be okay? The alternative is to add multiple fields to the initial query to cover what I need - but would have thought a massive single query would be more risky? Glenn Sent from my iPad using Tapatalk Link to comment Share on other sites More sharing options...
Luke 37118 Posted March 12, 2019 Share Posted March 12, 2019 But i assume you will keep syncing as records get updated? I would stick to the list endpoints when you need lists. Link to comment Share on other sites More sharing options...
GlennNZ 83 Posted March 12, 2019 Author Share Posted March 12, 2019 But i assume you will keep syncing as records get updated? I would stick to the list endpoints when you need lists. Update just pulls last 30 movies, 50 episodes and if not in local database (checked via Emby ID number) then does single item query. Only on startup. And does this across Kodi and Emby. Risk might miss a database entry - but probably pretty small if used daily (typical usage) I do need mediastream/codec info (for icon display) and people (for director only) so to add these fields to initial item query would make the return somewhat massive I would think. Glenn Sent from my iPad using Tapatalk Link to comment Share on other sites More sharing options...
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