Browse Source

implement torrent statuses management #28

main
ghost 1 year ago
parent
commit
989f2f3311
  1. 2
      .env
  2. 37
      migrations/Version20231026163131.php
  3. 12
      public/asset/default/css/framework.css
  4. 111
      src/Controller/ActivityController.php
  5. 196
      src/Controller/TorrentController.php
  6. 3
      src/Entity/Activity.php
  7. 15
      src/Entity/Torrent.php
  8. 65
      src/Repository/TorrentRepository.php
  9. 86
      src/Service/ActivityService.php
  10. 46
      src/Service/TorrentService.php
  11. 6
      templates/default/activity/event/torrent/add.html.twig
  12. 6
      templates/default/activity/event/torrent/add.rss.twig
  13. 6
      templates/default/activity/event/torrent/approve/add.html.twig
  14. 6
      templates/default/activity/event/torrent/approve/add.rss.twig
  15. 6
      templates/default/activity/event/torrent/approve/delete.html.twig
  16. 6
      templates/default/activity/event/torrent/approve/delete.rss.twig
  17. 6
      templates/default/activity/event/torrent/download/file/add.html.twig
  18. 6
      templates/default/activity/event/torrent/download/file/add.rss.twig
  19. 6
      templates/default/activity/event/torrent/download/magnet/add.html.twig
  20. 6
      templates/default/activity/event/torrent/download/magnet/add.rss.twig
  21. 6
      templates/default/activity/event/torrent/locales/add.html.twig
  22. 6
      templates/default/activity/event/torrent/locales/add.rss.twig
  23. 6
      templates/default/activity/event/torrent/locales/approve/add.html.twig
  24. 6
      templates/default/activity/event/torrent/locales/approve/add.rss.twig
  25. 6
      templates/default/activity/event/torrent/locales/approve/delete.html.twig
  26. 6
      templates/default/activity/event/torrent/locales/approve/delete.rss.twig
  27. 6
      templates/default/activity/event/torrent/locales/delete.html.twig
  28. 6
      templates/default/activity/event/torrent/locales/delete.rss.twig
  29. 8
      templates/default/activity/event/torrent/sensitive/add.html.twig
  30. 8
      templates/default/activity/event/torrent/sensitive/add.rss.twig
  31. 8
      templates/default/activity/event/torrent/sensitive/approve/add.html.twig
  32. 8
      templates/default/activity/event/torrent/sensitive/approve/add.rss.twig
  33. 8
      templates/default/activity/event/torrent/sensitive/approve/delete.html.twig
  34. 8
      templates/default/activity/event/torrent/sensitive/approve/delete.rss.twig
  35. 8
      templates/default/activity/event/torrent/sensitive/delete.html.twig
  36. 8
      templates/default/activity/event/torrent/sensitive/delete.rss.twig
  37. 6
      templates/default/activity/event/torrent/star/add.html.twig
  38. 6
      templates/default/activity/event/torrent/star/add.rss.twig
  39. 6
      templates/default/activity/event/torrent/star/delete.html.twig
  40. 6
      templates/default/activity/event/torrent/star/delete.rss.twig
  41. 30
      templates/default/activity/event/torrent/status/add.html.twig
  42. 26
      templates/default/activity/event/torrent/status/add.rss.twig
  43. 30
      templates/default/activity/event/torrent/status/delete.html.twig
  44. 26
      templates/default/activity/event/torrent/status/delete.rss.twig
  45. 6
      templates/default/activity/event/torrent/wanted/add.html.twig
  46. 6
      templates/default/activity/event/torrent/wanted/add.rss.twig
  47. 28
      templates/default/torrent/info.html.twig
  48. 10
      templates/default/torrent/list.html.twig
  49. 42
      templates/default/user/settings.html.twig
  50. 22
      translations/messages+intl-icu.cs.xlf
  51. 22
      translations/messages+intl-icu.de.xlf
  52. 22
      translations/messages+intl-icu.en.xlf
  53. 22
      translations/messages+intl-icu.eo.xlf
  54. 22
      translations/messages+intl-icu.es.xlf
  55. 22
      translations/messages+intl-icu.fr.xlf
  56. 22
      translations/messages+intl-icu.he.xlf
  57. 22
      translations/messages+intl-icu.it.xlf
  58. 22
      translations/messages+intl-icu.ka.xlf
  59. 22
      translations/messages+intl-icu.lv.xlf
  60. 22
      translations/messages+intl-icu.nl.xlf
  61. 22
      translations/messages+intl-icu.pl.xlf
  62. 22
      translations/messages+intl-icu.pt.xlf
  63. 22
      translations/messages+intl-icu.ru.xlf
  64. 22
      translations/messages+intl-icu.uk.xlf

2
.env

@ -48,7 +48,7 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
# YGGtracker # YGGtracker
# Application version, used for API and media cache # Application version, used for API and media cache
APP_VERSION='2.2.0' APP_VERSION='2.2.1'
# Application name # Application name
APP_NAME=YGGtracker APP_NAME=YGGtracker

37
migrations/Version20231026163131.php

@ -0,0 +1,37 @@
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20231026163131 extends AbstractMigration
{
public function getDescription(): string
{
return '';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE torrent ADD COLUMN status BOOLEAN DEFAULT 1');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TEMPORARY TABLE __temp__torrent AS SELECT id, user_id, added, scraped, locales, sensitive, approved, md5file, keywords, seeders, peers, leechers FROM torrent');
$this->addSql('DROP TABLE torrent');
$this->addSql('CREATE TABLE torrent (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, user_id INTEGER NOT NULL, added INTEGER NOT NULL, scraped INTEGER DEFAULT NULL, locales CLOB NOT NULL --(DC2Type:simple_array)
, sensitive BOOLEAN NOT NULL, approved BOOLEAN NOT NULL, md5file VARCHAR(32) NOT NULL, keywords CLOB DEFAULT NULL --(DC2Type:simple_array)
, seeders INTEGER DEFAULT NULL, peers INTEGER DEFAULT NULL, leechers INTEGER DEFAULT NULL)');
$this->addSql('INSERT INTO torrent (id, user_id, added, scraped, locales, sensitive, approved, md5file, keywords, seeders, peers, leechers) SELECT id, user_id, added, scraped, locales, sensitive, approved, md5file, keywords, seeders, peers, leechers FROM __temp__torrent');
$this->addSql('DROP TABLE __temp__torrent');
}
}

12
public/asset/default/css/framework.css

@ -208,6 +208,14 @@ a.button-green:hover {
border-top: 1px #5d627d solid; border-top: 1px #5d627d solid;
} }
.border-bottom-dashed {
border-bottom: 1px #5d627d dashed;
}
.border-top-dashed {
border-top: 1px #5d627d dashed;
}
.border-width-2-px { .border-width-2-px {
border-width: 2px; border-width: 2px;
} }
@ -367,6 +375,10 @@ a:visited.background-color-hover-night-light:hover {
padding-bottom: 24px; padding-bottom: 24px;
} }
.margin-t-4-px {
margin-top: 4px;
}
.margin-l-4-px { .margin-l-4-px {
margin-left: 4px; margin-left: 4px;
} }

