The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

 none
[uwp] [C#] How Movies & TV show thumbnails so fast ? RRS feed

  • Question

  • 1. I tried to show video thumbnails by file.GetThumbnailAsync(ThumbnailMode.SingleItem)

    2. And show video folder file symply by

    folder.GetFileAsync

    But on mobile it works very slowly.

    Default Movies&TV show it very fast.

    When I run it - it show that some videos are adding to the library.

    Do you have idea what Movies&TV exactly do to show this info fast ?

    1. Does it create cache with thumbnails on file system ? ( i didn't find it )

    2. How it determinate what video was added ? ( simply scan all file system in background task )

    What another way to increase such information except save thumbnails on file system ?

    Any idea ?


    Mood Store


    • Edited by SmartWhy Wednesday, January 25, 2017 10:57 AM
    Wednesday, January 25, 2017 10:56 AM

Answers

  • It creates the index in ApplicationData folder (which is hidden from *you*). If you want to see such index in action, you can take a look at VLC for Windows Store for a rough idea on how to implement it (but I wouldn't use their approach as it is highly unstable).
    • Marked as answer by SmartWhy Friday, January 27, 2017 9:24 AM
    Wednesday, January 25, 2017 2:07 PM

All replies

  • It creates the cache internally. 

    It also caches the file names internally, so it is a matter of querying the cache not the FS. However, the FS and the cache may go out of sync. Implementing such an index is a painful task, i'd rather avoid it.


    • Edited by mcosmin Wednesday, January 25, 2017 11:02 AM
    Wednesday, January 25, 2017 11:01 AM
  • What does 'cache internally' ?

    Memory or on files system ? Because I didn't find any image it on file system create by this program ?


    Mood Store


    • Edited by SmartWhy Wednesday, January 25, 2017 1:20 PM
    Wednesday, January 25, 2017 1:20 PM
  • It creates the index in ApplicationData folder (which is hidden from *you*). If you want to see such index in action, you can take a look at VLC for Windows Store for a rough idea on how to implement it (but I wouldn't use their approach as it is highly unstable).
    • Marked as answer by SmartWhy Friday, January 27, 2017 9:24 AM
    Wednesday, January 25, 2017 2:07 PM
  • I have same question as you do, Photos app in windows 10 does not have any cache in appdata folder, but it has a xml file named 'TimelinePrefetchThumbnails.xml', in this file , there is a field 'SystemCacheId', seems to be something related with thumbnail, but I do not know how they get or use this field.

    'TimelinePrefetchThumbnails.xml' is under :

    AppData\Local\Packages\Microsoft.Windows.Photos_8wekyb3d8bbwe\LocalState

    Wednesday, July 12, 2017 10:34 AM