使用对 SPPlaylistFolder 的folderId 引用

发布于 2025-01-06 17:07:17 字数 507 浏览 4 评论 0原文

我希望能够在特定的播放列表文件夹(也是由我的应用程序创建)中自动创建播放列表。

为了做到这一点,我想保存对创建的 SPPlaylistFolder 的引用,并能够稍后访问它(即添加播放列表 2 – n 时)。

查看CocoaLibSpotify文档,似乎使用folderId属性是一种方法。但文档还指出:

重要提示:仅当您计划直接使用 C 时才应使用此选项 LibSpotify API。 CocoaLibSpotify 的行为是未定义的,如果您 直接在具有 CocoaLibSpotify 对象的项目上使用 C API 与他们相关。

我不太确定如何解释这一点...只需查看 folderId 属性及其相关方法(例如 -playlistFolderForFolderId:inContainer:),似乎好像可以做我想做的事?或者我错过了什么?

I want to be able to automatically create playlists in an specific playlist folder (also created by my app).

In order to do this, I'd like to save a reference to a created SPPlaylistFolder and be able to access it later (i.e. when adding playlists 2 – n).

Looking at the CocoaLibSpotify docs, it seems like using the folderId property would be a way of doing it. But the docs also state:

Important: This should only be used if you plan to directly use the C
LibSpotify API. The behaviour of CocoaLibSpotify is undefined if you
use the C API directly on items that have CocoaLibSpotify objects
associated with them.

I'm not exactly sure how to interpret this... Just looking at the folderId property and the methods related to it (e.g. -playlistFolderForFolderId:inContainer:), it seems like it's possible to do what I want? Or am I missing something?

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

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

发布评论

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

评论(1

甜味拾荒者 2025-01-13 17:07:18

您可以毫无问题地使用 SPPlaylistFolderfolderId 属性。但是,当 Spotify 客户端重命名文件夹时,folderId 将会更改。

目前似乎没有一种有效的方法可以通过重命名和在会话之间移动来跟踪文件夹。我们正在积极解决这个问题,但与此同时,您必须对folderId 和名称进行最佳尝试。

You can use the folderId property of SPPlaylistFolder without problems. However, when the Spotify client renames a folder, the folderId will change.

At the moment there doesn't appear to be a valid way of tracking folders through renames and moves between sessions. We're actively working on this, but in the meantime you'll have to use a best-attempt against folderId and name.

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