Commit Graph

453 Commits

Author SHA1 Message Date
Deluan 759ff844e2 Make ffmpeg path configurable, also finds it automatically in current folder. Fixes #1932 2023-02-07 13:46:09 -05:00
selfhoster1312 1e24809ed6
Create accounts automatically when authenticating from HTTP header (#2087)
* Create accounts automatically when authenticating from HTTP header

* Disable password check when header auth is enabled

* Formatting

* Password change is valid when no password (old or new) is provided

* Test suite runs with header auth disabled (mock config)
Prevents nil pointer access (panic) while testing password validating logic

* Use a constant prefix for autogenerated passwords (header auth case)

* Add tests

* Add context to log messages

Co-authored-by: Deluan <deluan@navidrome.org>
2023-01-24 20:18:10 -05:00
Deluan 433da37982 Add Share to Context menus, also share artist 2023-01-24 18:36:47 -05:00
Deluan 26be5b8396 Keep order of shared mediafiles 2023-01-24 18:36:47 -05:00
Deluan d639da9eb5 Enable sharing only selected songs with the Subsonic API 2023-01-24 18:36:47 -05:00
Deluan e34f26588e Fix empty `entry` collection in Shares 2023-01-24 18:36:47 -05:00
Deluan d0dceae094 Add `getShares` and `createShare` Subsonic endpoints 2023-01-24 18:36:46 -05:00
Deluan 84aa094e56 More work on Shares 2023-01-24 18:36:45 -05:00
Deluan ab04e33da6 Initial work on Shares 2023-01-24 18:36:45 -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 c5d900aa43.

* 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
Kendall Garner 8877b1695a
Add Internet Radio support (#2063)
* add internet radio support

* Add dynamic sidebar icon to Radios

* Fix typos

* Make URL suffix consistent

* Fix typo

* address feedback

* Don't need to preload when playing Internet Radios

* Reorder migration, or else it won't be applied

* Make Radio list view responsive

Also added filter by name, removed RadioActions and RadioContextMenu, and added a default radio icon, in case of favicon is not available.

* Simplify StreamField usage

* fix button, hide progress on mobile

* use js styles over index.css

Co-authored-by: Deluan <deluan@navidrome.org>
2023-01-15 15:11:37 -05:00
Deluan 16c869ec86 Optimize playlist cover generation 2023-01-13 22:18:34 -05:00
Deluan df0f140f9f Don't refresh smart playlists when generating covers 2023-01-01 20:28:03 -05:00
Deluan 8e640bb858 Implement new Artist refresh 2022-12-28 15:31:56 -05:00
Deluan c36e77d41f Remove CoverArtID, fix tests 2022-12-28 15:31:56 -05:00
Deluan c430401ea9 Remove current artwork implementation 2022-12-28 15:31:56 -05:00
Deluan 2f90fc9bd4 Move album refresh to scanner 2022-12-28 15:31:56 -05:00
Deluan 566ae93950 Remove old refresh code 2022-12-28 15:31:56 -05:00
Deluan 28e7371d93 Moved logic of collapsing songs into albums to model package
(it should really be called domain.... maybe will rename it later)
2022-12-28 15:31:56 -05:00
Deluan 5943e8f953 Rename log.LevelCritical to log.LevelFatal 2022-12-21 14:53:36 -05:00
Deluan 9c433b5d68 Add missing context to logger calls 2022-11-04 11:30:12 -04:00
Deluan fa5dc5af10 Fix adding songs to plain playlists 2022-10-06 19:45:31 -04:00
Deluan 3d5a1cef92 Don't allow adding songs to smart playlists 2022-10-02 20:14:15 -04:00
Deluan f82df70302 Add nilerr linter 2022-09-30 20:18:14 -04:00
Deluan 77dbafff0f Add errorlint linter 2022-09-30 19:33:39 -04:00
Deluan db67c1277e Fix error comparisons 2022-09-30 18:54:25 -04:00
Deluan e981ee27c0 Add test for WithTx 2022-07-30 13:07:38 -04:00
Deluan 695f82a1a0 Upgrade to Beego 2's orm 2022-07-30 12:43:48 -04:00
Deluan 31882abf6f Upgrade Ginkgo to V2 2022-07-26 16:53:17 -04:00
Deluan cbeaadf8e2 Fix logging smart playlist's song count 2021-11-20 12:29:09 -05:00
Deluan 1c82bf5179 Remove non-album artist_ids from the DB 2021-11-05 20:24:50 -04:00
Deluan 0d9dcebf32 Fix playlist cannot be empty via Subsonic API 2021-11-05 10:23:45 -04:00
Deluan 9422373be0 Optimize AlbumRepository.GetAll and add a GetAllWithoutGenres method specifically for Subsonic API, where multiple-genres are not required 2021-11-02 21:19:49 -04:00
Deluan 12818fb590 Make song/album/artist endpoints read-only 2021-11-02 14:44:50 -04:00
Deluan aaeaa3c590 Fix playlist filter 2021-11-02 12:56:43 -04:00
Deluan 778f474d26 Use new `rest` lib (Update receives all columns that need to be updated) 2021-11-01 21:27:36 -04:00
Deluan 133fed344f Add `owner_id` to `playlist` 2021-10-31 15:08:06 -04:00
Deluan a42aeff88d Optimize queries by path, should speed up the scanner a bit 2021-10-29 13:11:51 -04:00
Deluan f3fae7e233 Optimize basic media_file query, avoiding adding "group by" or joining with genres if not required 2021-10-29 09:50:22 -04:00
Deluan 074732b1dc Filter playlists by names and comments 2021-10-28 13:58:06 -04:00
Deluan 66a9cbb7d9 Remove temp folders after tests 2021-10-28 10:40:31 -04:00
Deluan ea435d0f60 Fix error on empty playlists. Simplify code for some operations 2021-10-27 09:50:24 -04:00
Deluan 5e87280750 Load playlist track genres 2021-10-26 18:46:08 -04:00
Deluan 526b6597c8 Remove duplication for loading tracks 2021-10-26 18:34:21 -04:00
Deluan 5dce499d6d Fix/Optimized Playlist tracks deletion 2021-10-26 14:05:28 -04:00
Deluan af00503b77 Optimize playlist updates 2021-10-26 10:45:14 -04:00
Deluan 93ce0b5683 Fix Genre field and Contains/NotContains/StartsWith/EndsWith in Criteria (Smart Playlists) 2021-10-25 16:17:03 -04:00
Deluan 47549ecfc1 Increase updatePlaylist chunk to 100 tracks 2021-10-25 13:00:46 -04:00
Deluan 8d6b5f9d02 Speed up Subsonic `GetPlaylist` (by optimizing `loadTracks`) 2021-10-25 11:14:20 -04:00
Deluan 2e2a647e67 Make SmartPlaylists read-only 2021-10-23 20:25:28 -04:00