diff --git a/tests/scrobbles_tests/test_views.py b/tests/scrobbles_tests/test_views.py index 69299f9..c190f04 100644 --- a/tests/scrobbles_tests/test_views.py +++ b/tests/scrobbles_tests/test_views.py @@ -561,11 +561,13 @@ def test_scrobble_detail_view_with_notes_and_labels(client): username="testuser", email="test@example.com", password="testpass" ) task = Task.objects.create(title="Test Task", description="Test description") + from django.utils import timezone scrobble = Scrobble.objects.create( task=task, media_type="Task", user=user, visibility="public", + timestamp=timezone.now(), log={ "notes": [ {"2024-01-01 10:00:00": "Note with label"}, @@ -574,6 +576,7 @@ def test_scrobble_detail_view_with_notes_and_labels(client): "description": "Test description", }, ) + client.login(username="testuser", password="testpass") url = reverse("scrobbles:detail", kwargs={"pk": scrobble.id}) response = client.get(url) assert response.status_code == 200 diff --git a/vrobbler/apps/trends/templates/trends/_concurrent_media_listening.html b/vrobbler/apps/trends/templates/trends/_concurrent_media_listening.html new file mode 100644 index 0000000..c2f6ad0 --- /dev/null +++ b/vrobbler/apps/trends/templates/trends/_concurrent_media_listening.html @@ -0,0 +1,47 @@ +
{{ info.total_anchor_sessions }} session{{ info.total_anchor_sessions|pluralize }}
+ {% if info.artists %} +| Artist | +Plays | +
|---|---|
| {{ artist.artist_name }} | +{{ artist.count }} | +
No concurrent listening data.
+ {% endif %} +No concurrent listening data found.
+| Track | -Artist | -Plays | -
|---|---|---|
| {% if t.track_uuid %}{{ t.track_name }}{% else %}{{ t.track_name }}{% endif %} | -{{ t.artist_name }} | -{{ t.count }} | -
No concurrent reading data found.
- {% endif %} -