diff --git a/vrobbler/apps/scrobbles/models.py b/vrobbler/apps/scrobbles/models.py
index 8a49a90..13bb19f 100644
--- a/vrobbler/apps/scrobbles/models.py
+++ b/vrobbler/apps/scrobbles/models.py
@@ -635,6 +635,14 @@ class Scrobble(TimeStampedModel):
for scrobble in scrobble_qs:
scrobbles_by_type[scrobble.media_type].append(scrobble)
+ if not scrobbles_by_type.get(scrobble.media_type + "_count"):
+ scrobbles_by_type[scrobble.media_type + "_count"] = 0
+ scrobbles_by_type[scrobble.media_type + "_count"] += 1
+ if not scrobbles_by_type.get(scrobble.media_type + "_time"):
+ scrobbles_by_type[scrobble.media_type + "_time"] = 0
+ scrobbles_by_type[scrobble.media_type + "_time"] += int(
+ (scrobble.elapsed_time)
+ )
return scrobbles_by_type
diff --git a/vrobbler/templates/scrobbles/_last_scrobbles.html b/vrobbler/templates/scrobbles/_last_scrobbles.html
index fe50ae8..3eaaca4 100644
--- a/vrobbler/templates/scrobbles/_last_scrobbles.html
+++ b/vrobbler/templates/scrobbles/_last_scrobbles.html
@@ -9,7 +9,7 @@
{% if Track %}
Music
- {% with scrobbles=Track %}
+ {% with scrobbles=Track count=Track_count time=Track_time %}
{% include "scrobbles/_scrobble_table.html" %}
{% endwith %}
{% endif %}
@@ -18,63 +18,63 @@
{% if Task %}
Latest tasks
- {% with scrobbles=Task %}
+ {% with scrobbles=Task count=Task_count time=Task_time %}
{% include "scrobbles/_scrobble_table.html" %}
{% endwith %}
{% endif %}
{% if Video %}
Videos
- {% with scrobbles=Video %}
+ {% with scrobbles=Video count=Video_count time=Video_time %}
{% include "scrobbles/_scrobble_table.html" %}
{% endwith %}
{% endif %}
{% if WebPage %}
Web pages
- {% with scrobbles=WebPage %}
+ {% with scrobbles=WebPage count=WebPage_count time=WebPage_time %}
{% include "scrobbles/_scrobble_table.html" %}
{% endwith %}
{% endif %}
{% if SportEvent %}
Sports
- {% with scrobbles=SportEvent %}
+ {% with scrobbles=SportEvent count=SportEvent_count time=SportEvent_time %}
{% include "scrobbles/_scrobble_table.html" %}
{% endwith %}
{% endif %}
{% if PodcastEpisode %}
Latest podcasts
- {% with scrobbles=PodcastEpisode %}
+ {% with scrobbles=PodcastEpisode count=PodcastEpisode_count time=PodcastEpisode_time %}
{% include "scrobbles/_scrobble_table.html" %}
{% endwith %}
{% endif %}
{% if VideoGame %}
Video games
- {% with scrobbles=VideoGame %}
+ {% with scrobbles=VideoGame count=VideoGame_count time=VideoGame_time %}
{% include "scrobbles/_scrobble_table.html" %}
{% endwith %}
{% endif %}
{% if BoardGame %}
Board games
- {% with scrobbles=BoardGame %}
+ {% with scrobbles=BoardGame count=BoardGame_count time=BoardGame_time %}
{% include "scrobbles/_scrobble_table.html" %}
{% endwith %}
{% endif %}
{% if Beer %}
Beers
- {% with scrobbles=Beer %}
+ {% with scrobbles=Beer count=Beer_count time=Beer_time %}
{% include "scrobbles/_scrobble_table.html" %}
{% endwith %}
{% endif %}
{% if Book %}
Books
- {% with scrobbles=Book %}
+ {% with scrobbles=Book count=Book_count time=Book_time %}
{% include "scrobbles/_scrobble_table.html" %}
{% endwith %}
{% endif %}
diff --git a/vrobbler/templates/scrobbles/_row.html b/vrobbler/templates/scrobbles/_row.html
index 54a1fda..8b2ee48 100644
--- a/vrobbler/templates/scrobbles/_row.html
+++ b/vrobbler/templates/scrobbles/_row.html
@@ -1,7 +1,7 @@
{% load humanize %}
{% load naturalduration %}
-
+
| {% if scrobble.in_progress %}{{scrobble.media_obj.strings.verb}} now | Finish{% else %}{{scrobble.timestamp|naturaltime}}{% endif %} |
- {{scrobble.media_obj|truncatechars_html:50}} |
+ {{scrobble.media_obj|truncatechars_html:45}} |
{{scrobble.elapsed_time|natural_duration}} |
diff --git a/vrobbler/templates/scrobbles/_scrobble_table.html b/vrobbler/templates/scrobbles/_scrobble_table.html
index 42f3f3b..f9f1d0c 100644
--- a/vrobbler/templates/scrobbles/_scrobble_table.html
+++ b/vrobbler/templates/scrobbles/_scrobble_table.html
@@ -4,6 +4,7 @@
+ {{count}} scrobble {% if time %}| {{time|natural_duration}}{% endif %}
diff --git a/vrobbler/templates/scrobbles/scrobble_list.html b/vrobbler/templates/scrobbles/scrobble_list.html
index db3b8e5..66f56ef 100644
--- a/vrobbler/templates/scrobbles/scrobble_list.html
+++ b/vrobbler/templates/scrobbles/scrobble_list.html
@@ -43,6 +43,10 @@
background:rgba(0,0,0,0.4);
}
+ .in-progress {
+ background: #CCFFFF;
+ }
+ .in-progress a { color: black }
{% endblock %}
{% block content %}