|
|
|
@ -355,6 +355,24 @@ class TorrentService
@@ -355,6 +355,24 @@ class TorrentService
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function findLastTorrentLocalesByTorrentIdApproved( |
|
|
|
|
int $torrentId, |
|
|
|
|
bool $approved = true |
|
|
|
|
): ?TorrentLocales |
|
|
|
|
{ |
|
|
|
|
return $this->entityManagerInterface |
|
|
|
|
->getRepository(TorrentLocales::class) |
|
|
|
|
->findOneBy( |
|
|
|
|
[ |
|
|
|
|
'torrentId' => $torrentId, |
|
|
|
|
'approved' => $approved |
|
|
|
|
], |
|
|
|
|
[ |
|
|
|
|
'id' => 'DESC' |
|
|
|
|
] |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function findTorrentLocalesByTorrentId(int $torrentId): array |
|
|
|
|
{ |
|
|
|
|
return $this->entityManagerInterface |
|
|
|
@ -466,6 +484,24 @@ class TorrentService
@@ -466,6 +484,24 @@ class TorrentService
|
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function findLastTorrentSensitiveByTorrentIdApproved( |
|
|
|
|
int $torrentId, |
|
|
|
|
bool $approved = true |
|
|
|
|
): ?TorrentSensitive |
|
|
|
|
{ |
|
|
|
|
return $this->entityManagerInterface |
|
|
|
|
->getRepository(TorrentSensitive::class) |
|
|
|
|
->findOneBy( |
|
|
|
|
[ |
|
|
|
|
'torrentId' => $torrentId, |
|
|
|
|
'approved' => $approved, |
|
|
|
|
], |
|
|
|
|
[ |
|
|
|
|
'id' => 'DESC' |
|
|
|
|
] |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public function findTorrentSensitiveByTorrentId(int $torrentId): array |
|
|
|
|
{ |
|
|
|
|
return $this->entityManagerInterface |
|
|
|
|