mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
update torrent library
This commit is contained in:
parent
57085f8167
commit
9af7117206
1 changed files with 10 additions and 4 deletions
|
|
@ -188,15 +188,21 @@ class PageController extends AbstractController
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($torrentService->getTorrentInfoNameByFilepath($file->getPathName())))
|
//// Validate torrent format
|
||||||
|
try
|
||||||
{
|
{
|
||||||
$form['torrent']['error'][] = $translator->trans('Could not parse torrent file');
|
\Rhilip\Bencode\TorrentFile::load(
|
||||||
|
$file->getPathName()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
continue;
|
catch (ParseException $e)
|
||||||
|
{
|
||||||
|
$form['torrents']['error'][] = $translator->trans('Could not parse torrent file');
|
||||||
}
|
}
|
||||||
|
|
||||||
//// Content
|
//// Content
|
||||||
$torrent = $torrentService->submit(
|
$torrent = $torrentService->add(
|
||||||
$file->getPathName(),
|
$file->getPathName(),
|
||||||
$user->getId(),
|
$user->getId(),
|
||||||
time(),
|
time(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue