diff --git a/class.json.php b/class.json.php index d10553d..678269d 100644 --- a/class.json.php +++ b/class.json.php @@ -38,18 +38,19 @@ public function song_url($site, $music_id) // exit; // } - if ($site === "netease") { - $url = str_replace('http://m9.', 'http://m7.', $url); - $url = str_replace('http://m7c.', 'http://m7.', $url); - $url = str_replace('http://m8c.', 'http://m7.', $url); - $url = str_replace('http://m8.', 'http://m7.', $url); - $url = str_replace('http://m7.', 'https://m7.', $url); - $url = str_replace('http://m10', 'https://m10', $url); + if ($site == 'netease') { + $url = str_replace('://m7c.', '://m7.', $url); + $url = str_replace('://m8c.', '://m8.', $url); + $url = str_replace('http://', 'https://', $url); + } + if ($site == 'tencent') { + $url = str_replace('http://', 'https://', $url); + $url = str_replace('ws.stream.qqmusic.qq.com', 'dl.stream.qqmusic.qq.com', $url); } - if ($site === "xiami" || $site === 'tencent') { + if ($site == 'xiami') { $url = str_replace('http://', 'https://', $url); } - if ($site === 'baidu') { + if ($site == 'baidu') { $url = str_replace('http://zhangmenshiting.qianqian.com', 'https://gss3.baidu.com/y0s1hSulBw92lNKgpU_Z2jR7b2w6buu', $url); } diff --git a/hermit.php b/hermit.php index 2050059..d3b67fe 100644 --- a/hermit.php +++ b/hermit.php @@ -3,13 +3,13 @@ Plugin Name: Hermit X Plugin URI: https://blog.lwl12.com/read/hermit-x.html Description: 音乐播放器 Hermit music player build for wordpress with APlayer -Version: 2.9.8 +Version: 2.9.9 Author: Hermit X Developer Team Author URI: https://blog.lwl12.com/read/hermit-x.html#developer */ define('HERMIT_FILE', __FILE__); -define('HERMIT_VERSION', '2.9.8'); +define('HERMIT_VERSION', '2.9.9'); define('HERMIT_URL', plugins_url('', __FILE__)); define('HERMIT_PATH', dirname(__FILE__)); define('HERMIT_ADMIN_URL', admin_url());