[scrobbles] Add screenshots to templates
All checks were successful
build / test (push) Successful in 2m6s

This commit is contained in:
2026-06-18 10:54:28 -04:00
parent 6fde9ec8d2
commit fcf86d5b3f
4 changed files with 23 additions and 1 deletions

View File

@ -798,6 +798,12 @@ class Scrobble(TimeStampedModel):
format="JPEG",
options={"quality": 75},
)
screenshot_large = ImageSpecField(
source="screenshot",
processors=[ResizeToFit(800, 800)],
format="JPEG",
options={"quality": 85},
)
long_play_seconds = models.BigIntegerField(**BNULL)
long_play_complete = models.BooleanField(**BNULL)
long_play_last_scrobble = models.ForeignKey(

View File

@ -185,6 +185,12 @@
</div>
{% endif %}
{% if object.screenshot %}
<div class="mb-3">
<img src="{{ object.screenshot_large.url }}" class="img-fluid rounded" style="max-height: 600px;" alt="Screenshot" />
</div>
{% endif %}
<p>
Tags:
{% if object.tags.all %}

View File

@ -117,6 +117,12 @@
</div>
{% endif %}
{% if object.screenshot %}
<div class="mb-3">
<img src="{{ object.screenshot_large.url }}" class="img-fluid rounded" style="max-height: 600px;" alt="Screenshot" />
</div>
{% endif %}
<p>
Tags:
{% if object.tags.all %}