public function add(Torrent $torrent)
 {
     $id = $torrent->getId();
     Assert::assert($id, 'id')->notNull();
     if (!isset($this->torrents[$id])) {
         $this->torrents[$id] = $torrent;
     }
 }
Beispiel #2
0
 /**
  * @param Torrent $torrent
  * @param string  $saveToPath
  */
 public function saveTorrentFile(Torrent $torrent, string $saveToPath)
 {
     $this->call('GET', $torrent->getDownloadUrl(), ['save_to' => $saveToPath]);
 }