在Windows Phone 8.1中获取相册信息 [英] Get Album info in Windows Phone 8.1

查看:72
本文介绍了在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?            
}

我该如何获取专辑信息(名称,艺术家,专辑封面)

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