diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 32ba212..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: php -php: - - '5.4' - - '5.5' - - '5.6' - - '7.0' - - '7.1' diff --git a/Meting.php b/Meting.php index 5c22ae1..0bc7af2 100644 --- a/Meting.php +++ b/Meting.php @@ -2,7 +2,7 @@ /*! * Meting music framework * https://i-meto.com - * Version 1.0.0 + * Version 1.0.1 * * Copyright 2016, METO Sheel * Released under the MIT license @@ -44,6 +44,7 @@ class Meting } curl_setopt($curl,CURLOPT_RETURNTRANSFER,1); curl_setopt($curl,CURLOPT_CONNECTTIMEOUT,10); + curl_setopt($curl,CURLOPT_TIMEOUT,10); curl_setopt($curl,CURLOPT_COOKIE,$BASE['cookie']); curl_setopt($curl,CURLOPT_REFERER,$BASE['referer']); curl_setopt($curl,CURLOPT_USERAGENT,$BASE['useragent']); @@ -809,6 +810,7 @@ class Meting 'pic_id' => $data['al']['pic_str']?:$data['al']['pic'], 'url_id' => $data['id'], 'lyric_id' => $data['id'], + 'source' => 'netease', ); if(isset($data['al']['picUrl'])){ preg_match('/\/(\d+)\./',$data['al']['picUrl'],$match); @@ -826,6 +828,7 @@ class Meting 'pic_id' => $data['albummid'], 'url_id' => $data['songmid'], 'lyric_id' => $data['songmid'], + 'source' => 'tencent', ); foreach($data['singer'] as $vo)$result['artist'][]=$vo['name']; return $result; @@ -838,6 +841,7 @@ class Meting 'pic_id' => $data['song_id'], 'url_id' => $data['song_id'], 'lyric_id' => $data['song_id'], + 'source' => 'xiami', ); return $result; } @@ -849,6 +853,7 @@ class Meting 'url_id' => $data['hash'], 'pic_id' => $data['hash'], 'lyric_id' => $data['hash'], + 'source' => 'kugou', ); list($result['artist'],$result['name'])=explode(' - ',$data['filename']?:$data['fileName']); $result['artist']=explode('、',$result['artist']); @@ -862,6 +867,7 @@ class Meting 'pic_id' => $data['song_id'], 'url_id' => $data['song_id'], 'lyric_id' => $data['song_id'], + 'source' => 'baidu', ); return $result; } diff --git a/README.md b/README.md index 0814a70..d8a9736 100644 --- a/README.md +++ b/README.md @@ -8,16 +8,16 @@ A powerful music API framework to accelerate development + **Easy** - Easy to use, suppose format return. - + **Light** - 30KB around with only one file. + + **Light** - 32KB around with only one file. + **Powerful** - Suppose various webserver, include netease, tencent, xiami, kugou, baidu and more. + **Free** - Under MIT license, you can use it anywhere if you want. ## Get Started ### Install via composer -It is RC version now. - -coming soon... +``` +$ composer require metowolf/meting +``` ### Install via require ```php @@ -45,7 +45,7 @@ $data = $API->format(true)->search('Soldier'); - [x] get lyric - [x] raw data / format data -## Demo#1 +## Demo ```bash $ git clone https://github.com/metowolf/NeteaseCloudMusicApi.git $ cd Meting @@ -53,12 +53,13 @@ $ php -S 127.0.0.1:8080 ``` then open http://127.0.0.1:8080/demo/simple-test in Browser +## Related Projects + - [Hermit-X (Wordpress)](https://github.com/liwanglin12/Hermit-X) + - [Meting for Typecho](https://github.com/metowolf/Meting-Typecho-Plugin) + ## License Meting is under the MIT license. ## Links -Official website: https://i-meto.com - +Official website: https://i-meto.com Demo: https://music.i-meto.com - -Documentation (unfinished): https://music.i-meto.com/docs diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index 4503b8d..0000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,3 +0,0 @@ - - -