唯一标识 Windows Phone 媒体库中的专辑和歌曲
我正在从 Album
对象导入歌曲集合,该对象是通过在 Windows Phone Mango 上查询 MediaLibrary
获得的。
平台是否提供了唯一的标识符,我可以通过它来识别不同的歌曲和专辑?
如果我下次运行应用程序时重新查询 MediaLibrary
,我需要一些对于相同专辑保持不变的内容。
我在调试器中看到了“句柄”属性,但它没有出现在任何 Album 类文档中。
I am importing a songs collection from an Album
object that is obtained from querying MediaLibrary
on Windows Phone Mango.
Is there a unique identifier provided by the platform, by which I could be identifying different songs and albums?
I need something that will remain the same for the same albums if I re-query the MediaLibrary
next time my app is ran.
I have seen a "handle" property in the debugger, but it doesn't appear in any of the Album class documentation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会尝试使用
GetHashCode()
来获取Song
和Album
。至少Song
直接覆盖此函数,因此希望它是根据歌曲的属性计算的。I'd try
GetHashCode()
forSong
andAlbum
. At leastSong
overrides this function directly, so hopefully it is computed from the song's properties.