即使已加载用户,sp_user_display_name始终返回规范名称 [英] sp_user_display_name always returns canonical name, even when user is loaded

查看:107
本文介绍了即使已加载用户,sp_user_display_name始终返回规范名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好Spotify社区=)我一直对此持反对态度.当我通过sp_playlist_owner libspotify 询问播放列表的所有者时,我永远无法从sp_user_display_name中获取用户的显示名称.

Hello Spotify community =) I've been beating my head against this for a while. When I ask libspotify for the owner of a playlist via sp_playlist_owner, I am never able to get the user's display name out from sp_user_display_name.

在API中,它提到显示名称仅在加载用户之后才可用.具体来说,应该是当sp_user_is_loaded返回true时.但是,我发现情况并非如此.

In the API, it mentions that the display name is only available after the user has been loaded. Specifically, this should be when sp_user_is_loaded returns true. However, I have found this to not be the case.

我已经迷上了每个可用的播放列表回调,以试图捕获加载用户的时间,然后输出规范名称和显示名称.我这样做是针对一个播放列表,在该列表中我知道所有者的规范名称和显示名称是不同的.

I have hooked into every available playlist callback in an attempt to catch when the user is loaded, and then output both the canonical and display names. I am doing this for a playlist where I know the canonical and display names of the owner are different.

  • 在重新启动(调用sp_session_create之前删除设置目录)的情况下,最初获得了Spotify日志消息UserCache::initiateGetUsers() will query for 1 users.然后,随后的回调表明用户已被加载,但总是返回规范名称.

  • In the case of a fresh start (deleting the settings directory before invoking sp_session_create), I initially get the Spotify log message UserCache::initiateGetUsers() will query for 1 users. Subsequent callbacks then indicate that the user has been loaded, but the canonical name is always returned.

在重新启动的情况下(从磁盘加载播放列表数据),我没有收到上面提到的日志消息,并且最初指示用户已加载.但是同样,同样的问题.我只会得到规范的用户名.

In the case of a restart (where the playlist data is loaded from disk), I don't get the log message mentioned above, and the user is initially indicated as loaded. But again, the same problem. I am only ever given the canonical username.

这是API中的错误,还是我缺少一些东西?

Is this a bug in the API, or am I missing something?

推荐答案

我认为,完整的显示名称仅在libspotify中对当前登录的用户可用,并且仅在使用Facebook凭据登录时才可用.

I believe that the full display name is only available in libspotify for the currently logged-in user, and then only if they logged in with Facebook credentials.

这篇关于即使已加载用户,sp_user_display_name始终返回规范名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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