Skip to content
This repository was archived by the owner on Jun 25, 2019. It is now read-only.

Commit d143c86

Browse files
committed
修复 QQ 音乐音频获取失败问题
1 parent 8dabb83 commit d143c86

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

core/music.php

+6-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* @author MaiCong <i@maicong.me>
77
* @link https://github.com/maicong/music
8-
* @since 1.6.0
8+
* @since 1.6.1
99
*
1010
*/
1111

@@ -832,10 +832,12 @@ function mc_get_song_by_id($songid, $site = 'netease', $multi = false)
832832
if ($radio_lrc_urls) {
833833
$radio_lrc = jsonp2json(mc_curl($radio_lrc_urls));
834834
}
835+
$radio_music = 'http://' . str_replace('ws', 'dl', $radio_url[$value['id']]);
835836
if (!empty($radio_vkey['key'])) {
836-
$radio_music = generate_qqmusic_url($radio_song_id, $radio_vkey['key']);
837-
} else {
838-
$radio_music = 'http://' . str_replace('ws', 'dl', $radio_url[$value['id']]);
837+
$radio_music = generate_qqmusic_url(
838+
$radio_song_id,
839+
$radio_vkey['key']
840+
) ?: $radio_music;
839841
}
840842
$radio_album_id = $value['album']['mid'];
841843
$radio_songs[] = [

index.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
*
66
* @author MaiCong <i@maicong.me>
77
* @link https://github.com/maicong/music
8-
* @since 1.6.0
8+
* @since 1.6.1
99
*
1010
*/
1111

1212
// 定义核心
1313
define('MC_CORE', true);
1414

1515
// 定义版本
16-
define('MC_VERSION', '1.6.0');
16+
define('MC_VERSION', '1.6.1');
1717

1818
// 核心文件目录
1919
define('MC_CORE_DIR', __DIR__ . '/core');

0 commit comments

Comments
 (0)