xsteadfastx 0 Posted February 27, 2017 Share Posted February 27, 2017 (edited) i discovered lately, while working on my mopidy_emby plugin that i cant recieve the albums of a artist id. first i search something GET /Search/Hints?SearchTerm=american+football&IncludeItemTypes=Audio%2CMusicAlbum%2CMusicArtist&format=json this returns {u'TotalRecordCount': 5, u'SearchHints': [{u'ItemId': u'0db6395ab76b6edbaba3a51ef23d0aa3', u'PrimaryImageTag': u'febb660caab98738b45da98d4afd6abd', u'Name': u'American Football', u'AlbumArtist': u'American Football', u'ProductionYear': 2016, u'RunTimeTicks': 22784800768, u'Artists': [u'American Football'], u'PrimaryImageAspectRatio': 1, u'Type': u'MusicAlbum', u'MatchedTerm': u'american football'}, {u'ItemId': u'6e4a2da7df0502650bb9b091312c3dbf', u'PrimaryImageTag': u'6f9aa56dde788f4413cd23d18aea93b6', u'Name': u'American Football', u'AlbumArtist': u'American Football', u'ProductionYear': 1999, u'RunTimeTicks': 49715720192, u'Artists': [u'American Football'], u'PrimaryImageAspectRatio': 1, u'Type': u'MusicAlbum', u'MatchedTerm': u'american football'}, {u'ItemId': u'ca498ea939b28593744c051d9f5e74ed', u'PrimaryImageTag': u'c71656b885cf71c7a7553dad7ec342d2', u'Name': u'American Football', u'AlbumArtist': u'American Football', u'ProductionYear': 1998, u'RunTimeTicks': 6930019840, u'Artists': [u'American Football'], u'PrimaryImageAspectRatio': 1, u'Type': u'MusicAlbum', u'MatchedTerm': u'american football'}, {u'ItemId': u'10f14ffd44edf17a1b14f7f11007653d', u'PrimaryImageTag': u'e9c9bd1eea962d7a65e144b7f35d0e15', u'Name': u'American Football', u'BackdropImageItemId': u'10f14ffd44edf17a1b14f7f11007653d', u'BackdropImageTag': u'dda7a700a21d379156d2d40dfdca824f', u'RunTimeTicks': 0, u'Type': u'MusicArtist', u'MatchedTerm': u'american football'}, {u'ItemId': u'660a781f43cb4c74e7e296142209d78a', u'Album': u'Between Order and Model', u'IndexNumber': 4, u'Name': u'The Art of American Football', u'DisplayMediaType': u'Audio', u'MediaType': u'Audio', u'AlbumArtist': u'Funeral for a Friend', u'ProductionYear': 2002, u'RunTimeTicks': 1436500000, u'Artists': [u'Funeral for a Friend'], u'Type': u'Audio', u'ParentIndexNumber': 1, u'MatchedTerm': u'american football'}]} and if i do a: GET /Users/2ec276a254a19b612b9418a8bd3b/Items?format=json&SortOrder=Ascending&ParentId=10f14ffd44edf17a1b14f7f11007653d this returns: {u'Items': [], u'TotalRecordCount': 0} usually it returns all albums by the artist... i checked it with 5 arrists. right now swagger seems not to work and i cant try things out easily. did something change on the ParentId parameter for artists? this worked a few versions ago... i cant exactly say from what version on it didnt worked anymore cause i just discovered the problem. if i do a GET /Users/2ec276a2642e54a19b612b9418a8bd3b/Items/10f14ffd44edf17a1b14f7f11007653d i get {u'Genres': [u'Indie Rock', u'Emo'], u'CanDelete': False, u'LocationType': u'FileSystem', u'CanDownload': False, u'ExternalUrls': [{u'Url': u'https://musicbrainz.org/artist/4ebb5ad3-9018-407d-8c24-c03011ab9ac6', u'Name': u'MusicBrainz'}], u'Etag': u'e5c71e2f73ec08bfa11fb8c5c61637cf', u'ScreenshotImageTags': [], u'RemoteTrailers': [], u'ServerId': u'1efa5077976bfa92bc71652404f646ec', u'Type': u'MusicArtist', u'SortName': u'american football', u'MusicVideoCount': 0, u'PlayAccess': u'Full', u'Tags': [], u'LockedFields': [], u'ProviderIds': {u'MusicBrainzArtist': u'4ebb5ad3-9018-407d-8c24-c03011ab9ac6'}, u'DisplayPreferencesId': u'184fdd0115d1192d2c763ca9df5e4ccc', u'Path': u'/config/metadata/artists/American Football', u'BackdropImageTags': [u'dda7a700a21d379156d2d40dfdca824f'], u'Name': u'American Football', u'AlbumCount': 3, u'SongCount': 31, u'LockData': False, u'Taglines': [], u'ChildCount': 34, u'UserData': {u'PlayCount': 0, u'Key': u'Artist-Musicbrainz-4ebb5ad3-9018-407d-8c24-c03011ab9ac6', u'PlaybackPositionTicks': 0, u'IsFavorite': False, u'Played': False}, u'Studios': [], u'People': [], u'DateCreated': u'2017-02-11T20:02:43.5946280Z', u'ImageTags': {u'Logo': u'3e0c8a437c1ec17b5ed496d3825a74aa', u'Primary': u'e9c9bd1eea962d7a65e144b7f35d0e15'}, u'RunTimeTicks': 0, u'Keywords': [], u'SupportsSync': True, u'Id': u'10f14ffd44edf17a1b14f7f11007653d'} if i would get the songs from SongCount would be nice too. Edited February 27, 2017 by xsteadfastx Link to comment Share on other sites More sharing options...
ebr 14930 Posted February 27, 2017 Share Posted February 27, 2017 Use ArtistIds instead of ParentId. Link to comment Share on other sites More sharing options...
xsteadfastx 0 Posted February 27, 2017 Author Share Posted February 27, 2017 /Users/2ec276a2642e54a19b612b9418a8bd3b/Items?ArtistIds=10f14ffd44edf17a1b14f7f11007653d&format=json gives me {u'Items': [{u'BackdropImageTags': [], u'ChildCount': 8, u'CollectionType': u'movies', u'Id': u'cc93e084c95dcfbcda68fcb43bc1900c', u'ImageTags': {u'Primary': u'f04f2a002aca8b0f2a556e94b35b1872', u'Thumb': u'10adcccdd9ef475109b501954048725c'}, u'IsFolder': True, u'LocationType': u'FileSystem', u'Name': u'Movies', u'PlayAccess': u'Full', u'ServerId': u'1efa5077976bfa92bc71652404f646ec', u'Type': u'CollectionFolder', u'UserData': {u'IsFavorite': False, u'Key': u'cc93e084-c95d-cfbc-da68-fcb43bc1900c', u'PlayCount': 0, u'PlaybackPositionTicks': 0, u'Played': False}}, {u'BackdropImageTags': [], u'ChildCount': 8, u'CollectionType': u'tvshows', u'Id': u'ba191c0259d171f2c516af60dc723619', u'ImageTags': {u'Primary': u'5446a9388a4e6e561a3ea170e0208d7f', u'Thumb': u'b97f138faee8fb619e62fd7627444109'}, u'IsFolder': True, u'LocationType': u'FileSystem', u'Name': u'TV shows', u'PlayAccess': u'Full', u'ServerId': u'1efa5077976bfa92bc71652404f646ec', u'Type': u'CollectionFolder', u'UserData': {u'IsFavorite': False, u'Key': u'ba191c02-59d1-71f2-c516-af60dc723619', u'PlayCount': 0, u'PlaybackPositionTicks': 0, u'Played': False}}, {u'BackdropImageTags': [], u'ChildCount': 8, u'CollectionType': u'music', u'Id': u'eb169f4ba53fc560f549cb0f2a47d577', u'ImageTags': {u'Primary': u'596e0900b3dcb822349b66101c4b263a', u'Thumb': u'554be228d100023901c4074033a1e8bd'}, u'IsFolder': True, u'LocationType': u'FileSystem', u'Name': u'Music', u'PlayAccess': u'Full', u'ServerId': u'1efa5077976bfa92bc71652404f646ec', u'Type': u'CollectionFolder', u'UserData': {u'IsFavorite': False, u'Key': u'eb169f4b-a53f-c560-f549-cb0f2a47d577', u'PlayCount': 0, u'PlaybackPositionTicks': 0, u'Played': False}}, {u'BackdropImageTags': [], u'ChildCount': 8, u'CollectionType': u'musicvideos', u'Id': u'6aaac867c6c1e575521c5675069b245d', u'ImageTags': {u'Primary': u'5da7380e26a425e1d1c4de724bc08b7c'}, u'IsFolder': True, u'LocationType': u'FileSystem', u'Name': u'Music videos', u'PlayAccess': u'Full', u'ServerId': u'1efa5077976bfa92bc71652404f646ec', u'Type': u'CollectionFolder', u'UserData': {u'IsFavorite': False, u'Key': u'6aaac867-c6c1-e575-521c-5675069b245d', u'PlayCount': 0, u'PlaybackPositionTicks': 0, u'Played': False}}, {u'BackdropImageTags': [], u'ChildCount': 8, u'CollectionType': u'boxsets', u'Id': u'a8bac34c9d1b9b82f4f1bf249efc0bc8', u'ImageTags': {u'Primary': u'0f93f8b47cb980dd7b0fc06508362e36', u'Thumb': u'a10b9301a8e64e1c576ef47e30a57c83'}, u'IsFolder': True, u'LocationType': u'FileSystem', u'Name': u'Collections', u'PlayAccess': u'Full', u'ServerId': u'1efa5077976bfa92bc71652404f646ec', u'Type': u'CollectionFolder', u'UserData': {u'IsFavorite': False, u'Key': u'a8bac34c-9d1b-9b82-f4f1-bf249efc0bc8', u'PlayCount': 0, u'PlaybackPositionTicks': 0, u'Played': False}}], u'TotalRecordCount': 5} did something change on the ParentId behaviour? Link to comment Share on other sites More sharing options...
Luke 37116 Posted February 27, 2017 Share Posted February 27, 2017 ParentId is an optional field, so you need to also add &Fields=ParentId Link to comment Share on other sites More sharing options...
xsteadfastx 0 Posted February 28, 2017 Author Share Posted February 28, 2017 ParentId is an optional field, so you need to also add &Fields=ParentId to what api endpoint? i banged my head for hours on the wall... i cant get tracks or albums with the artist id no more. Link to comment Share on other sites More sharing options...
xsteadfastx 0 Posted February 28, 2017 Author Share Posted February 28, 2017 maybe i should explain more what i want to do. i use the search to find a a artist "GET /Search/Hints?SearchTerm=jawbreaker&IncludeItemTypes=Audio%2CMusicAlbum%2CMusicArtist&format=json i get this back {u'TotalRecordCount': 2, u'SearchHints': [{u'ItemId': u'065b5f244bddeee91c740ab9e8bc098b', u'Album': u'Sea of Cowards', u'IndexNumber': 10, u'Name': u'Jawbreaker', u'DisplayMediaType': u'Audio', u'MediaType': u'Audio', u'AlbumArtist': u'The Dead Weather', u'ProductionYear': 2010, u'RunTimeTicks': 1780770000, u'Artists': [u'The Dead Weather'], u'Type': u'Audio', u'ParentIndexNumber': 1, u'MatchedTerm': u'jawbreaker'}, {u'ItemId': u'c35d160230ff74e5cab4d22ea6b37b82', u'PrimaryImageTag': u'077591081a378a8b9d21a32db0eb0a58', u'Name': u'Jawbreaker', u'RunTimeTicks': 0, u'Type': u'MusicArtist', u'MatchedTerm': u'jawbreaker'}]} it used to work that i take the ItemId 'c35d160230ff74e5cab4d22ea6b37b82' and do this GET /Users/2ec276a2642e54a19b612b9418a8bd3b/Items?format=json&SortOrder=Ascending&ParentId=c35d160230ff74e5cab4d22ea6b37b82 this gave me the albums back. but now its a {u'Items': [], u'TotalRecordCount': 0} im sure its a little thing that broke my application. that ItemId doesnt seem to be like the ArtistId. Link to comment Share on other sites More sharing options...
ebr 14930 Posted February 28, 2017 Share Posted February 28, 2017 And you tried changing your second query to this? GET /Users/2ec276a2642e54a19b612b9418a8bd3b/Items?format=json&SortOrder=Ascending&ArtistIds=c35d160230ff74e5cab4d22ea6b37b82&Recursive=true&IncludeItemTypes=MusicAlbum Link to comment Share on other sites More sharing options...
xsteadfastx 0 Posted March 8, 2017 Author Share Posted March 8, 2017 And you tried changing your second query to this? GET /Users/2ec276a2642e54a19b612b9418a8bd3b/Items?format=json&SortOrder=Ascending&ArtistIds=c35d160230ff74e5cab4d22ea6b37b82&Recursive=true&IncludeItemTypes=MusicAlbum im sorry for late answer. im in hospital right now... i will check that out if i can get my hands on my sourcecode. Link to comment Share on other sites More sharing options...
ebr 14930 Posted March 9, 2017 Share Posted March 9, 2017 Get better soon! Link to comment Share on other sites More sharing options...
xsteadfastx 0 Posted March 13, 2017 Author Share Posted March 13, 2017 this works great. now im thinking about rewriting my mopidy plugin with just using the /Users/Items endpoint 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