且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ISRC在Apple Music/iTunes中的查找歌曲

更新时间:2023-12-05 15:31:52

在WWDC 2018上刚刚强调了这一点.您可以直接向

This was just highlighted at WWDC 2018. You can perform an request directly to the Apple Music API to

GET https://api.music.apple.com/v1/catalog/{storefront}/songs?filter[isrc]=ISRCSTRING

如果您正在使用新的 MusicKit JS 库,则可以使用以下代码执行查找JavaScript:

If you are using the new MusicKit JS library, you can perform the lookup with the following JavaScript:

MusicKit.getInstance().api.songs({ filter: { isrc: 'ISRCSTRING' } }).then(function(songs) {
    console.log(songs); // Array of songs matching ISRCSTRING
})