Find last listened track based on title and artist as well

This commit is contained in:
Claudio Ortolina
2025-06-03 18:05:23 +01:00
parent c23260d03d
commit 669b144c55
3 changed files with 16 additions and 2 deletions
+7
View File
@@ -37,6 +37,13 @@ defmodule MusicLibrary.Records.Record do
Enum.map_join(record.artists, ", ", fn artist -> artist.name end)
end
def main_artist(record) do
case record.artists do
[] -> nil
[main_artist | _] -> main_artist
end
end
def artist_ids(record) do
Enum.map(record.artists, fn artist -> artist.musicbrainz_id end)
end