111
src/Controller/ActivityController.php

@ -560,6 +560,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName() )->getName()
@ -606,6 +607,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName() )->getName()
@ -652,6 +654,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName() )->getName()
@ -699,6 +702,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName() )->getName()
@ -745,6 +749,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName() )->getName()
@ -783,6 +788,102 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId()
)->getName()
],
'session' =>
[
'user' =>
[
'id' => $user->getId(),
'sensitive' => $user->isSensitive(),
'moderator' => $user->isModerator(),
'owner' => $user->getId() === $torrent->getUserId(),
]
]
]
);
break;
// Torrent Status
case $activity::EVENT_TORRENT_STATUS_ADD:
// Init torrent
if (!$torrent = $torrentService->getTorrent($activity->getTorrentId()))
{
throw $this->createNotFoundException();
}
return $this->render(
'default/activity/event/torrent/status/add' . $extension,
[
'id' => $activity->getId(),
'added' => $activity->getAdded(),
'user' =>
[
'id' => $activity->getUserId(),
'identicon' => $userService->identicon(
$userService->getUser(
$activity->getUserId()
)->getAddress()
)
],
'torrent' =>
[
'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId()
)->getName()
],
'session' =>
[
'user' =>
[
'id' => $user->getId(),
'sensitive' => $user->isSensitive(),
'moderator' => $user->isModerator(),
'owner' => $user->getId() === $torrent->getUserId(),
]
]
]
);
break;
case $activity::EVENT_TORRENT_STATUS_DELETE:
// Init torrent
if (!$torrent = $torrentService->getTorrent($activity->getTorrentId()))
{
throw $this->createNotFoundException();
}
return $this->render(
'default/activity/event/torrent/status/delete' . $extension,
[
'id' => $activity->getId(),
'added' => $activity->getAdded(),
'user' =>
[
'id' => $activity->getUserId(),
'identicon' => $userService->identicon(
$userService->getUser(
$activity->getUserId()
)->getAddress()
)
],
'torrent' =>
[
'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName() )->getName()
@ -830,6 +931,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName(), )->getName(),
@ -882,6 +984,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName(), )->getName(),
@ -934,6 +1037,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName(), )->getName(),
@ -986,6 +1090,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName(), )->getName(),
@ -1039,6 +1144,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName(), )->getName(),
@ -1091,6 +1197,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName(), )->getName(),
@ -1143,6 +1250,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName(), )->getName(),
@ -1195,6 +1303,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName(), )->getName(),
@ -1248,6 +1357,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName() )->getName()
@ -1294,6 +1404,7 @@ class ActivityController extends AbstractController
'id' => $torrent->getId(), 'id' => $torrent->getId(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'name' => $torrentService->readTorrentFileByTorrentId( 'name' => $torrentService->readTorrentFileByTorrentId(
$torrent->getId() $torrent->getId()
)->getName() )->getName()

196
src/Controller/TorrentController.php

@ -62,8 +62,9 @@ class TorrentController extends AbstractController
throw $this->createNotFoundException(); throw $this->createNotFoundException();
} }
// Approved filter // Access filter
if (!$user->isModerator() && $user->getId() != $torrent->getUserId() && !$torrent->isApproved()) if (!$user->isModerator() && $user->getId() != $torrent->getUserId() &&
(!$torrent->isStatus() || !$torrent->isApproved()))
{ {
throw $this->createNotFoundException(); throw $this->createNotFoundException();
} }
@ -112,7 +113,8 @@ class TorrentController extends AbstractController
[ [
'user' => $user, 'user' => $user,
'id' => $user->getId(), 'id' => $user->getId(),
'moderator' => $user->isModerator() 'moderator' => $user->isModerator(),
'owner' => $user->getId() === $torrent->getUserId(),
], ],
'torrent' => 'torrent' =>
[ [
@ -129,6 +131,7 @@ class TorrentController extends AbstractController
'locales' => $torrent->getLocales(), 'locales' => $torrent->getLocales(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'status' => $torrent->isStatus(),
'download' => 'download' =>
[ [
'file' => 'file' =>
@ -226,24 +229,30 @@ class TorrentController extends AbstractController
$activityService $activityService
); );
//
// Init request // Init request
$query = $request->get('query') ? explode(' ', urldecode($request->get('query'))) : []; $query = $request->get('query') ? explode(' ', urldecode($request->get('query'))) : [];
$page = $request->get('page') ? (int) $request->get('page') : 1; $page = $request->get('page') ? (int) $request->get('page') : 1;
// Get total torrents // Get total torrents
$total = $torrentService->findTorrentsTotal( $total = $torrentService->findTorrentsTotal(
$user->getId(),
$query, $query,
$user->getLocales(), $user->getLocales(),
!$user->isModerator() && $user->isSensitive() ? false : null, // hide on sensitive mode enabled or show all !$user->isModerator() && $user->isSensitive() ? false : null,
!$user->isModerator() ? true : null, // show approved content only for regular users !$user->isModerator() ? true : null,
!$user->isModerator() ? true : null,
); );
$torrents = []; $torrents = [];
foreach ($torrentService->findTorrents( foreach ($torrentService->findTorrents(
$user->getId(),
$query, $query,
$user->getLocales(), $user->getLocales(),
!$user->isModerator() && $user->isSensitive() ? false : null, // hide on sensitive mode enabled or show all !$user->isModerator() && $user->isSensitive() ? false : null,
!$user->isModerator() ? true : null, // show approved content only for regular users !$user->isModerator() ? true : null,
!$user->isModerator() ? true : null,
$this->getParameter('app.pagination'), $this->getParameter('app.pagination'),
($page - 1) * $this->getParameter('app.pagination') ($page - 1) * $this->getParameter('app.pagination')
) as $torrent) ) as $torrent)
@ -254,18 +263,6 @@ class TorrentController extends AbstractController
throw $this->createNotFoundException(); // @TODO exception throw $this->createNotFoundException(); // @TODO exception
} }
// Generate keywords
/* @TODO deprecated, based on active search result
$keywords = [];
foreach ($torrent->getKeywords() as $keyword)
{
if (in_array($keyword, $query))
{
$keywords[] = $keyword;
}
}
*/
// Generate keywords by extension // Generate keywords by extension
$keywords = []; $keywords = [];
@ -296,6 +293,7 @@ class TorrentController extends AbstractController
'added' => $torrent->getAdded(), 'added' => $torrent->getAdded(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'status' => $torrent->isStatus(),
'file' => 'file' =>
[ [
'name' => $file->getName(), 'name' => $file->getName(),
@ -401,19 +399,23 @@ class TorrentController extends AbstractController
// Get total torrents // Get total torrents
$total = $torrentService->findTorrentsTotal( $total = $torrentService->findTorrentsTotal(
$user->getId(),
[], [],
$user->getLocales(), $user->getLocales(),
!$user->isModerator() && $user->isSensitive() ? false : null, // hide on sensitive mode enabled or show all !$user->isModerator() && $user->isSensitive() ? false : null,
!$user->isModerator() ? true : null, // show approved content only for regular users !$user->isModerator() ? true : null,
!$user->isModerator() ? true : null,
); );
// Create torrents list // Create torrents list
$torrents = []; $torrents = [];
foreach ($torrentService->findTorrents( foreach ($torrentService->findTorrents(
$user->getId(),
[], [],
$user->getLocales(), $user->getLocales(),
!$user->isModerator() && $user->isSensitive() ? false : null, // hide on sensitive mode enabled or show all !$user->isModerator() && $user->isSensitive() ? false : null,
!$user->isModerator() ? true : null, // show approved content only for regular users !$user->isModerator() ? true : null,
!$user->isModerator() ? true : null,
$this->getParameter('app.pagination'), $this->getParameter('app.pagination'),
($page - 1) * $this->getParameter('app.pagination') ($page - 1) * $this->getParameter('app.pagination')
) as $torrent) ) as $torrent)
@ -454,6 +456,7 @@ class TorrentController extends AbstractController
'added' => $torrent->getAdded(), 'added' => $torrent->getAdded(),
'approved' => $torrent->isApproved(), 'approved' => $torrent->isApproved(),
'sensitive' => $torrent->isSensitive(), 'sensitive' => $torrent->isSensitive(),
'status' => $torrent->isStatus(),
'file' => 'file' =>
[ [
'name' => $file->getName(), 'name' => $file->getName(),
@ -558,19 +561,23 @@ class TorrentController extends AbstractController
// Get total torrents // Get total torrents
$total = $torrentService->findTorrentsTotal( $total = $torrentService->findTorrentsTotal(
$user->getId(),
$query, $query,
$user->getLocales(), $user->getLocales(),
!$user->isModerator() && $user->isSensitive() ? false : null, // hide on sensitive mode enabled or show all !$user->isModerator() && $user->isSensitive() ? false : null,
!$user->isModerator() ? true : null // show approved content only for regular users !$user->isModerator() ? true : null,
!$user->isModerator() ? true : null,
); );
// Create torrents list // Create torrents list
$torrents = []; $torrents = [];
foreach ($torrentService->findTorrents( foreach ($torrentService->findTorrents(
$user->getId(),
$query, $query,
$user->getLocales(), $user->getLocales(),
!$user->isModerator() && $user->isSensitive() ? false : null, // hide on sensitive mode enabled or show all !$user->isModerator() && $user->isSensitive() ? false : null,
!$user->isModerator() ? true : null, // show approved content only for regular users !$user->isModerator() ? true : null,
!$user->isModerator() ? true : null,
$this->getParameter('app.pagination'), $this->getParameter('app.pagination'),
($page - 1) * $this->getParameter('app.pagination') ($page - 1) * $this->getParameter('app.pagination')
) as $torrent) ) as $torrent)
@ -624,6 +631,13 @@ class TorrentController extends AbstractController
ActivityService $activityService ActivityService $activityService
): Response ): Response
{ {
// Init user
$user = $this->initUser(
$request,
$userService,
$activityService
);
// Init request // Init request
$query = $request->get('query') ? explode(' ', urldecode($request->get('query'))) : []; $query = $request->get('query') ? explode(' ', urldecode($request->get('query'))) : [];
$page = $request->get('page') ? (int) $request->get('page') : 1; $page = $request->get('page') ? (int) $request->get('page') : 1;
@ -638,19 +652,23 @@ class TorrentController extends AbstractController
// Get total torrents // Get total torrents
$total = $torrentService->findTorrentsTotal( $total = $torrentService->findTorrentsTotal(
$user->getId(),
$query, $query,
$locales, $locales,
$sensitive, !$user->isModerator() ? $sensitive : null,
true, // approved only !$user->isModerator() ? true : null,
!$user->isModerator() ? true : null,
); );
// Create torrents list // Create torrents list
$torrents = []; $torrents = [];
foreach ($torrentService->findTorrents( foreach ($torrentService->findTorrents(
$user->getId(),
$query, $query,
$locales, $locales,
$sensitive, !$user->isModerator() ? $sensitive : null,
true, // approved only !$user->isModerator() ? true : null,
!$user->isModerator() ? true : null,
$this->getParameter('app.pagination'), $this->getParameter('app.pagination'),
($page - 1) * $this->getParameter('app.pagination') ($page - 1) * $this->getParameter('app.pagination')
) as $torrent) ) as $torrent)
@ -867,7 +885,8 @@ class TorrentController extends AbstractController
time(), time(),
(array) $locales, (array) $locales,
(bool) $request->get('sensitive'), (bool) $request->get('sensitive'),
$user->isApproved() $user->isApproved(),
$user->isStatus()
); );
// Add activity event // Add activity event
@ -898,7 +917,7 @@ class TorrentController extends AbstractController
); );
} }
// Torrent moderation
#[Route( #[Route(
'/{_locale}/torrent/{torrentId}/approve/toggle', '/{_locale}/torrent/{torrentId}/approve/toggle',
name: 'torrent_approve_toggle', name: 'torrent_approve_toggle',
@ -975,6 +994,82 @@ class TorrentController extends AbstractController
); );
} }
#[Route(
'/{_locale}/torrent/{torrentId}/status/toggle',
name: 'torrent_status_toggle',
requirements:
[
'_locale' => '%app.locales%',
'torrentId' => '\d+',
],
methods:
[
'GET'
]
)]
public function status(
Request $request,
UserService $userService,
TorrentService $torrentService,
ActivityService $activityService
): Response
{
// Init user
$user = $this->initUser(
$request,
$userService,
$activityService
);
// Init torrent
if (!$torrent = $torrentService->getTorrent($request->get('torrentId')))
{
throw $this->createNotFoundException();
}
// Check permissions
if (!($user->isModerator() || $user->getId() == $torrent->getUserId()))
{
// @TODO
throw new \Exception(
$translator->trans('Access denied')
);
}
// Register activity event
if (!$torrent->isStatus())
{
$activityService->addEventTorrentStatusAdd(
$user->getId(),
$torrent->getId(),
time()
);
}
else
{
$activityService->addEventTorrentStatusDelete(
$user->getId(),
$torrent->getId(),
time()
);
}
// Update status
$torrentService->toggleTorrentStatus(
$torrent->getId()
);
// Redirect back to form
return $this->redirectToRoute(
'torrent_info',
[
'_locale' => $request->get('_locale'),
'torrentId' => $torrent->getId()
]
);
}
// Torrent locales // Torrent locales
#[Route( #[Route(
'/{_locale}/torrent/{torrentId}/edit/locales/{torrentLocalesId}', '/{_locale}/torrent/{torrentId}/edit/locales/{torrentLocalesId}',
@ -1807,14 +1902,9 @@ class TorrentController extends AbstractController
throw $this->createNotFoundException(); throw $this->createNotFoundException();
} }
// Sensitive filter // Access filter
if (!$user->isModerator() && $user->isSensitive()) if (!$user->isModerator() && $user->getId() != $torrent->getUserId() &&
{ (!$torrent->isStatus() || !$torrent->isApproved()))
throw $this->createNotFoundException();
}
// Approved filter
if (!$user->isModerator() && $user->getId() != $torrent->getUserId() && !$torrent->isApproved())
{ {
throw $this->createNotFoundException(); throw $this->createNotFoundException();
} }
@ -1934,14 +2024,9 @@ class TorrentController extends AbstractController
throw $this->createNotFoundException(); throw $this->createNotFoundException();
} }
// Sensitive filter // Access filter
if (!$user->isModerator() && $user->isSensitive()) if (!$user->isModerator() && $user->getId() != $torrent->getUserId() &&
{ (!$torrent->isStatus() || !$torrent->isApproved()))
throw $this->createNotFoundException();
}
// Approved filter
if (!$user->isModerator() && $user->getId() != $torrent->getUserId() && !$torrent->isApproved())
{ {
throw $this->createNotFoundException(); throw $this->createNotFoundException();
} }
@ -2058,14 +2143,9 @@ class TorrentController extends AbstractController
throw $this->createNotFoundException(); throw $this->createNotFoundException();
} }
// Sensitive filter // Access filter
if (!$user->isModerator() && $user->isSensitive()) if (!$user->isModerator() && $user->getId() != $torrent->getUserId() &&
{ (!$torrent->isStatus() || !$torrent->isApproved()))
throw $this->createNotFoundException();
}
// Approved filter
if (!$user->isModerator() && $user->getId() != $torrent->getUserId() && !$torrent->isApproved())
{ {
throw $this->createNotFoundException(); throw $this->createNotFoundException();
} }
@ -2389,10 +2469,12 @@ class TorrentController extends AbstractController
'locale' => $locale, 'locale' => $locale,
'locales' => $locales, 'locales' => $locales,
'torrents' => $torrentService->findTorrents( 'torrents' => $torrentService->findTorrents(
0, // no user session init, pass 0
[], // without keywords filter [], // without keywords filter
$locales, // all system locales $locales, // all system locales
null, // all sensitive levels null, // all sensitive levels
true, // approved only true, // approved only
true, // enabled only
1000, // @TODO limit 1000, // @TODO limit
0 // offset 0 // offset
) )

