private void SetGalleryCacheSize()
        {
            // gallery
            long thumbnailCachesize = MyFile.DirectorySize(@"cache\gallery", "poster*.jpg");

            labelForGalleryCacheSize.Text = MyFile.FormatSize(thumbnailCachesize);
        }
Beispiel #2
0
        public static bool ThumbnailsAlreadySet()
        {
            List <VideoInfo> videoInfos = ListVideoInfo.GetList();
            int nbrThumbnails           = videoInfos.Where(x => x.files.posterThumbnail != null).Count();

            long thumbnailCachesize = MyFile.DirectorySize(@"cache\gallery", "poster*.jpg");

            bool thumbnailsSet;

            // if thumbnails set in list (nbrThumbnails > 0), but cache empty (thumbnailCachesize == 0)
            // assume intent is to rebuild app thumbnails, so thumbnailsSet = false

            // so thumbnails set only if set in list and set in cache
            if (nbrThumbnails > 0 && thumbnailCachesize > 0)
            {
                thumbnailsSet = true;
            }
            else
            {
                thumbnailsSet = false;
            }
            return(thumbnailsSet);
        }