[locations] Add locations to dashboard

This commit is contained in:
2025-09-11 18:29:28 -04:00
parent 3b77feda45
commit 92c0c668b3
5 changed files with 20 additions and 10 deletions

View File

@ -655,6 +655,13 @@ class Scrobble(TimeStampedModel):
(scrobble.elapsed_time)
)
# Remove any locations without titles
if "GeoLocation" in scrobbles_by_type.keys():
for loc_scrobble in scrobbles_by_type["GeoLocation"]:
if not loc_scrobble.media_obj.title:
scrobbles_by_type["GeoLocation"].remove(loc_scrobble)
scrobbles_by_type["GeoLocation_count"] -= 1
return scrobbles_by_type
@classmethod