mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
implement additional torrent fields index, add indexer configuration #31
This commit is contained in:
parent
afcacebe26
commit
c7c5d7340c
4 changed files with 248 additions and 44 deletions
|
|
@ -880,7 +880,19 @@ class TorrentController extends AbstractController
|
|||
{
|
||||
// Save data
|
||||
$torrent = $torrentService->add(
|
||||
|
||||
$file->getPathName(),
|
||||
|
||||
(bool) $this->getParameter('app.index.torrent.name'),
|
||||
(bool) $this->getParameter('app.index.torrent.filenames'),
|
||||
(bool) $this->getParameter('app.index.torrent.hash.v1'),
|
||||
(bool) $this->getParameter('app.index.torrent.hash.v2'),
|
||||
(bool) $this->getParameter('app.index.torrent.source'),
|
||||
(bool) $this->getParameter('app.index.torrent.comment'),
|
||||
(bool) $this->getParameter('app.index.transliteration'),
|
||||
(int) $this->getParameter('app.index.word.length.min'),
|
||||
(int) $this->getParameter('app.index.word.length.max'),
|
||||
|
||||
$user->getId(),
|
||||
time(),
|
||||
(array) $locales,
|
||||
|
|
@ -2440,7 +2452,17 @@ class TorrentController extends AbstractController
|
|||
): Response
|
||||
{
|
||||
// Reindex keywords
|
||||
$torrentService->reindexTorrentKeywordsAll();
|
||||
$torrentService->reindexTorrentKeywordsAll(
|
||||
(bool) $this->getParameter('app.index.torrent.name'),
|
||||
(bool) $this->getParameter('app.index.torrent.filenames'),
|
||||
(bool) $this->getParameter('app.index.torrent.hash.v1'),
|
||||
(bool) $this->getParameter('app.index.torrent.hash.v2'),
|
||||
(bool) $this->getParameter('app.index.torrent.source'),
|
||||
(bool) $this->getParameter('app.index.torrent.comment'),
|
||||
(bool) $this->getParameter('app.index.transliteration'),
|
||||
(int) $this->getParameter('app.index.word.length.min'),
|
||||
(int) $this->getParameter('app.index.word.length.max')
|
||||
);
|
||||
|
||||
// Render response
|
||||
return new Response(); // @TODO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue