downloadByTorrentId() public method

public downloadByTorrentId ( $id )
コード例 #1
0
ファイル: api-v1.php プロジェクト: swetorrentking/rartracker
     break;
 case validateRoute('DELETE', 'subtitles/\\d+'):
     $log = new Logs($db);
     $torrent = new Torrent($db, $user);
     $mailbox = new Mailbox($db, $user);
     $subtitles = new Subtitles($db, $user, $log, $torrent, $mailbox);
     httpResponse($subtitles->delete((int) $params[1], $_GET["reason"]));
     break;
 case validateRoute('GET', 'subtitles/\\d+/download'):
     $subtitles = new Subtitles($db, $user);
     $subtitles->download((int) $params[1]);
     die;
     break;
 case validateRoute('GET', 'torrents/\\d+/subtitle'):
     $subtitles = new Subtitles($db, $user);
     $subtitles->downloadByTorrentId((int) $params[1]);
     die;
     break;
 case validateRoute('GET', 'donations'):
     $donations = new Donations($db, $user);
     list($result, $totalCount) = $donations->query(array("limit" => $_GET["limit"], "index" => $_GET["index"]));
     httpResponse($result, $totalCount);
     break;
 case validateRoute('POST', 'donations'):
     $donate = new Donations($db, $user);
     httpResponse($donate->create($postdata));
     break;
 case validateRoute('PATCH', 'donations/\\d+'):
     $donate = new Donations($db, $user);
     httpResponse($donate->update((int) $params[1], $postdata));
     break;