Exemple #1
0
        private async Task LoadArtistImage()
        {
            if (!_artistChangedHandlerAdded)
            {
                ThumbnailManager.OnArtistImageChanged(_tag.ArtistName, OnArtistImageChanged);
                _artistChangedHandlerAdded = true;
            }

            var(image, filePresent) = await ThumbnailManager.GetAsync(
                _tag.ArtistName,
                (int)Math.Max(
                    Math.Ceiling(ActualWidth),
                    Math.Ceiling(ActualHeight)));

            if (filePresent)
            {
                if (image == null)
                {
                    await FallbackMoveNext();
                }
                else
                {
                    await AnimatedSetThumbnailSource(image);
                }
            }
            else
            {
                //LoadLastFallback();
                ThumbnailAgent.Fetch(_tag.ArtistName);
            }
        }
Exemple #2
0
 public async Task <string> GetThumbnail(string thumbnailName)
 {
     return(await ThumbnailManager.GetAsync(thumbnailName));
 }