我正在为 Spotify 开发一个定制的广播应用程序,但我不明白它的链接方法。我希望 Spotify 开发人员可以在这里帮助我。例如:
我有一个美国帐户,所以当我尝试访问 Spotify URI 时:spotify:track: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:track: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 连接,但甚至不匹配。