在 Windows Phone 8.1 中获取相册信息 [英] Get Album info in Windows Phone 8.1
本文介绍了在 Windows Phone 8.1 中获取相册信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
从 Windows Phone 8.1 开始,可以访问 MusicLibrary 中的音乐文件.我可以毫无问题地读取所有文件.
As from Windows Phone 8.1, it's possible to get access to the music files in the MusicLibrary. I can read all files without problems.
但现在我想阅读专辑信息.
But now I want to read Album info.
IReadOnlyList<StorageFolder> albums =
await KnownFolders.MusicLibrary.GetFoldersAsync(CommonFolderQuery.GroupByAlbum);
foreach (StorageFolder folder in albums)
{
// how to get album info?
}
如何在该 foreach 中获取专辑信息(名称、艺术家、专辑封面)?
How can I get album info (name, artist, album art) in that foreach?
推荐答案
以下工作......有时:
The following works ... sometimes:
var props = await myStorageFileOrFolder.Properties.GetMusicPropertiesAsync();
对于文件夹,它似乎总是空的.
For folders it seems to always be empty.
这篇关于在 Windows Phone 8.1 中获取相册信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文