3
src/Entity/Activity.php

@ -59,6 +59,9 @@ class Activity
public const EVENT_TORRENT_WANTED_ADD = 2700; public const EVENT_TORRENT_WANTED_ADD = 2700;
public const EVENT_TORRENT_STATUS_ADD = 1800;
public const EVENT_TORRENT_STATUS_DELETE = 1801;
// ... // ...
#[ORM\Column] #[ORM\Column]

15
src/Entity/Torrent.php

@ -33,6 +33,9 @@ class Torrent
#[ORM\Column] #[ORM\Column]
private ?bool $approved = null; private ?bool $approved = null;
#[ORM\Column]
private ?bool $status = null;
#[ORM\Column(length: 32)] #[ORM\Column(length: 32)]
private ?string $md5file = null; private ?string $md5file = null;
@ -156,6 +159,18 @@ class Torrent
return $this; return $this;
} }
public function isStatus(): ?bool
{
return $this->status;
}
public function setStatus(bool $status): static
{
$this->status = $status;
return $this;
}
public function getSeeders(): ?int public function getSeeders(): ?int
{ {
return $this->seeders; return $this->seeders;

65
src/Repository/TorrentRepository.php

@ -22,38 +22,46 @@ class TorrentRepository extends ServiceEntityRepository
} }
public function findTorrentsTotal( public function findTorrentsTotal(
int $userId,
array $keywords, array $keywords,
array $locales, array $locales,
?bool $sensitive = null, ?bool $sensitive = null,
?bool $approved = null, ?bool $approved = null,
?bool $status = null,
int $limit = 10, int $limit = 10,
int $offset = 0 int $offset = 0
): int ): int
{ {
return $this->getTorrentsQueryByFilter( return $this->getTorrentsQueryByFilter(
$userId,
$keywords, $keywords,
$locales, $locales,
$sensitive, $sensitive,
$approved, $approved,
$status,
)->select('count(t.id)') )->select('count(t.id)')
->getQuery() ->getQuery()
->getSingleScalarResult(); ->getSingleScalarResult();
} }
public function findTorrents( public function findTorrents(
int $userId,
array $keywords, array $keywords,
array $locales, array $locales,
?bool $sensitive = null, ?bool $sensitive = null,
?bool $approved = null, ?bool $approved = null,
?bool $status = null,
int $limit = 10, int $limit = 10,
int $offset = 0 int $offset = 0
): array ): array
{ {
return $this->getTorrentsQueryByFilter( return $this->getTorrentsQueryByFilter(
$userId,
$keywords, $keywords,
$locales, $locales,
$sensitive, $sensitive,
$approved, $approved,
$status,
)->setMaxResults($limit) )->setMaxResults($limit)
->setFirstResult($offset) ->setFirstResult($offset)
->orderBy('t.id', 'DESC') // same as t.added ->orderBy('t.id', 'DESC') // same as t.added
@ -62,54 +70,85 @@ class TorrentRepository extends ServiceEntityRepository
} }
private function getTorrentsQueryByFilter( private function getTorrentsQueryByFilter(
int $userId,
array $keywords, array $keywords,
array $locales, array $locales,
?bool $sensitive = null, ?bool $sensitive = null,
?bool $approved = null, ?bool $approved = null,
?bool $status = null,
): \Doctrine\ORM\QueryBuilder ): \Doctrine\ORM\QueryBuilder
{ {
$query = $this->createQueryBuilder('t'); $query = $this->createQueryBuilder('t');
if ($keywords) // @TODO ANY or DTS if ($keywords)
{ {
$andX = $query->expr()->andX(); $andKeywords = $query->expr()->andX();
foreach ($keywords as $i => $keyword) foreach ($keywords as $i => $keyword)
{ {
$keyword = mb_strtolower($keyword); // all keywords stored in lowercase $keyword = mb_strtolower($keyword); // all keywords stored in lowercase
$andX->add("t.keywords LIKE :keyword{$i}"); $andKeywords->add("t.keywords LIKE :keyword{$i}");
$query->setParameter(":keyword{$i}", "%{$keyword}%"); $query->setParameter(":keyword{$i}", "%{$keyword}%");
} }
$query->andWhere($andX); $query->andWhere($andKeywords);
} }
if ($locales) // @TODO ANY or DTS if ($locales)
{ {
//$orX = $query->expr()->orX(); $orLocales = $query->expr()->orX();
$orX = $query->expr()->orX();
foreach ($locales as $i => $locale) foreach ($locales as $i => $locale)
{ {
$orX->add("t.locales LIKE :locale{$i}"); $orLocales->add("t.locales LIKE :locale{$i}");
$orLocales->add("t.userId = :userId");
$query->setParameter(":locale{$i}", "%{$locale}%"); $query->setParameter(":locale{$i}", "%{$locale}%");
$query->setParameter('userId', $userId);
} }
$query->andWhere($orX); $query->andWhere($orLocales);
} }
if (is_bool($sensitive)) if (is_bool($sensitive))
{ {
$query->andWhere('t.sensitive = :sensitive') $orSensitive = $query->expr()->orX();
->setParameter('sensitive', $sensitive);
$orSensitive->add("t.sensitive = :sensitive");
$orSensitive->add("t.userId = :userId");
$query->setParameter('sensitive', $sensitive);
$query->setParameter('userId', $userId);
$query->andWhere($orSensitive);
} }
if (is_bool($approved)) if (is_bool($approved))
{ {
$query->andWhere('t.approved = :approved') $orApproved = $query->expr()->orX();
->setParameter('approved', $approved);
$orApproved->add("t.approved = :approved");
$orApproved->add("t.userId = :userId");
$query->setParameter('approved', $approved);
$query->setParameter('userId', $userId);
$query->andWhere($orApproved);
}
if (is_bool($status))
{
$orStatus = $query->expr()->orX();
$orStatus->add("t.status = :status");
$orStatus->add("t.userId = :userId");
$query->setParameter('status', $status);
$query->setParameter('userId', $userId);
$query->andWhere($orStatus);
} }
return $query; return $query;

86
src/Service/ActivityService.php

@ -62,6 +62,9 @@ class ActivityService
Activity::EVENT_TORRENT_DOWNLOAD_FILE_ADD, Activity::EVENT_TORRENT_DOWNLOAD_FILE_ADD,
Activity::EVENT_TORRENT_DOWNLOAD_MAGNET_ADD, Activity::EVENT_TORRENT_DOWNLOAD_MAGNET_ADD,
Activity::EVENT_TORRENT_STATUS_ADD,
Activity::EVENT_TORRENT_STATUS_DELETE,
Activity::EVENT_TORRENT_WANTED_ADD, Activity::EVENT_TORRENT_WANTED_ADD,
]; ];
} }
@ -379,6 +382,30 @@ class ActivityService
] = $code; ] = $code;
break; break;
case Activity::EVENT_TORRENT_STATUS_ADD:
$events
[
$this->translatorInterface->trans('Torrents')
]
[
$this->translatorInterface->trans('Enabled')
] = $code;
break;
case Activity::EVENT_TORRENT_STATUS_DELETE:
$events
[
$this->translatorInterface->trans('Torrents')
]
[
$this->translatorInterface->trans('Disabled')
] = $code;
break;
} }
} }
@ -861,6 +888,65 @@ class ActivityService
return $activity; return $activity;
} }
public function addEventTorrentStatusAdd(
int $userId,
int $torrentId,
int $added
): ?Activity
{
$activity = new Activity();
$activity->setEvent(
Activity::EVENT_TORRENT_STATUS_ADD
);
$activity->setUserId(
$userId
);
$activity->setTorrentId(
$torrentId
);
$activity->setAdded(
$added
);
$this->entityManagerInterface->persist($activity);
$this->entityManagerInterface->flush();
return $activity;
}
public function addEventTorrentStatusDelete(
int $userId,
int $torrentId,
int $added
): ?Activity
{
$activity = new Activity();
$activity->setEvent(
Activity::EVENT_TORRENT_STATUS_DELETE
);
$activity->setUserId(
$userId
);
$activity->setTorrentId(
$torrentId
);
$activity->setAdded(
$added
);
$this->entityManagerInterface->persist($activity);
$this->entityManagerInterface->flush();
return $activity;
}
public function addEventTorrentWantedAdd( public function addEventTorrentWantedAdd(
int $userId, int $userId,

46
src/Service/TorrentService.php

@ -192,7 +192,8 @@ class TorrentService
int $added, int $added,
array $locales, array $locales,
bool $sensitive, bool $sensitive,
bool $approved bool $approved,
bool $status
): ?Torrent ): ?Torrent
{ {
$torrent = $this->addTorrent( $torrent = $this->addTorrent(
@ -204,7 +205,8 @@ class TorrentService
), ),
$locales, $locales,
$sensitive, $sensitive,
$approved $approved,
$status
); );
$filesystem = new Filesystem(); $filesystem = new Filesystem();
@ -249,7 +251,8 @@ class TorrentService
array $keywords, array $keywords,
array $locales, array $locales,
bool $sensitive, bool $sensitive,
bool $approved bool $approved,
bool $status
): ?Torrent ): ?Torrent
{ {
$torrent = new Torrent(); $torrent = new Torrent();
@ -261,6 +264,7 @@ class TorrentService
$torrent->setLocales($locales); $torrent->setLocales($locales);
$torrent->setSensitive($sensitive); $torrent->setSensitive($sensitive);
$torrent->setApproved($approved); $torrent->setApproved($approved);
$torrent->setStatus($status);
$this->entityManagerInterface->persist($torrent); $this->entityManagerInterface->persist($torrent);
$this->entityManagerInterface->flush(); $this->entityManagerInterface->flush();
@ -292,6 +296,30 @@ class TorrentService
return $torrent; return $torrent;
} }
public function toggleTorrentStatus(
int $torrentId
): ?Torrent
{
$torrent = $this->getTorrent($torrentId);
$torrent->setStatus(
!$torrent->isStatus() // toggle current value
);
$this->entityManagerInterface->persist($torrent);
$this->entityManagerInterface->flush();
$this->updateTorrentLocales(
$torrent->getId()
);
$this->updateTorrentSensitive(
$torrent->getId()
);
return $torrent;
}
public function getTorrentScrapeQueue(): ?Torrent public function getTorrentScrapeQueue(): ?Torrent
{ {
return $this->entityManagerInterface return $this->entityManagerInterface
@ -305,10 +333,12 @@ class TorrentService
} }
public function findTorrents( public function findTorrents(
int $userId,
array $keywords, array $keywords,
array $locales, array $locales,
?bool $sensitive, ?bool $sensitive,
?bool $approved, ?bool $approved,
?bool $status,
int $limit, int $limit,
int $offset int $offset
) : array ) : array
@ -316,29 +346,35 @@ class TorrentService
return $this->entityManagerInterface return $this->entityManagerInterface
->getRepository(Torrent::class) ->getRepository(Torrent::class)
->findTorrents( ->findTorrents(
$userId,
$keywords, $keywords,
$locales, $locales,
$sensitive, $sensitive,
$approved, $approved,
$status,
$limit, $limit,
$offset $offset
); );
} }
public function findTorrentsTotal( public function findTorrentsTotal(
int $userId,
array $keywords, array $keywords,
array $locales, array $locales,
?bool $sensitive, ?bool $sensitive,
?bool $approved ?bool $approved,
?bool $status
) : int ) : int
{ {
return $this->entityManagerInterface return $this->entityManagerInterface
->getRepository(Torrent::class) ->getRepository(Torrent::class)
->findTorrentsTotal( ->findTorrentsTotal(
$userId,
$keywords, $keywords,
$locales, $locales,
$sensitive, $sensitive,
$approved $approved,
$status
); );
} }

