问题标签 [pygn]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
217 浏览

gracenote - GraceNote rhythm API with Pygn

The following works and retrurns a list of semmingly random tracks which GraceNote thinks are similar to Bowe's work:

radioPlayList = pygn.createRadio(GRACENOTE_CLIENT_ID, GRACENOTE_USER_ID, artist='Bowie', count='3');

However, I would strongly prefer to pass a genre, rather than an atrist - I just can't figure our how.

This radioPlayList = pygn.createRadio(GRACENOTE_CLIENT_ID, GRACENOTE_USER_ID, genre='38', count='3'); returns <RESPONSES>\n <RESPONSE STATUS="NO_MATCH">\n </RESPONSE>\n</RESPONSES> which lead me to beleive that Genre should not just be a simple number.

And trying to give the genre as a text, radioPlayList = pygn.createRadio(GRACENOTE_CLIENT_ID, GRACENOTE_USER_ID, genre='Oldies', count='3'); gives <RESPONSES>\n <MESSAGE>GCSP: RADIOCREATE error: [8] radio: Invalid attribute seed.</MESSAGE>\n <RESPONSE STATUS="ERROR">\n </RESPONSE>\n</RESPONSES>\n so that is obviously not the way to do it.

QUESTION: how can I pass a Genre (only) and get a radio playlist in return?

The only Pygn docuemntation which I can find does not help. I am hoping that @cweichen will se thsi question & help me. Does anyone else know how?


[Update] Looking in the code of Pygn's test.py, I see

# Example how to create a radio playlist by genre classical music result = pygn.createRadio(clientID, userID, genre='36061', popularity ='1000', similarity = '1000') print(json.dumps(result, sort_keys=True, indent=4))

Question: where do I get a list of those genre values? The file readme.md says genre: a genre ID from the genres below, but here is no list below.

0 投票
2 回答
279 浏览

python - 从 mp3 中查找缺少的 id3 标签

我使用 pygn(pigeon) 一个 python 客户端来为 Gracenote 查找缺少的 id3 标签形成 mp3 文件。我拥有的代码将所有音乐文件元数据打印到屏幕上,但我只想打印曲目标题、艺术家和专辑?