chessdragon136 677 Posted January 27, 2015 Share Posted January 27, 2015 (edited) Hi All, I feel like an idiot today but no matter what I try I cannot get a list of all episodes belonging to a TV show ordered by Season and then by Episode number: My URL is like the below: http://SERVER/mediabrowser/Users/USER/Items?ParentId=0d002d51624deba459376823e70aace3&format=json&IncludeItemTypes=Episode&Recursive=true&SortBy=ParentIndexNumber,IndexNumber&SortOrder=Ascending&Fields=ParentId,SortName,MediaSources The parent id is correct for a tv show and this does return all episodes, just not ordered (or ordered in any fashion i can see, starts with episode 7..) What am i doing wrong? Edited January 27, 2015 by chessdragon136 Link to comment Share on other sites More sharing options...
ebr 14910 Posted January 27, 2015 Share Posted January 27, 2015 Sort by SortName. I think there is also maybe a better endpoint under 'Shows' but Swagger is hosed at the moment so I can't look it up. Link to comment Share on other sites More sharing options...
ebr 14910 Posted January 27, 2015 Share Posted January 27, 2015 Yeah, you can use Shows/{id}/Episodes and I bet those will return in the proper order and probably also respect the specials in the proper place while the generic endpoint probably won't do that. Link to comment Share on other sites More sharing options...
chessdragon136 677 Posted January 27, 2015 Author Share Posted January 27, 2015 Of course it is - Just being dumb today, Thank you. And yeah have seen it in Swagger but until its added as an exception to the authentication token its no use. Link to comment Share on other sites More sharing options...
chessdragon136 677 Posted January 27, 2015 Author Share Posted January 27, 2015 (edited) Shows/ID/Episodes? i cant make work for me and again without swagger working i don't know why its not working. Server.getCustomURL("/Shows/" + this.ItemData.Items[this.selectedItem].Id + "/Episodes?format=json&Fields=ParentId,SortName,MediaSources"); Edited January 27, 2015 by chessdragon136 Link to comment Share on other sites More sharing options...
ebr 14910 Posted January 27, 2015 Share Posted January 27, 2015 The dev server now has a place to enter an API key in swagger (yea). 1 Link to comment Share on other sites More sharing options...
chessdragon136 677 Posted January 27, 2015 Author Share Posted January 27, 2015 (edited) I did not know that! That is amazing. However, with Shows\ID\Episodes I now have: which generates the URL (http removed to prevent link) localhost:8096/Shows/{Id}/Episodes?UserId=4b4c128121aa642086bb225659a7d471&Id=0d002d51624deba459376823e70aace3&api_key=6bc5322a69c243df90f7a90532a7533b Which generates a 422 response of: { "ResponseStatus": { "ErrorCode": "InvalidOperationException", "Message": "Nullable object must have a value.", "StackTrace": "[GetEpisodes: 27/01/2015 13:59:16]:\n[REQUEST: {UserId:4b4c128121aa642086bb225659a7d471,Id:0d002d51624deba459376823e70aace3}]\nSystem.InvalidOperationException: Nullable object must have a value.\r\n at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)\r\n at MediaBrowser.Api.TvShowsService.Get(GetEpisodes request)\r\n at lambda_method(Closure , Object , Object )\r\n at ServiceStack.Host.ServiceRunner`1.Execute(IRequest request, Object instance, TRequest requestDto)", "Errors": [] } } Edited January 27, 2015 by chessdragon136 Link to comment Share on other sites More sharing options...
ebr 14910 Posted January 27, 2015 Share Posted January 27, 2015 Looks like a bug in the dev server. Post it in the Alpha area please. 1 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