public static async Task SaveSingleFileAlbumArtAsync(Mediafile mp3file, StorageFile file = null) { if (mp3file != null) { try { if (file == null) file = await StorageFile.GetFileFromPathAsync(mp3file.Path); var albumartFolder = ApplicationData.Current.LocalFolder; var albumartLocation = albumartFolder.Path + @"\AlbumArts\" + (mp3file.Album + mp3file.LeadArtist).ToLower().ToSha1() + ".jpg"; StorageItemThumbnail thumbnail = await file.GetThumbnailAsync(ThumbnailMode.MusicView).AsTask().ConfigureAwait(false); if (!VerifyFileExists(albumartLocation, 300) && thumbnail != null && thumbnail.Type == ThumbnailType.Image) { await LibVM.SaveImages(thumbnail, mp3file).ConfigureAwait(false); mp3file.AttachedPicture = albumartLocation; } } catch { await NotificationManager.ShowAsync("Failed to save album art of " + mp3file.OrginalFilename); } } }