Improvements to the recent uploaded/snatches boxes

This commit is contained in:
itismadness
2025-09-09 21:25:23 +00:00
committed by Spine
parent c706232634
commit 03e3fbcf6b
2 changed files with 10 additions and 6 deletions

View File

@@ -895,6 +895,7 @@ class TGroup extends BaseAttrObject implements Bookmarked, CategoryHasArtist, Co
self::$db->commit();
$this->flush()->refresh();
$torrent->uploader()->flushRecentUpload();
$torrent->flush();
return $affected;

View File

@@ -4,12 +4,15 @@
<td colspan="5"><a href="torrents.php?type={{ type }}&amp;userid={{ id }}">Recent {{ title }}</a></td>
</tr>
<tr>
{% for r in recent %}
<td>
<a href="torrents.php?id={{ r.id }}">
<img src="{{ r.image|image_cache(width = 150) }}" loading="eager" class="tooltip" title="{{ r.text }}" alt="{{ r.text }}"
data-origin-src="{{ r.image }}" width="107" />
</a>
{% for i in 0..4 %}
{% set r = recent[i] %}
<td style="width: 20%;">
{% if r is not null %}
<a href="torrents.php?id={{ r.id }}">
<img src="{{ r.image|image_cache(width = 150) }}" loading="eager" class="tooltip" title="{{ r.text }}" alt="{{ r.text }}"
data-origin-src="{{ r.image }}" width="107" />
</a>
{% endif %}
</td>
{% endfor %}
</tr>