6
templates/default/activity/event/torrent/add.html.twig

@ -9,9 +9,11 @@
{{ torrent.name }} {{ torrent.name }}
</a> </a>
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/add.rss.twig

@ -6,9 +6,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

6
templates/default/activity/event/torrent/approve/add.html.twig

@ -11,7 +11,11 @@
{{ torrent.name }} {{ torrent.name }}
</a> </a>
{% else %} {% else %}
{% if torrent.sensitive == true %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/approve/add.rss.twig

@ -6,7 +6,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.sensitive == true %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

6
templates/default/activity/event/torrent/approve/delete.html.twig

@ -11,9 +11,11 @@
{{ torrent.name }} {{ torrent.name }}
</a> </a>
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/approve/delete.rss.twig

@ -6,7 +6,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.sensitive == true %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

6
templates/default/activity/event/torrent/download/file/add.html.twig

@ -14,9 +14,11 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/download/file/add.rss.twig

@ -6,9 +6,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

6
templates/default/activity/event/torrent/download/magnet/add.html.twig

@ -14,9 +14,11 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/download/magnet/add.rss.twig

@ -6,9 +6,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

6
templates/default/activity/event/torrent/locales/add.html.twig

@ -20,9 +20,11 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/locales/add.rss.twig

@ -8,9 +8,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

6
templates/default/activity/event/torrent/locales/approve/add.html.twig

@ -20,9 +20,11 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/locales/approve/add.rss.twig

@ -8,9 +8,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

6
templates/default/activity/event/torrent/locales/approve/delete.html.twig

@ -22,9 +22,11 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/locales/approve/delete.rss.twig

@ -8,9 +8,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

6
templates/default/activity/event/torrent/locales/delete.html.twig

@ -20,9 +20,11 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/locales/delete.rss.twig

@ -8,9 +8,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

8
templates/default/activity/event/torrent/sensitive/add.html.twig

@ -20,10 +20,12 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }}
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
{{ torrent.name }} {{ torrent.name }}

