获取iPod播放器项目的iTunes ID [英] Obtaining iTunes ID to an iPod player item

查看:112
本文介绍了获取iPod播放器项目的iTunes ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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)?

文档说MPMediaItemPropertyPersistentID是一个唯一的标识符,可以在应用启动时保留。然而,这似乎可能是一个独特的本地ID。

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.

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

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.

推荐答案

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.

这篇关于获取iPod播放器项目的iTunes ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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