Add scrobbled tracks search parser

Introduces ListeningStats.SearchParser with NimbleParsec supporting
record:, album_mbid:, artist_mbid:, artist:, album:, track: filters.
Links scrobble count on record page to filtered scrobbled tracks view.
This commit is contained in:
Claudio Ortolina
2026-04-15 14:56:38 +01:00
parent 851cb36858
commit c816f2de4a
4 changed files with 210 additions and 7 deletions
@@ -245,9 +245,13 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
<span :if={@play_count == 0}>
{gettext("Never")}
</span>
<span :if={@play_count > 0}>
<.link
:if={@play_count > 0}
navigate={~p"/scrobbled-tracks?#{%{query: "record:#{@record.id}"}}"}
class="text-zinc-900 underline dark:text-zinc-100"
>
{ngettext("(1 scrobble)", "(%{count} scrobbles)", @play_count)}
</span>
</.link>
</.dl_row>
<.record_published_releases record={@record} />
<.dl_row label={gettext("Collected release")}>