Commit Graph

35 Commits

Author SHA1 Message Date
Claudio Ortolina 9f383dfc5b Make db-dependent tests sync
As explained at
https://hexdocs.pm/ecto_sqlite3/Ecto.Adapters.SQLite3.html#module-async-sandbox-testing:

The Ecto SQLite3 adapter does not support async tests when used with
Ecto.Adapters.SQL.Sandbox. This is due to SQLite only allowing up one
write transaction at a time, which often does not work with the Sandbox
approach of wrapping each test in a transaction.
2024-10-10 15:54:22 +01:00
Claudio Ortolina 201c2edc01 Enable tagged search 2024-10-10 10:02:26 +01:00
Claudio Ortolina e30ba5ef3f Implement basic parser 2024-10-10 10:02:26 +01:00
Claudio Ortolina 1fdf36ea8a Include artists in record test fixture 2024-10-10 10:02:03 +01:00
Claudio Ortolina 10003c34f6 Include timestamps in record detail page 2024-10-10 08:00:07 +01:00
Claudio Ortolina 52c1be1e32 Restructure stats
Split out count by format
2024-10-08 20:36:39 +01:00
Claudio Ortolina 76907a4a6f Make all tests async
Doesn't make a difference at this stage, but it's a good foundation as
the application grows.
2024-10-08 16:53:47 +01:00
Claudio Ortolina 1e245547bc Display no results notice in import dialog 2024-10-07 15:16:41 +01:00
Claudio Ortolina d4f93eae03 Shorten Import button text 2024-10-07 15:11:23 +01:00
Claudio Ortolina be9dc37ed5 Use long labels for formats in stats page 2024-10-07 10:04:31 +01:00
Claudio Ortolina 2e950325cb Add test to verify that musicbrainz_data gets stored 2024-10-07 08:39:22 +01:00
Claudio Ortolina 2c3babdf13 Normalize music_brainz -> musicbrainz spell 2024-10-07 08:27:47 +01:00
Claudio Ortolina ac27e86fb5 Rename /images to /covers 2024-10-06 16:06:33 +01:00
Claudio Ortolina 6913ee2d8d Simplify import logic and add relevant tests
Import directly redirects to the record - previous version was buggy and
worked completely by chance.

In addition, this commit adds extensive tests around importing a record
via use of mocks.
2024-10-05 21:46:52 +01:00
Claudio Ortolina ea6a856f30 Rename test for consistency 2024-10-04 20:41:35 +01:00
Claudio Ortolina 220dfe3c89 Add record show tests 2024-10-04 20:40:55 +01:00
Claudio Ortolina ec0a96087c Improve cover upload input
- Enable drag and drop (invisible)
- Show upload progress
- Add relevant tests
2024-10-04 12:07:00 +01:00
Claudio Ortolina 70ca206b5d Show artists for latest record 2024-10-03 23:10:55 +01:00
Claudio Ortolina e7fc335251 Correctly return 404s in /images endpoint 2024-10-03 16:14:27 +01:00
Claudio Ortolina e23caabff7 Improve record list tests 2024-10-03 14:07:19 +01:00
Claudio Ortolina 1e0d5486e0 Rename image* to cover* 2024-10-02 16:33:42 +01:00
Claudio Ortolina 024d95da7c Use release instead of year 2024-10-02 14:22:22 +01:00
Claudio Ortolina 97b04ba8a2 Remove scaffolded test
Doesn't provide any value - should be replaced with proper integration
tests.
2024-10-01 22:39:03 +01:00
Claudio Ortolina 82e5962c74 Add record format (defaulting to CD) 2024-09-28 19:16:15 +01:00
Claudio Ortolina 60939a304b Remove autogenerated home route
Renders records instead.
2024-09-27 19:59:15 +01:00
Claudio Ortolina bcb70c9e1b Store artists when importing a record 2024-09-24 09:40:52 +01:00
Claudio Ortolina b6ae022a6a Move obsidian-related imports under Obsidian 2024-09-24 09:21:13 +01:00
Claudio Ortolina 7ebc12c4ac Improve records list tests
- Remove scaffolded tests (precursor to removing functionality)
- Add tests for paginated list
2024-09-23 14:52:37 +01:00
Claudio Ortolina 776dcef172 Use randomized data in test fixtures 2024-09-22 20:46:48 +01:00
Claudio Ortolina afc1802399 Serve local cover images 2024-09-16 09:50:07 +01:00
Claudio Ortolina 705fd665d2 Formatter pass 2024-09-15 20:28:37 +01:00
Claudio Ortolina 170f195aae Fix edge cases with parser
- Remove front_matter dependency, and use a hand-rolled simpler parser
  which is suitable for the data to parse (which is well-formed).
- Fix a couple of edge cases with years and titles with commas
2024-09-15 20:28:37 +01:00
Claudio Ortolina 2c42f3ea32 Can parse an obsidian entry to retrieve correct metadata 2024-09-15 20:28:37 +01:00
Claudio Ortolina e08fbe3740 Generate schema and live_view scaffold for records
1. Records are not yet tied to artists
2. The generated edit route, along with related functionality, may be
   deleted as I don't think it's gonna be needed. Leaving it included in
   the commit for reference.
2024-09-12 14:51:58 +01:00
Claudio Ortolina d547ee6f8d Generate project
Using `mix phx.new music_library --database sqlite3 --binary-id --no-mailer`
2024-09-12 14:05:08 +01:00