Answered by:
[UWP] Mobile StorageFile GetThumbnails not working correctly

Question
-
I get a list of storagefiles in my app which are the contents of the users music library. I then obtain the thumbnail like:
var thumbnail = await file.GetThumbnailAsync(thumbnailMode, requestedSize, thumbnailOptions); BitmapImage ff = new BitmapImage(); await ff.SetSourceAsync(thumbnail);
I am finding on mobile that it returns the first image correctly but the rest of the thumbnails represent the groove music logo.
Is this a known issue?
- Edited by Fred Bao Monday, October 5, 2015 8:23 AM add the tag
Saturday, October 3, 2015 9:46 AM
Answers
-
Found the issue and it seems to be this:
queryOptions.IndexerOption = IndexerOption.UseIndexerWhenAvailable;
If I change the setting to not use Indexer album art shows correctly on phone. Is this a OS bug?
Monday, October 5, 2015 10:23 PM
All replies
-
Hello RagBuster,
>>I am finding on mobile that it returns the first image correctly but the rest of the thumbnails represent the groove music logo.
Firstly, I would suggest you check these songs files to see if they contain the album art.
If they have, try to retrieve the thumbnails separately via code instead of storing all song files into a collection. This would help narrow down this issue.
If above opinion is not helpful, please share a repro project and detail steps to reproduce the scenario you encountered, we would help make a test, because from my side, I downloaded the File and folder thumbnail sample and copied code for generating thumbnails from it to a new created windows 10 UWP project, it could work as expected. You could also check its code.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Monday, October 5, 2015 8:55 AM -
I should have mentioned everything works fine on desktop version as this is a UWP app.
Songs do contain album art but I have been experiencing very strange issues on phone. My first diagnosis was that the first song had album art but none of the others did which seems incorrect now. Since my original discovery I tried adding another album in to my phone music library and it shows all songs as the groove logo. I came back to phone later and 2 of the songs now showed album art which is strange as no code was changed.
Is the music library on the phone taking a long time to process added content and not processing correctly I wonder in the current build?
Monday, October 5, 2015 10:51 AM -
Created a very quick solution to demonstrate the issue:
Download : http://1drv.ms/1FSUlnx
Monday, October 5, 2015 6:50 PM -
Found the issue and it seems to be this:
queryOptions.IndexerOption = IndexerOption.UseIndexerWhenAvailable;
If I change the setting to not use Indexer album art shows correctly on phone. Is this a OS bug?
Monday, October 5, 2015 10:23 PM -
Hello RagBuster,
>> If I change the setting to not use Indexer album art shows correctly on phone. Is this a OS bug?
What I guess this is by designed, since the windows runtime is running in a separate sanbox environment, it has itself file access rule.
Anyway, it is glad to see if you find a workaround.
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Tuesday, October 13, 2015 9:35 AM