diff --git a/vrobbler/apps/videogames/templatetags/naturalduration.py b/vrobbler/apps/videogames/templatetags/naturalduration.py index d34bbe7..075a2a2 100644 --- a/vrobbler/apps/videogames/templatetags/naturalduration.py +++ b/vrobbler/apps/videogames/templatetags/naturalduration.py @@ -11,11 +11,18 @@ def natural_duration(value): total_minutes = int(value / 60) hours = int(total_minutes / 60) minutes = total_minutes - (hours * 60) + seconds = value % 60 value_str = "" + if seconds: + value_str = f"{seconds} seconds" if minutes: - value_str = f"{minutes} minutes" + if value_str: + value_str = f"{minutes} minutes, " + value_str + else: + value_str = f"{minutes} minutes" if hours: - if not value_str: - return f"{hours} hours" - value_str = f"{hours} hours, " + value_str + if value_str: + value_str = f"{hours} hours, " + value_str + else: + value_str = f"{hours} hours" return value_str diff --git a/vrobbler/templates/_scrobblable_list.html b/vrobbler/templates/_scrobblable_list.html index f30223f..2945d67 100644 --- a/vrobbler/templates/_scrobblable_list.html +++ b/vrobbler/templates/_scrobblable_list.html @@ -12,6 +12,9 @@ {% if object_list.0.domain %} Domain {% endif %} + {% if object_list.0.lat %} + Movement + {% endif %} Scrobbles Start diff --git a/vrobbler/templates/locations/geolocation_list.html b/vrobbler/templates/locations/geolocation_list.html index e43375d..0ec03cb 100644 --- a/vrobbler/templates/locations/geolocation_list.html +++ b/vrobbler/templates/locations/geolocation_list.html @@ -58,18 +58,7 @@
- - - - - - - - - - {% include "_scrobblable_list.html" %} - -
ScrobblesTitlePoint
+ {% include "_scrobblable_list.html" %}
diff --git a/vrobbler/templates/scrobbles/_row.html b/vrobbler/templates/scrobbles/_row.html index dae6e10..7d6208d 100644 --- a/vrobbler/templates/scrobbles/_row.html +++ b/vrobbler/templates/scrobbles/_row.html @@ -3,10 +3,12 @@ {% if scrobble.in_progress %}{{scrobble.media_obj.strings.verb}} now | Finish{% else %}{{scrobble.local_timestamp|naturaltime}}{% endif %} - {% if scrobble.media_type == "Task" %} -

{{scrobble.media_obj.title|truncatechars_html:45}} - {% if scrobble.logdata %}{% if scrobble.logdata.title%}{{scrobble.logdata.title}}{% endif %}{% endif %}

+ {% if scrobble.media_type in "Task" %} +

{{scrobble.media_obj.title|truncatechars_html:45}} - {% if scrobble.logdata %}{% if scrobble.logdata.title %}{{scrobble.logdata.title}}{% endif %}{% endif %}

+ {% elif scrobble.media_type == "GeoLocation" %} +

{{scrobble.media_obj|truncatechars_html:45}} - {{scrobble.logdata.movement_type}} {% else %} - {{scrobble.media_obj|truncatechars_html:45}} +

{{scrobble.media_obj|truncatechars_html:45}} {% endif %} {{scrobble.elapsed_time|natural_duration}}