我正在爲Spotify開發定製的廣播應用程序,但我無法理解它的鏈接方法。我希望Spotify開發者能夠幫助我。例如:Spotify如何通過其他軌道以外的軌道進行跟蹤?
我有一個美國帳戶,所以當我嘗試訪問Spotify的URI: Spotify的:軌道:5rDsAMjmB4Qa5WNciJPsfK
該URI是被禁止的,因爲你可以在XML看到:
<track>
<id>b2ee21fccf6845e5a0d72a39bf7752b8</id>
<title>Tubthumping</title>
<artist-id>1d4211ecf9d04ffea26202e010042951</artist-id>
<artist>Chumbawamba</artist>
<album>Playlist: 90s Pop</album>
<album-id>da4ae29b497741bab15a97881ed1b70d</album-id>
<album-artist>Various Artists</album-artist>
<album-artist-id>19334eaffa3f4f2282e251e36611e26f</album-artist-id>
<year>2008</year>
<track-number>19</track-number>
<length>202706</length>
<files>
<file id="87cca4e0822573c3ee8a8a6a04c809b2db9935b6" format="Ogg Vorbis,320000,1,32,4" />
<file id="ac8d8ed1142988bc18df15ac1357990faf3f5afd" format="Ogg Vorbis,160000,1,32,4" />
<file id="c91d6743f49e49f703ce87cfcd5698eb81800a86" format="Ogg Vorbis,96000,1,32,4" />
<file id="94558701f427aff8d68f8149ac3e98e18365cc5f" format="MPEG 1 layer 3,320000,1,32,4" />
</files>
<cover>86bdd0faee722e65034207dd28ed5513f914ef44</cover>
<cover-small>145aaacf5ffb81e38e9e0be24ac9d993a6f31366</cover-small>
<cover-large>1cd206fb15d81dd3f6cde8dd59d89f94e1094104</cover-large>
<popularity>0.63630</popularity>
<restrictions>
<restriction forbidden="AF,AS,BM,CA,GL,GU,KG,MK,MM,MP,PM,PR,PS,UM,US,VA,VI" catalogues="free,daypass,premium"/>
</restrictions>
<external-ids>
<external-id type="isrc" id="DEA349700542" />
</external-ids>
</track>
這是美國禁止的,沒有其他選擇是允許的。然而,Spotify的應用程序這個文件鏈接到: Spotify的:軌道:2JLRcAkPB8JZIIohZarVTr ,我可以玩,因爲軌道沒有禁止美國的帳戶,按照它的XML:
<track>
<id>59f872aa124941ba8facbd3e13cd4ab9</id>
<title>Tubthumping - Radio Edit</title>
<artist-id>1d4211ecf9d04ffea26202e010042951</artist-id>
<artist>Chumbawamba</artist>
<album>All-Star Sports Jams</album>
<album-id>eb030df86f954de1b92630611f497c19</album-id>
<album-artist>Various Artists</album-artist>
<album-artist-id>19334eaffa3f4f2282e251e36611e26f</album-artist-id>
<year>2008</year>
<track-number>8</track-number>
<length>212013</length>
<files>
<file id="099ec6f8bf800e4800d550a99fac75a4ceea2a0a" format="Ogg Vorbis,320000,1,32,4" />
<file id="25965023befa68849e724df3687634060e4679c6" format="Ogg Vorbis,160000,1,32,4" />
<file id="a61e885fe2d2e15e2fe56c0a5111ecac975792b7" format="Ogg Vorbis,96000,1,32,4" />
<file id="0914380378738d8ae4aeba6379ac45dbcd98bc51" format="MPEG 1 layer 3,320000,1,32,4" />
</files>
<cover>2344306830097471b90afe32584677c436c6dc33</cover>
<cover-small>7697a938417a0c585d15dfc5ddd672871e222e5b</cover-small>
<cover-large>517849070de1b127323c7b920a9b4bd321507135</cover-large>
<popularity>0.45674</popularity>
<restrictions>
<restriction allowed="CA,US" catalogues="free,daypass,premium"/>
</restrictions>
<external-ids>
<external-id type="isrc" id="USUR19700191" />
</external-ids>
</track>
如何是這兩個相互鏈接的曲目?他們是同一首歌,但所有的屬性都不同,甚至沒有標題匹配(注意第一個沒有列爲「Radio Edit」)。我一開始以爲他們可能會被ISRC連接起來,但即使這樣也沒有。
您使用哪個API來獲取該XML?我看不到我們提供的公開API,它提供了您所看到的內容。 – iKenndac 2012-08-02 09:30:22