MiguMusicApi icon indicating copy to clipboard operation
MiguMusicApi copied to clipboard

救命,为什么有的歌曲信息是不包括歌曲持续时长的字段,有的歌才有这个字段

Open SUN7700 opened this issue 2 years ago • 5 comments

image image

SUN7700 avatar Apr 12 '22 07:04 SUN7700

救命救命!!自己看了几个小时完全0进展

SUN7700 avatar Apr 12 '22 10:04 SUN7700

src/util 那里,getBatchSong 这个 duration 是通过 length 字符串计算得到的,可以在那里看下返回值,这里一下子不确定

jsososo avatar Apr 13 '22 01:04 jsososo

下面是我的调试之路,getBatchSong我也看过了,但是好像里面请求的数据songs.item也是为空,然后最终返回的数据也是空。

image


image


image

SUN7700 avatar Apr 13 '22 03:04 SUN7700

data 目录下有这个文件,因为migu的歌曲链接都是固定的url,为了避免无意义的多次请求,这里直接把获取过的歌曲写入文件里了。你直接删掉就又会调用 migu 服务

Message ID: @.***>

jsososo avatar Apr 13 '22 04:04 jsososo

懂了,难怪返回304,解决了,添加下面那条就好了,虽然还不是特别清楚你的代码,但问题应该解决了 image

SUN7700 avatar Apr 13 '22 06:04 SUN7700