KnownFolders.VideosLibrary picks all videos?

120 views Asked by At

in UWP "knownfolders.VideoLibrary", what exact folders does this pickup ? musiclibrary picks all music present on the hard drive, but VideosLibrary seems to pick only 2 folders on my harddrive which have videos. but there are other folders as well and they are not being picked. here is the code.

var files = await KnownFolders.VideosLibrary.GetFilesAsync(
           Windows.Storage.Search.CommonFileQuery.OrderByDate);
1

There are 1 answers

3
kennyzx On BEST ANSWER

Include the other folders into the Video Library.

Right Click a folder containing videos -> Include in library -> video.

You can prompt user to select a folder and add the folder to the video library like this:

StorageLibrary videoLibrary = await StorageLibrary.GetLibraryAsync(KnownLibraryId.Videos);
await videoLibrary.RequestAddFolderAsync();