Claudio Ortolina b042c54d6b Move record leading into handle_params
Loading records in mount/3 proved to be useless, and only caused more
load for nothing. Moving it in handle_params made the app faster, at the
expense of complicating a couple of other actions (edit and import)
which needed to be extended to concern themselves about records.
2024-10-16 12:49:14 +01:00
2024-09-16 09:45:47 +01:00
2024-10-10 17:33:45 +01:00
2024-10-14 18:58:10 +01:00
2024-10-07 08:12:05 +01:00
2024-09-27 19:38:17 +01:00
2024-10-07 08:12:05 +01:00
2024-10-07 08:12:05 +01:00
2024-10-16 12:14:53 +01:00
2024-09-22 16:54:24 +01:00
2024-10-15 23:09:18 +01:00
2024-10-14 18:58:10 +01:00
2024-10-03 15:52:41 +01:00

MusicLibrary

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -S mix phx.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

Dev Notes

  • SQLite supports full-text search via the built-in FTS5 extension, which is enabled by default and loaded in the Elixir Driver. The extension requires building a virtual table that holds the data to be searched. This seems to be akin to a materialized view.
  • To have fuzzy search, another extension needs to be loaded. Exqlite recommends using ExSqlean, which in turn uses Sqlean, but the extension is NOT part of the ExSQlean set. Need to investigate with forking and PR.

Queries

  • To get the count of records per genre:

    select genre.value, count(genre.value) as c from records, json_each(records.genres) genre group by genre.value order by c desc;
    
  • To get the count of records per artist:

    select json_extract(artist.value, '$.name') AS name, count(1) as c from records, json_each(records.artists) artist group by name order by c desc;
    

    Note that this query would fail to disambiguate artists with the same name - can be fixed by using the artist musicbrainz_id.

CI

See the .github folder.

S
Description
No description provided
Readme 63 MiB
Languages
Elixir 77.4%
Python 10%
TypeScript 6.6%
HTML 3.7%
Shell 1.4%
Other 0.8%