{# Listening Widget — combined Funkwhale + Last.fm recent tracks #} {% set hasListening = (funkwhaleActivity and (funkwhaleActivity.nowPlaying or funkwhaleActivity.listenings.length)) or (lastfmActivity and (lastfmActivity.nowPlaying or lastfmActivity.scrobbles.length)) %} {% if hasListening %}

Listening

{# Now Playing — show if either source is actively playing #} {% set fwNow = funkwhaleActivity.nowPlaying if funkwhaleActivity and funkwhaleActivity.nowPlaying and funkwhaleActivity.nowPlaying.status == 'now-playing' else null %} {% set lfmNow = lastfmActivity.nowPlaying if lastfmActivity and lastfmActivity.nowPlaying and lastfmActivity.nowPlaying.status == 'now-playing' else null %} {% if fwNow or lfmNow %} {% set np = fwNow or lfmNow %} {% set npSource = "Funkwhale" if fwNow else "Last.fm" %} {% set npColor = "purple" if fwNow else "red" %}
Now Playing ({{ npSource }})
{% if np.coverUrl %} {% endif %}

{% if np.trackUrl %} {{ np.track }} {% else %} {{ np.track }} {% endif %}

{{ np.artist }}

{% endif %} {# Recent tracks — 2 from each source #} View full listening history
{% endif %}