Sludge Vohaul 22 Posted October 24, 2016 Share Posted October 24, 2016 Hi, I am new to the whole API, but I expected my client with the following configuration var caps = new ClientCapabilities { PlayableMediaTypes = new List<string> {"Movies"} } _myApiClient.ReportCapabilities(caps) to return only movies from a query _myApiClient.GetItemsAsync(new ItemQuery { ... }); This is not the case. Do I have a misunderstanding in the design, or is this behaviour simply not implemented? Thanks in advance, sv Link to comment Share on other sites More sharing options...
ebr 14910 Posted October 24, 2016 Share Posted October 24, 2016 The capabilities determine which remote control commands the client can accept. If you want limited results from queries you will need to use the ItemTypes. Link to comment Share on other sites More sharing options...
Sludge Vohaul 22 Posted November 3, 2016 Author Share Posted November 3, 2016 The capabilities determine which remote control commands the client can accept. If you want limited results from queries you will need to use the ItemTypes. Hm, makes sense. But shouldn't then my example code above raise an exception (something like an InvalidMediaTypeException), as "Movie" is not a MediaType but an ItemType? The correct MediaType would be "Videos". Or are there any cases where a client could possibly play movies, but not home videos? (just curious...). Thanks, sv Link to comment Share on other sites More sharing options...
Luke 37046 Posted November 3, 2016 Share Posted November 3, 2016 Perhaps it should throw an error, it just hasn't really come up before. It is all based on primitive media type though, we do but distinguish between types of video at this stage Link to comment Share on other sites More sharing options...
Sludge Vohaul 22 Posted November 3, 2016 Author Share Posted November 3, 2016 Sorry I am not really understanding "...we do but distinguish between types of video at this stage" - does it mean you do distinguish between different video types, or you don't? Link to comment Share on other sites More sharing options...
Luke 37046 Posted November 3, 2016 Share Posted November 3, 2016 We do not, sorry Link to comment Share on other sites More sharing options...
Sludge Vohaul 22 Posted November 3, 2016 Author Share Posted November 3, 2016 Ok, thanks for clarification. I'd then opt for a "deprecated usage" warning until next minor, and then an exception Link to comment Share on other sites More sharing options...
Luke 37046 Posted November 3, 2016 Share Posted November 3, 2016 Deprecate what? The supported media types still apply Link to comment Share on other sites More sharing options...
Sludge Vohaul 22 Posted November 12, 2016 Author Share Posted November 12, 2016 Hi, sorry for the delay. I meant to introduce a deprecated warning for everything that is not exactly matched by the media type enums or constants in the code (don't have the sources here right now, so I can't tell you where it is). The string "Movies" for example is regarded as a valid media type due to an additional string comparison. On the other hand "CoolMovies" is not regarded as a valid media type, as there is no additional check for this string. I suggested to be more strict and accept only the defined media types (which "Movies" is not). For a few releases I'd introduce a warning, and later on I'd reject invalid strings. Link to comment Share on other sites More sharing options...
Luke 37046 Posted November 12, 2016 Share Posted November 12, 2016 Yes that's a good idea. 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