20 Commits

Author SHA1 Message Date
Deluan
3107170afd Improve SQL sanitization 2024-09-14 18:53:34 -04:00
Deluan
eaa7f7c7e9 Fix Player filter 2024-08-05 18:21:21 -04:00
Deluan Quintão
0ca0d5da22
Replace beego/orm with dbx (#2693)
* Start migration to dbx package

* Fix annotations and bookmarks bindings

* Fix tests

* Fix more tests

* Remove remaining references to beego/orm

* Add PostScanner/PostMapper interfaces

* Fix importing SmartPlaylists

* Renaming

* More renaming

* Fix artist DB mapping

* Fix playlist updates

* Remove bookmarks at the end of the test

* Remove remaining `orm` struct tags

* Fix user timestamps DB access

* Fix smart playlist evaluated_at DB access

* Fix search3
2023-12-09 13:52:17 -05:00
Zane van Iperen
feb774a149
Change genre.Put() to upsert. Fix #1918 and #1564 (#1920)
* persistence/genre: change Put() to upsert

Absolutely disgusting hack to work around [1]. Try to insert the genre,
but if it conflicts, ignore it and update the genre with the existing
ID.

[1]: https://github.com/navidrome/navidrome/issues/1918.

* scanner: remove cached genre repository

Not needed anytmore. And remember:

  "Many Small Queries Are Efficient In SQLite" [1].

[1]: https://www.sqlite.org/np1queryprob.html

* Revert "scanner: remove cached genre repository"

This reverts commit c5d900aa43e1c86b69f923b408e11ab8df8d815c.

* Use squirrel to build SQL, to reduce risk of SQL injection

Co-authored-by: Deluan <deluan@navidrome.org>
2023-01-17 21:04:18 -05:00
Deluan
695f82a1a0 Upgrade to Beego 2's orm 2022-07-30 12:43:48 -04:00
Deluan
b6e9ec4db4 Optimize GetAll genres query 2021-07-20 17:45:08 -04:00
Deluan
2742977c63 Fix multiple id3v2.4 genres appearing as one big concatenated genre 2021-07-20 17:45:08 -04:00
Deluan
69f71be98a Add more tests 2021-07-20 17:45:08 -04:00
Deluan
20b7e5c49b Add Genre filters to UI 2021-07-20 17:45:08 -04:00
Deluan
c56c7c865e Purge unused genres at the end of the scan 2021-07-20 17:45:08 -04:00
Deluan
5e54925520 Add multiple genres to Albums 2021-07-20 17:45:08 -04:00
Deluan
39da741a80 Add multiple genres to MediaFile 2021-07-20 17:45:08 -04:00
Deluan
7cd3a8ba67 Add genre tables, read multiple-genres from tags 2021-07-20 17:45:08 -04:00
Deluan
6ee45a9ccc Move project to Navidrome GitHub organization 2021-02-06 21:46:35 -05:00
Deluan
7c4511e33a refactor: consolidate query executions into two functions queryOne and queryAll 2020-02-01 17:23:03 -05:00
Deluan
44671c59c0 refactor: fix rest filter 2020-02-01 17:23:03 -05:00
Deluan
71c1844bca refactor: new persistence, more SQL, less ORM 2020-02-01 17:23:03 -05:00
Deluan
bee55c04c8 Rename project to Navidrome 2020-01-23 19:44:08 -05:00
Deluan
67eeb218c4 Big Refactor:
- Create model.DataStore, with provision for transactions
- Change all layers dependencies on repositories to use DataStore
- Implemented persistence.SQLStore
- Removed iTunes Bridge/Importer support
2020-01-19 16:28:09 -05:00
Deluan
36d93774bc Add GetGenre endpoint 2020-01-15 17:56:02 -05:00