获取 iPod 播放器项目的 iTunes ID

发布于 2024-08-16 14:57:09 字数 354 浏览 3 评论 0原文

我有一个与 iPod 播放器和 iTunes Store Web 服务搜索 API 交互的应用程序。有没有办法获取我从用户的 iPod 库(例如通过 MPMusicPlayerController 或 MPMediaItem)检索的歌曲的 iTunes ID?

该文档表示 MPMediaItemPropertyPersistentID 是在应用程序启动过程中持续存在的唯一标识符。然而,这似乎可能是一个唯一的本地 ID。

我能想到的唯一解决方案是从 MPMediaItem 检索歌曲标题和艺术家,然后查询 iTunes 以获取 iTunes ID。 iTunes ID 是否存储在 iPod 库本地的任何位置?

谢谢 - 我对媒体框架还很陌生。

I have an app that interacts with both the iPod player, and the iTunes Store Web Service Search API. Is there a way to obtain the iTunes ID for a song that I retrieve from my user's iPod library (e.g. via MPMusicPlayerController, or MPMediaItem)?

The documentation says that the MPMediaItemPropertyPersistentID is a unique identifier that persists across app launch. This however, seems like it might be a unique local id.

The only solution I can think of is to retrieve the song title and artist from MPMediaItem, then query iTunes to obtain the iTunes ID. Is the iTunes ID stored anywhere locally within the iPod library?

Thanks - I am pretty new to the media framework.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

無心 2024-08-23 14:57:09

API 文档没有列出提供 iTunes 歌曲 ID 的 MPMediaItem 属性,但它确实提供了有关歌曲的所有信息,例如艺术家和歌曲名称,因此,正如您所建议的,您可以在商店中搜索该标准。

The API documentation does not list a property for MPMediaItem that gives the iTunes Song ID, but it does give all of the information about a song such as the Artist and song name so, as you suggested, you could search the store for that criteria.

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