Sludge Vohaul 22 Posted October 20, 2016 Share Posted October 20, 2016 Hi, if I wanted get a list of all photos and movies in the library would I have to write var asd = new ItemQuery { IncludeItemTypes = new [] { MediaType.Photo, "Movie" } } as there is no Movie-Property in MediaType ? Is using MediaType the right way, at all? Link to comment Share on other sites More sharing options...
ebr 14925 Posted October 21, 2016 Share Posted October 21, 2016 Media Types and Item Types are different. Media types are more inclusive. For instance, the Item Types Video and Movie are both of Media Type Video. So, while the above may work by coincidence, you should just use the strings "Photo" and "Movie". Also, you should never fire off that query just like that as it will likely bring your server to its knees and could take quite a while to return. If you really need to get all of those items, be sure to put a limit on the query and page them in. Link to comment Share on other sites More sharing options...
Sludge Vohaul 22 Posted October 24, 2016 Author Share Posted October 24, 2016 Media Types and Item Types are different. Media types are more inclusive. For instance, the Item Types Video and Movie are both of Media Type Video. So, while the above may work by coincidence, you should just use the strings "Photo" and "Movie". Also, you should never fire off that query just like that as it will likely bring your server to its knees and could take quite a while to return. If you really need to get all of those items, be sure to put a limit on the query and page them in. Thank you for the clarification on item Types. Regarding the query it was just an example, I am not planing to fetch all items of a type together. -- sv 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