composer update ledccn/bittorrentclient

This commit is contained in:
david 2021-09-13 21:28:14 +08:00
parent 6dd0ef6325
commit 18e68f99b3
3 changed files with 11 additions and 11 deletions

View File

@ -36,8 +36,8 @@
"ext-json": "*",
"ext-mbstring": "*",
"ext-curl": "*",
"ledccn/bittorrentclient": "dev-master",
"ext-dom": "*"
"ext-dom": "*",
"ledccn/bittorrentclient": "dev-master"
},
"suggest": {
"ext-event": "For better performance. "

View File

@ -129,12 +129,12 @@
"source": {
"type": "git",
"url": "https://github.com/ledccn/BittorrentClient.git",
"reference": "7162332e4219c0a6a6d0c5940e50be27b3bde456"
"reference": "61e0d5b6769dfe0aebdcfd3dc0f7367100d1a429"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/ledccn/BittorrentClient/zipball/7162332e4219c0a6a6d0c5940e50be27b3bde456",
"reference": "7162332e4219c0a6a6d0c5940e50be27b3bde456",
"url": "https://api.github.com/repos/ledccn/BittorrentClient/zipball/61e0d5b6769dfe0aebdcfd3dc0f7367100d1a429",
"reference": "61e0d5b6769dfe0aebdcfd3dc0f7367100d1a429",
"shasum": "",
"mirrors": [
{
@ -150,7 +150,7 @@
"ext-mbstring": "*",
"php": "^5.6 | ^7.0"
},
"time": "2021-03-21T00:11:04+00:00",
"time": "2021-09-13T11:29:15+00:00",
"type": "library",
"installation-source": "source",
"autoload": {

View File

@ -401,7 +401,7 @@ class qBittorrent extends AbstractClient
$extra_options['urls'] = $torrent_url;
#$extra_options['skip_checking'] = 'true'; //跳校验
// 关键 上传文件流 multipart/form-data【严格按照api文档编写】
$post_data = $this->buildUrls($extra_options);
$post_data = $this->buildData($extra_options);
#p($post_data);
// 设置请求头
$this->curl->setHeader('Content-Type', 'multipart/form-data; boundary='.$this->delimiter);
@ -424,7 +424,7 @@ class qBittorrent extends AbstractClient
$extra_options['torrents'] = $torrent_metainfo;
#$extra_options['skip_checking'] = 'true'; //跳校验
// 关键 上传文件流 multipart/form-data【严格按照api文档编写】
$post_data = $this->buildData($extra_options);
$post_data = $this->buildTorrent($extra_options);
// 设置请求头
$this->curl->setHeader('Content-Type', 'multipart/form-data; boundary='.$this->delimiter);
$this->curl->setHeader('Content-Length', strlen($post_data));
@ -487,7 +487,7 @@ class qBittorrent extends AbstractClient
public function recheck($hash)
{
// 关键 上传文件流 multipart/form-data【严格按照api文档编写】
$post_data = $this->buildUrls(['hashes' => $hash]);
$post_data = $this->buildData(['hashes' => $hash]);
// 设置请求头
$this->curl->setHeader('Content-Type', 'multipart/form-data; boundary='.$this->delimiter);
$this->curl->setHeader('Content-Length', strlen($post_data));
@ -583,7 +583,7 @@ class qBittorrent extends AbstractClient
* @param array $param
* @return string
*/
public function buildUrls($param)
public function buildData($param)
{
$this->delimiter = uniqid();
$eol = "\r\n";
@ -604,7 +604,7 @@ class qBittorrent extends AbstractClient
* @param array $param
* @return string
*/
public function buildData($param)
public function buildTorrent($param)
{
$this->delimiter = uniqid();
$eol = "\r\n";