add wanted label to magnet subject when leechers have no seeds

This commit is contained in:
ghost 2023-09-06 01:22:55 +03:00
parent 1364670b1f
commit 5f46332ceb
3 changed files with 31 additions and 2 deletions

View file

@ -220,6 +220,12 @@ echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL ?>
<div class="padding-16 <?php echo $magnet->sensitive ? 'blur-2 blur-hover-0' : false ?>">
<a href="<?php echo sprintf('%s/magnet.php?magnetId=%s', WEBSITE_URL, $magnet->magnetId) ?>">
<h2 class="margin-b-8"><?php echo $magnet->metaTitle ?></h2>
<?php if ($magnet->leechers && !$magnet->seeders) { ?>
<span class="label label-green margin-x-4 font-size-10 position-relative top--2 cursor-default"
title="<?php echo _('Active leechers waiting for seeds') ?>">
<?php echo _('wanted') ?>
</span>
<?php } ?>
</a>
<div class="float-right opacity-0 parent-hover-opacity-09">
<?php if (!$magnet->public) { ?>