8
templates/default/activity/event/torrent/sensitive/add.rss.twig

@ -8,10 +8,12 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }}
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}
{% endif %} {% endif %}

8
templates/default/activity/event/torrent/sensitive/approve/add.html.twig

@ -20,10 +20,12 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }}
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
{{ torrent.name }} {{ torrent.name }}

8
templates/default/activity/event/torrent/sensitive/approve/add.rss.twig

@ -8,10 +8,12 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }}
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}
{% endif %} {% endif %}

8
templates/default/activity/event/torrent/sensitive/approve/delete.html.twig

@ -20,10 +20,12 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }}
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
{{ torrent.name }} {{ torrent.name }}

8
templates/default/activity/event/torrent/sensitive/approve/delete.rss.twig

@ -8,10 +8,12 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }}
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}
{% endif %} {% endif %}

8
templates/default/activity/event/torrent/sensitive/delete.html.twig

@ -20,10 +20,12 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }}
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
{{ torrent.name }} {{ torrent.name }}

8
templates/default/activity/event/torrent/sensitive/delete.rss.twig

@ -8,10 +8,12 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }}
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}
{% endif %} {% endif %}

6
templates/default/activity/event/torrent/star/add.html.twig

@ -12,9 +12,11 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/star/add.rss.twig

@ -6,9 +6,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

