Commit graph

176 commits

Author SHA1 Message Date
Antoine Gersant
524e072e9f Fixed typo 2024-10-09 11:12:44 -07:00
Antoine Gersant
a89e3d5145 WIP 2024-10-06 23:12:57 -07:00
Antoine Gersant
369bf3821b Introduces data_dir 2024-10-05 20:04:39 -07:00
Antoine Gersant
664ff721e2 ndb playlists first pass 2024-10-04 20:43:53 -07:00
Antoine Gersant
8f2566f574 Refactor index 2024-07-31 23:38:38 -07:00
Antoine Gersant
2965cbdf7e Index/Browser split 2024-07-28 23:15:26 -07:00
Antoine Gersant
3362a828cd Split index into scanner (populates DB) and index (reads from DB) 2024-07-15 02:11:18 -07:00
Antoine Gersant
08353a717f Axum initial setup 2024-07-13 12:30:02 -07:00
Antoine Gersant
12a9f2ec3c Diesel -> SQLx 2024-07-13 01:20:27 -07:00
Antoine Gersant
fc0a4fd6eb Tentative fix for linux build 2023-09-12 20:08:12 -07:00
Antoine Gersant
1812bedfd2 Fixed a bug where systemd init error would not display 2022-11-21 17:31:12 -08:00
Antoine Gersant
c57583d1d4 Removed anyhow dependency 2022-11-21 17:23:14 -08:00
Tobias Schmitz
90fd6bbcc9
Update dependencies (#166) 2022-03-20 19:50:14 -07:00
pmphfm
e2bf97db99
Code cleanup (#148)
Fixed all most all clippy warnings.
Test: cargo test && cargo clippy
2021-10-19 19:31:17 -07:00
Antoine Gersant
7a73ae7cc0 Don't emit log file when running in foreground (-f on Linux, polaris-cli.exe on Windows) and --log is not set 2021-01-02 16:03:51 -08:00
Antoine Gersant
4ad8d922f7
Platform-specific improvements (#127)
* Use native-windows-gui crate to manage tray icon
Adds log file support on Windows

* Log file location now works like other paths

* Removed context builder

* Context --> App

* Removed mount URLs from App

* Switch to a nicer crate for forking daemon

* Handle errors from notify_ready

* Add application icon to all Windows Polaris executables, not just those created by the release script

* Add build.rs to release tarball

* Create PID file parent directory if necessary
2020-12-30 21:41:57 -08:00
Antoine Gersant
5e065c5e6a
Split configuration module (#117) 2020-12-18 01:14:24 -08:00
Antoine Gersant
c2807b60de
Replace rocket with actix-web (#116)
* Adds actix dependency

* Failed attempt at test harness using actix

* Fixed test panic

* Simplified tests

* Run web server in tests

* Send json payloads

* Static file serving

* Default shutdown timeout

* Implement version endpoint

* Implements #[get("/initial_setup")]

* WIP put_settings endpoint

* Adds AdminRights extractor

* Fixed a bug where AdminRights extractor always failed

* Implements collection endpoints

* Re-use system runnner between calls

* Preserve client headers between API calls (tentative)

* Fixed test interferences

* Implemented more endpoints

* Implemented audio file serving

* Fixed sketchy responses

* Implements thumbnail endpoint

* Login endpoint WIP

* Implement login endpoint

* Auth support

* When using HTTP headers to authenticate, response now includes expected cookies

* Tentative fix for server not responding within docker

* Adds logging middleware + browse troubleshooting

* Tentative fix for path decoding issues

* Tentative fix for broken path decoding

* Fix routing issues w/ paths

* Fixed a bug where auth cookies were sent in every response

* More lenient test timeouts

* Fixed a bug where recent/random endpoints required trailing slashes

* Compilation fix for rocket branch

* More useful test matrix

* Signed session cookies (#106)

* Isolate conflicting dependencies between rocket and actix versions

* Removed macOS from test matrix

* Glorious test harness simplification

* Removed RequestBuilder

* Shutdown on ctrl+c

* Pin to stable

* Drop rocket

* Simplify dependencies

* Removed stray rocket dependency

* Better test matrix

* Skip windows build without bundled sqlite

* Offload thumbnail creation to a thread pool

* Compress responses when possible

* Removed unused manage state

* Fixed a bug where large playlists could not be saved

* Return HTTP 401 for last fm requests without authentication

* Web block (#115)

* web::block around DB operations

* web::block during auth utils hitting DB

* Fixed incorrect http response code for missing thumbnail

* Removed unecessary unwrap

* Eliminated unecessary unwrap
2020-12-14 21:18:44 -08:00
Antoine Gersant
34e0538562
App features re-organization (#111) 2020-12-10 03:23:00 -08:00
Antoine Gersant
b6c446fa02
Rewrote indexer (#107)
* Update index without rayon

* Use crossbeam channels

* Use a single thread for DB insertions

* Better use of rayon in clean()

* Index rewrite

* Parallelize traverser

* Don't swallow send error

* Use Drop trait to flush Inserter work

* Configurable number of traverser threads

* Use channels to manage the work queue instead of Mutex

* Removed unusable profiling feature
2020-12-07 20:07:10 -08:00
Antoine Gersant
e1934a8e92
Cleaned up startup code (#104) 2020-11-30 20:27:39 -08:00
Antoine Gersant
1ffea255df Avoid unecessary copies 2020-11-26 19:30:42 -08:00
Antoine Gersant
538b41a2b4
Use standard directories when running on Linux (#91)
* Use standard Linux directories for application data (https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard)

* Use standard system directories

* Cleanup all Polaris files during uninstall

* Expose get_pid_directory to rest of the crate

* Add separate targets for install binary and data files, clean up makefile

* Use environment variables for directory locations during install process

* On Linux, read locations from environment variables at compile time

* Split static_directory in two (web and swagger directories)

* Follow recommendations from the Make manual

* Avoid redundant directories

* Added workflow to validate installer setup

* Added CLI options to locate log file, pid file and cache directory

* Fixed an issue where build command did not support the xdg/system switch

* Renamed log option to log-level

* Fixed an issue where xdg install would do a system build

* Use re-usable action to make linux release

* Avoid nested actions (see https://github.com/actions/runner/issues/646)

* Updated installation instructions

* Replaced deprecated use of set-env
2020-11-26 15:57:08 -08:00
Antoine Gersant
e0d1f396a8 Removed support for prefix_url 2020-11-25 17:49:18 -08:00
Tobias Schmitz
bff49c22ec
Embedded artwork support (#101)
* Embedded artwork support for mp4 and id3 tags

* Embedded artwork support for flac tags.

* small fixes

* use first embedded artwork for directory

* added artwork tests

* updated Cargo.lock

* use first embedded artwork for missing artworks
2020-11-25 15:46:09 -08:00
Antoine Gersant
ca8f046142 Thumbnails code cleanup 2020-09-23 22:20:27 -07:00
Antoine Gersant
186e3173cd Formatting 2020-01-31 19:16:55 -08:00
Antoine Gersant
d1bb60a1c7 Moved metadata module under index 2020-01-18 23:21:45 -08:00
Antoine Gersant
e53b9f5867 Cleaned index API 2020-01-18 17:07:56 -08:00
Antoine Gersant
0e6be32a8c Removed unused feature 2020-01-18 14:37:35 -08:00
Antoine Gersant
6f642c34e2 Non-optional auth secret 2020-01-16 01:58:51 -08:00
Antoine Gersant
289827d6a3 Explicitely start async executor 2020-01-16 00:41:26 -08:00
Antoine Gersant
61c221a2d2 integration test sharing between backends 2020-01-16 00:34:47 -08:00
Antoine Gersant
9e48dc408e DB interactions for actix version 2020-01-15 21:58:37 -08:00
Antoine Gersant
e248f3b983 Serve web and swagger static files 2020-01-14 01:33:14 -08:00
Antoine Gersant
0a4d05cdc8 Actix hello world 2020-01-13 23:56:46 -08:00
Antoine Gersant
60f2e330a4 Moved rocket stuff into its own module 2020-01-13 23:04:05 -08:00
Antoine Gersant
d823dce7db Fixed typo 2020-01-04 17:07:35 -08:00
Antoine Gersant
70388095a5 More error fiddling 2020-01-04 17:03:07 -08:00
Antoine Gersant
ddae5cc24f Fixed straggler error 2020-01-04 16:52:36 -08:00
Antoine Gersant
f41f45f600 Simplified error boilerplate 2020-01-04 16:42:28 -08:00
Antoine Gersant
cbb7e7b97c Removed old diesel workaround 2020-01-04 09:34:09 -08:00
Antoine Gersant
28bb240ae0 Do not wipe users, mount points and ddns config before applying config file 2020-01-04 09:33:36 -08:00
Laurențiu Nicola
ec8742b8eb Use sd-notify instead of libsystemd 2019-10-01 19:22:25 +03:00
Antoine Gersant
22ae33f029 Updated simplelogger 2019-09-28 16:54:37 -07:00
Antoine Gersant
82ea7983aa Instrument index duration 2019-09-02 14:28:25 -07:00
Antoine Gersant
9d1ad2dc60 Fixed warning when compiling on Windows 2019-08-28 22:41:32 -07:00
Laurențiu Nicola
1bffdf0861 Provide secret key to Rocket 2019-08-08 08:06:29 +03:00
Laurențiu Nicola
606eae563d Add support for notifying systemd of startup 2019-08-07 14:37:27 +03:00
Laurențiu Nicola
b1fec94e82 Fix Windows builds 2019-08-07 08:50:24 +03:00