唯一标识 Windows Phone 媒体库中的专辑和歌曲

发布于 2024-12-17 07:48:03 字数 260 浏览 1 评论 0原文

我正在从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

当梦初醒 2024-12-24 07:48:03

我会尝试使用 GetHashCode() 来获取 SongAlbum。至少 Song 直接覆盖此函数,因此希望它是根据歌曲的属性计算的。

I'd try GetHashCode() for Song and Album. At least Song overrides this function directly, so hopefully it is computed from the song's properties.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文