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:
@@ -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")}>
|
||||
|
||||
Reference in New Issue
Block a user