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

Commit

Permalink
修复 QQ 音乐音频获取失败问题
Browse files Browse the repository at this point in the history
  • Loading branch information
maicong committed Jun 11, 2018
1 parent 8dabb83 commit d143c86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions core/music.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*
* @author MaiCong <[email protected]>
* @link https://github.com/maicong/music
* @since 1.6.0
* @since 1.6.1
*
*/

Expand Down Expand Up @@ -832,10 +832,12 @@ function mc_get_song_by_id($songid, $site = 'netease', $multi = false)
if ($radio_lrc_urls) {
$radio_lrc = jsonp2json(mc_curl($radio_lrc_urls));
}
$radio_music = 'http://' . str_replace('ws', 'dl', $radio_url[$value['id']]);
if (!empty($radio_vkey['key'])) {
$radio_music = generate_qqmusic_url($radio_song_id, $radio_vkey['key']);
} else {
$radio_music = 'http://' . str_replace('ws', 'dl', $radio_url[$value['id']]);
$radio_music = generate_qqmusic_url(
$radio_song_id,
$radio_vkey['key']
) ?: $radio_music;
}
$radio_album_id = $value['album']['mid'];
$radio_songs[] = [
Expand Down
4 changes: 2 additions & 2 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
*
* @author MaiCong <[email protected]>
* @link https://github.com/maicong/music
* @since 1.6.0
* @since 1.6.1
*
*/

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

// 定义版本
define('MC_VERSION', '1.6.0');
define('MC_VERSION', '1.6.1');

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

0 comments on commit d143c86

Please sign in to comment.