6
templates/default/activity/event/torrent/star/delete.html.twig

@ -13,9 +13,11 @@
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% endif %} {% endif %}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/star/delete.rss.twig

@ -6,9 +6,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.approved == false %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }}) #{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true %} {% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

30
templates/default/activity/event/torrent/status/add.html.twig

@ -0,0 +1,30 @@
<div class="row">
<div class="column width-80">
<a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a>
<span class="margin-l-4-px">
{{ 'have enabled torrent' | trans }}
</span>
{% if session.user.moderator or session.user.owner %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
{{ torrent.name }}
</a>
{% else %}
{% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
{{ torrent.name }}
</a>
{% endif %}
{% endif %}
</div>
<div class="column width-20 text-right">
{{ added | format_ago }}
</div>
</div>

26
templates/default/activity/event/torrent/status/add.rss.twig

@ -0,0 +1,26 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have enabled torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
{{ torrent.name }}
</a>
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity</link>
</item>

30
templates/default/activity/event/torrent/status/delete.html.twig

@ -0,0 +1,30 @@
<div class="row">
<div class="column width-80">
<a href="{{ path('user_info', { userId : user.id }) }}">
<img class="border-radius-50 border-color-default vertical-align-middle" src="{{ user.identicon }}" alt="{{ 'identicon' | trans }}" />
</a>
<span class="margin-l-4-px">
{{ 'have disabled torrent' | trans }}
</span>
{% if session.user.moderator or session.user.owner %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
{{ torrent.name }}
</a>
{% else %}
{% if torrent.status == false %}
#{{ torrent.id }}
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
{{ torrent.name }}
</a>
{% endif %}
{% endif %}
</div>
<div class="column width-20 text-right">
{{ added | format_ago }}
</div>
</div>

26
templates/default/activity/event/torrent/status/delete.rss.twig

@ -0,0 +1,26 @@
<item>
<title>
{{ 'User' | trans }}
#{{ user.id }}
{{ 'have disabled torrent' | trans }}
{% if session.user.moderator or session.user.owner %}
{{ torrent.name }}
{% else %}
{% if torrent.status == false %}
#{{ torrent.id }}
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">
{{ torrent.name }}
</a>
{% endif %}
{% endif %}
</title>
<author>#{{ user.id }}</author>
<pubDate>{{ added | date('D, d M Y h:i:s O') }}</pubDate>
<guid>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity-{{ id }}</guid>
<link>{{ url('torrent_info', { torrentId : torrent.id }) }}#activity</link>
</item>

6
templates/default/activity/event/torrent/wanted/add.html.twig

@ -6,7 +6,11 @@
{{ torrent.name }} {{ torrent.name }}
</a> </a>
{% else %} {% else %}
{% if torrent.sensitive == true %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
<a href="{{ path('torrent_info', { torrentId : torrent.id }) }}"> <a href="{{ path('torrent_info', { torrentId : torrent.id }) }}">

6
templates/default/activity/event/torrent/wanted/add.rss.twig

@ -4,7 +4,11 @@
{% if session.user.moderator or session.user.owner %} {% if session.user.moderator or session.user.owner %}
{{ torrent.name }} {{ torrent.name }}
{% else %} {% else %}
{% if torrent.sensitive == true %} {% if torrent.status == false %}
#{{ torrent.id }} ({{ 'disabled' | trans }})
{% elseif torrent.approved == false %}
#{{ torrent.id }} ({{ 'waiting for approve' | trans }})
{% elseif torrent.sensitive == true and session.user.sensitive == true %}
#{{ torrent.id }} ({{ 'sensitive' | trans }}) #{{ torrent.id }} ({{ 'sensitive' | trans }})
{% else %} {% else %}
{{ torrent.name }} {{ torrent.name }}

28
templates/default/torrent/info.html.twig

@ -80,7 +80,7 @@
</div> </div>
<table class="width-100"> <table class="width-100">
<tbody> <tbody>
{% if session.moderator %} {% if session.moderator or session.owner %}
<tr> <tr>
<td colspan="2"> <td colspan="2">
<div class="padding-y-8-px border-bottom-default text-right"> <div class="padding-y-8-px border-bottom-default text-right">
@ -90,9 +90,32 @@
</tr> </tr>
<tr> <tr>
<td class="padding-t-16-px"> <td class="padding-t-16-px">
{{ 'Approved' | trans }} {{ 'Enabled' | trans }}
</td> </td>
<td class="padding-t-16-px"> <td class="padding-t-16-px">
{% if torrent.status %}
{{ 'Yes' | trans }}
<a class="float-right" href="{{ path('torrent_status_toggle', { torrentId : torrent.id }) }}" title="{{ 'Toggle' | trans }}">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M5 3a5 5 0 0 0 0 10h6a5 5 0 0 0 0-10H5zm6 9a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/>
</svg>
</a>
{% else %}
{{ 'No' | trans }}
<a class="float-right text-color-red" href="{{ path('torrent_status_toggle', { torrentId : torrent.id }) }}" title="{{ 'Toggle' | trans }}">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" viewBox="0 0 16 16">
<path d="M11 4a4 4 0 0 1 0 8H8a4.992 4.992 0 0 0 2-4 4.992 4.992 0 0 0-2-4h3zm-6 8a4 4 0 1 1 0-8 4 4 0 0 1 0 8zM0 8a5 5 0 0 0 5 5h6a5 5 0 0 0 0-10H5a5 5 0 0 0-5 5z"/>
</svg>
</a>
{% endif %}
</td>
</tr>
{% if session.moderator %}
<tr>
<td>
{{ 'Approved' | trans }}
</td>
<td>
{% if torrent.approved %} {% if torrent.approved %}
{{ 'Yes' | trans }} {{ 'Yes' | trans }}
<a class="float-right" href="{{ path('torrent_approve_toggle', { torrentId : torrent.id }) }}" title="{{ 'Toggle' | trans }}"> <a class="float-right" href="{{ path('torrent_approve_toggle', { torrentId : torrent.id }) }}" title="{{ 'Toggle' | trans }}">
@ -111,6 +134,7 @@
</td> </td>
</tr> </tr>
{% endif %} {% endif %}
{% endif %}
<tr> <tr>
<td colspan="2"> <td colspan="2">
<div class="padding-y-8-px border-bottom-default text-right"> <div class="padding-y-8-px border-bottom-default text-right">

10
templates/default/torrent/list.html.twig

@ -39,6 +39,14 @@
{{ 'wanted' | trans }} {{ 'wanted' | trans }}
</a> </a>
{% endif %} {% endif %}
{% if torrent.status == false %}
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Disabled' | trans }}">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16">
<path d="m10.79 12.912-1.614-1.615a3.5 3.5 0 0 1-4.474-4.474l-2.06-2.06C.938 6.278 0 8 0 8s3 5.5 8 5.5a7.029 7.029 0 0 0 2.79-.588zM5.21 3.088A7.028 7.028 0 0 1 8 2.5c5 0 8 5.5 8 5.5s-.939 1.721-2.641 3.238l-2.062-2.062a3.5 3.5 0 0 0-4.474-4.474L5.21 3.089z"/>
<path d="M5.525 7.646a2.5 2.5 0 0 0 2.829 2.829l-2.83-2.829zm4.95.708-2.829-2.83a2.5 2.5 0 0 1 2.829 2.829zm3.171 6-12-12 .708-.708 12 12-.708.708z"/>
</svg>
</sub>
{% endif %}
{% if torrent.approved == false %} {% if torrent.approved == false %}
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Waiting for approve' | trans }}"> <sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Waiting for approve' | trans }}">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16">
@ -47,7 +55,7 @@
</sub> </sub>
{% endif %} {% endif %}
{% if torrent.sensitive == true %} {% if torrent.sensitive == true %}
<sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Content visible for non sensitive users only' | trans }}"> <sub class="margin-l-8-px float-right opacity-06 hover-opacity-1" title="{{ 'Sensitive' | trans }}">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16"> <svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" viewBox="0 0 16 16">
<path d="m9.97 4.88.953 3.811C10.159 8.878 9.14 9 8 9c-1.14 0-2.158-.122-2.923-.309L6.03 4.88C6.635 4.957 7.3 5 8 5s1.365-.043 1.97-.12zm-.245-.978L8.97.88C8.718-.13 7.282-.13 7.03.88L6.275 3.9C6.8 3.965 7.382 4 8 4c.618 0 1.2-.036 1.725-.098zm4.396 8.613a.5.5 0 0 1 .037.96l-6 2a.5.5 0 0 1-.316 0l-6-2a.5.5 0 0 1 .037-.96l2.391-.598.565-2.257c.862.212 1.964.339 3.165.339s2.303-.127 3.165-.339l.565 2.257 2.391.598z"/> <path d="m9.97 4.88.953 3.811C10.159 8.878 9.14 9 8 9c-1.14 0-2.158-.122-2.923-.309L6.03 4.88C6.635 4.957 7.3 5 8 5s1.365-.043 1.97-.12zm-.245-.978L8.97.88C8.718-.13 7.282-.13 7.03.88L6.275 3.9C6.8 3.965 7.382 4 8 4c.618 0 1.2-.036 1.725-.098zm4.396 8.613a.5.5 0 0 1 .037.96l-6 2a.5.5 0 0 1-.316 0l-6-2a.5.5 0 0 1 .037-.96l2.391-.598.565-2.257c.862.212 1.964.339 3.165.339s2.303-.127 3.165-.339l.565 2.257 2.391.598z"/>
</svg> </svg>

42
templates/default/user/settings.html.twig

@ -65,34 +65,39 @@
</tr> </tr>
<tr> <tr>
<td class="padding-t-16-px"> <td class="padding-t-16-px">
<div class="margin-t-4-px">
{{ 'Locales' | trans }} {{ 'Locales' | trans }}
</div>
</td> </td>
<td class="padding-t-16-px"> <td class="padding-t-16-px padding-b-8-px">
{% for locale in locales %} {% for locale in locales %}
<div class="margin-t-8-px margin-b-4-px margin-r-8-px display-inline-block min-width-120-px"> <div class="margin-t-4-px margin-b-8-px margin-r-8-px display-inline-block min-width-120-px">
{% if locale in user.locales %} {% if locale in user.locales %}
<input name="locales[]" id="{{ locale }}" type="checkbox" value="{{ locale }}" checked="checked" /> <input name="locales[]" id="{{ locale }}" type="checkbox" value="{{ locale }}" checked="checked" />
{% else %} {% else %}
<input name="locales[]" id="{{ locale }}" type="checkbox" value="{{ locale }}" /> <input name="locales[]" id="{{ locale }}" type="checkbox" value="{{ locale }}" />
{% endif %} {% endif %}
<label for="{{ locale }}"> <label class="margin-x-4-px" for="{{ locale }}">
{{ locale|locale_name(locale)|u.title }} {{ locale | locale_name(locale) | u.title }}
</label> </label>
</div> </div>
{% endfor %} {% endfor %}
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="padding-t-8-px"> <td class="padding-y-12-px">
{{ 'Hide sensitive' | trans }} {{ 'Sensitive' | trans }}
</td> </td>
<td> <td class="padding-y-12-px border-top-default">
<div class="padding-t-8-px"> <div class="margin-r-8-px">
{% if user.sensitive %} {% if user.sensitive %}
<input name="sensitive" type="checkbox" value="true" checked="checked" /> <input name="sensitive" id="sensitive" type="checkbox" value="true" checked="checked" />
{% else %} {% else %}
<input name="sensitive" type="checkbox" value="true" /> <input name="sensitive" id="sensitive" type="checkbox" value="true" />
{% endif %} {% endif %}
<label class="margin-x-4-px" for="sensitive">
{{ 'Hide' | trans }}
</label>
</div> </div>
</td> </td>
</tr> </tr>
@ -104,20 +109,22 @@
<tr> <tr>
<td colspan="2"></td> <td colspan="2"></td>
</tr> </tr>
{% set i = 0 %}
{% for group, event in events %} {% for group, event in events %}
{% set i = i + 1 %}
<tr> <tr>
<td class="padding-t-8-px"> <td class="padding-y-12-px">
{{ group }} {{ group }}
</td> </td>
<td class="padding-t-8-px"> <td class="padding-t-8-px {% if i > 1 %}border-top-default{% endif %}">
{% for key, value in event %} {% for key, value in event %}
<span class="margin-r-8-px"> <span class="margin-t-4-px margin-b-8-px margin-r-8-px display-inline-block min-width-120-px">
{% if value in user.events %} {% if value in user.events %}
<input name="events[]" id="event-{{ value }}" type="checkbox" value="{{ value }}" checked="checked" /> <input name="events[]" id="event-{{ value }}" type="checkbox" value="{{ value }}" checked="checked" />
{% else %} {% else %}
<input name="events[]" id="event-{{ value }}" type="checkbox" value="{{ value }}" /> <input name="events[]" id="event-{{ value }}" type="checkbox" value="{{ value }}" />
{% endif %} {% endif %}
<label for="event-{{ value }}"> <label class="margin-x-4-px" for="event-{{ value }}">
{{ key }} {{ key }}
</label> </label>
</span> </span>
@ -136,10 +143,13 @@
</td> </td>
<td class="padding-y-16-px"> <td class="padding-y-16-px">
{% if user.yggdrasil %} {% if user.yggdrasil %}
<input name="yggdrasil" type="checkbox" value="true" checked="checked" /> <input name="yggdrasil" id="yggdrasil" type="checkbox" value="true" checked="checked" />
{% else %} {% else %}
<input name="yggdrasil" type="checkbox" value="true" /> <input name="yggdrasil" id="yggdrasil" type="checkbox" value="true" />
{% endif %} {% endif %}
<label class="margin-x-4-px" for="yggdrasil">
{{ 'Enabled' | trans }}
</label>
</td> </td>
</tr> </tr>
</tbody> </tbody>

22
translations/messages+intl-icu.cs.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.de.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.en.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.eo.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.es.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.fr.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.he.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.it.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.ka.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.lv.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.nl.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.pl.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.pt.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Waiting for approve</target> <target>Waiting for approve</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Content visible for non sensitive users only</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Size</target> <target>Size</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Seeders wanted for torrent</target> <target>Seeders wanted for torrent</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Hide sensitive</target> <target>Hide</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>have disabled torrent</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>have enabled torrent</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>disabled</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.ru.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>На рассмотрении</target> <target>На рассмотрении</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Содержимое видимо только для нечувствительных пользователей</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Размер</target> <target>Размер</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Требуется раздача для торрента</target> <target>Требуется раздача для торрента</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Скрывать чувствительное содержимое</target> <target>Скрыть</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>отключил торрент</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>включил торрент</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>отключено</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

22
translations/messages+intl-icu.uk.xlf

@ -169,10 +169,6 @@
<source>Waiting for approve</source> <source>Waiting for approve</source>
<target>Очікує на підтвердження</target> <target>Очікує на підтвердження</target>
</trans-unit> </trans-unit>
<trans-unit id="uP0WnsM" resname="Content visible for non sensitive users only">
<source>Content visible for non sensitive users only</source>
<target>Контент видимий лише для нечутливих користувачів</target>
</trans-unit>
<trans-unit id="GvhRkHM" resname="Size"> <trans-unit id="GvhRkHM" resname="Size">
<source>Size</source> <source>Size</source>
<target>Розмір</target> <target>Розмір</target>
@ -725,9 +721,21 @@
<source>Seeders wanted for torrent</source> <source>Seeders wanted for torrent</source>
<target>Розшукуються роздачі для торенту</target> <target>Розшукуються роздачі для торенту</target>
</trans-unit> </trans-unit>
<trans-unit id="147HHy2" resname="Hide sensitive"> <trans-unit id="rCCle.3" resname="Hide">
<source>Hide sensitive</source> <source>Hide</source>
<target>Приховувати чутливий вміст</target> <target>Приховати</target>
</trans-unit>
<trans-unit id="m11TRpU" resname="have disabled torrent">
<source>have disabled torrent</source>
<target>вимкнув торент</target>
</trans-unit>
<trans-unit id="qfr4ljO" resname="have enabled torrent">
<source>have enabled torrent</source>
<target>увімкнув торент</target>
</trans-unit>
<trans-unit id="F_s8AWj" resname="disabled">
<source>disabled</source>
<target>вимкнено</target>
</trans-unit> </trans-unit>
</body> </body>
</file> </file>

Loading…
Cancel
Save