Exemple #1
0
     break;
 case validateRoute('DELETE', 'torrents/multi'):
     $log = new Logs($db);
     $mailbox = new Mailbox($db, $user);
     $requests = new Requests($db, $user, $log, $mailbox);
     $torrent = new Torrent($db, $user, $log, null, null, $requests, $mailbox);
     $torrent->multiDelete($_GET);
     httpResponse();
     break;
 case validateRoute('PATCH', 'torrents/\\d+'):
     $log = new Logs($db);
     $movieData = new MovieData($db);
     $sweTv = new SweTv($db);
     $subtitles = new Subtitles($db, $user);
     $torrent = new Torrent($db, $user, $log, $movieData, $sweTv, null, null, $subtitles);
     $torrent->update((int) $params[1], $postdata);
     httpResponse();
     break;
 case validateRoute('GET', 'torrents/\\d+/multi'):
     $torrent = new Torrent($db, $user);
     $subtitles = new Subtitles($db, $user);
     $requests = new Requests($db, $user);
     $movieData = new MovieData($db);
     $watching = new Watching($db, $user);
     $sweTv = new SweTv($db);
     $watchSubtitles = new WatchingSubtitles($db, $user);
     $myTorrent = $torrent->get($params[1], true);
     if ($myTorrent["imdbid"] > 0) {
         $relatedTorrents = $torrent->getRelated($myTorrent["imdbid"], $myTorrent["id"]);
         $watching = $watching->query($user->getId(), $myTorrent["imdbid"]);
         $moviedata = $movieData->getData($myTorrent["imdbid"]);