[scrobbles] Add life events to status page

This commit is contained in:
2024-05-23 21:21:58 -04:00
parent 0cba46b103
commit 2c5516ae4e
2 changed files with 17 additions and 0 deletions

View File

@ -762,6 +762,9 @@ class ScrobbleStatusView(LoginRequiredMixin, TemplateView):
data["browsing"] = progress_plays.filter( data["browsing"] = progress_plays.filter(
web_page__isnull=False web_page__isnull=False
).first() ).first()
data["participating"] = progress_plays.filter(
life_event__isnull=False
).first()
long_plays = user_scrobble_qs.filter( long_plays = user_scrobble_qs.filter(
long_play_complete=False, played_to_completion=True long_play_complete=False, played_to_completion=True

View File

@ -132,5 +132,19 @@
</div> </div>
{% endif %} {% endif %}
</div> </div>
<h3>Participating</h3>
<div class="participating">
{% if participating %}
<div class="titles">
<p><a href="{{participating.media_obj.get_absolute_url}}">{{participating.media_obj}}</a></p>
{% if participating.media_obj.subtitle %}<p><em><a href="{{participating.media_obj.subtitle.get_absolute_url}}">{{participaing.media_obj.subtitle}}</a></em></p>{% endif %}
</div>
<p><small>{{participating.timestamp|naturaltime}} from {{participating.source}}</small></p>
{% else %}
<div class="titles">
<p>Nothing</p>
</div>
{% endif %}
</div>
</body> </body>
</html> </html>