Commit Graph
62 Commits
Author SHA1 Message Date
emeric 97866d6143 Moved scanner specific code from core 2025-07-19 11:39:57 +02:00
emeric 08ac5f0b10 Added a macro to log with a condition 2025-07-17 20:52:06 +02:00
emeric 1800aaf32e Explore files in the filesystem with a single stat for each file 2025-07-07 23:07:51 +02:00
emeric 49afdb3db6 Removed useless stat call 2025-07-07 13:44:50 +02:00
emeric 427f777c44 Added missing pragmas 2025-07-02 23:34:54 +02:00
emeric 376316da14 Moved code to scan files in parallel at upper level to ease reuse 2025-07-02 21:18:04 +02:00
emeric 0e028fd116 Fixed multi platform builds 2025-06-22 18:51:36 +02:00
emeric ed14fa6bc2 Fixed multi platform builds 2025-06-22 17:37:01 +02:00
emeric 161d7b6c15 Minor clean 2025-06-06 08:45:34 +02:00
emeric c9e4ec1eb5 fixed format 2025-06-06 08:24:02 +02:00
Simon Rettberg b2471cccfb FileResourceHandler: Open file once on init, more error handling
Keeping the file open allows better prefetching/caching on both
the application layer (ifstream) and OS level (vfs layer) as
the access pattern is sequential and predictable. We also save
three syscalls (open, seek, close) for every chunk we send to
the client (256kb).
2025-06-06 08:24:02 +02:00
Simon Rettberg 54771e6ddf Minor fixes to ChildProcess
- Don't set FD_CLOEXEC, but close manually before fork:
  Since we don't use pipe2() to set the flag atomically, we're prone to
  races with concurrent fork+execs either way. As ChildProcess uses a
  mutex here anyways, as long as there is no other part in lms that
  would fork+exec, we're not any more or less safe now, but the code
  is shorter and we cannot fail the fcntl.
- Don't make the write-end of the pipe non-blocking. Usually programs
  do not expect this, i.e. they either never check the return code of
  a write to stdout (potential data loss), or if they do, they just
  bail out on any error, and don't handle EAGAIN. ffmpeg seemed
  to handle this fine though (or we were just lucky and always read
  the data faster than ffmpeg could produce it).
- Do not close stdin and stderr. Again ffmpeg seems to handle this,
  at least regarding stdin thanks to -nostdin, but in general if a
  process tries to write to stderr and fd 2 is not open, it might
  just bail out. Even worse, the process might have opened some
  file it wants to work with, and that file got assigned fd 2 (as
  that was the next free fd) - the program would corrupt whatever
  file it opened there whenever it tries to write to stderr.
  Try to open /dev/null instead for stdin and stderr, and if that
  fails, keep whatever lms inherited open, which should be safer
  than relying on the child process to handle this case properly.
- exec() does not return on success, no need to check return code,
  any return from it is a failure.
- Wrong error message in error path when assigning fd to boost stream.
- F_SETPIPE_SZ requires and int, not size_t. This worked on little
  endian systems since the value passed was < 2^32, but on big
  endian systems you'd effectively pass "0" if using a 64bit type.
- Address a few clang-tidy complaints (constness)
2025-06-02 09:18:31 +02:00
emeric dc52ea4ea5 Introduced new transcoding service 2025-05-30 23:27:01 +02:00
emeric 571c0bc5f4 More details for scan error reports #676 2025-05-26 23:33:52 +02:00
emeric 6d6ea4920b xxhash is just an include dependency 2025-05-24 15:02:10 +02:00
emeric a5b130305e Append Z to iso8601 date time strings 2025-04-11 18:02:58 +02:00
emeric faabb7ec4a Added an option to merge artists without MBIDs to those with one, fixes #642 2025-04-04 18:30:14 +02:00
emeric 05000d8a1a Deduplicate embedded images, ref #628 2025-03-15 14:48:37 +01:00
emeric 744abefc8b Added xxhash dependency 2025-03-09 15:11:41 +01:00
emeric 923c632878 Setting the size of the ipc pipe buffers is not mandatory, ref #614 2025-02-16 13:16:06 +01:00
emeric 6494d17f99 Use boost asio executor_work_guard to fix build 2025-02-10 17:09:52 +01:00
emeric c9fb398196 Use boost asio post to fix build 2025-02-10 16:54:25 +01:00
emeric 20e0c1a24d Removed deprecated use of io_service, fixed arch build 2025-02-09 21:26:24 +01:00
emeric 814eaf0a3e Switched the file added info back to a full date time, ref #601 2025-01-26 15:08:31 +01:00
emeric 534df42f9d Distinguish initial scan to import last time write as added time, ref #601 2025-01-24 17:59:25 +01:00
emeric 5b73925019 Switched to full static release + enable lto for the docker release image 2025-01-22 18:34:08 +01:00
emeric 40416cb907 Fixed code factor issue 2025-01-22 13:42:52 +01:00
emeric 817588a755 Properly exclude 00 for partial dates, fixes #477 2025-01-20 13:43:19 +01:00
emeric 33759def78 Adding support for partial dates (only year or month), fixes #477 2025-01-19 23:50:39 +01:00
emeric c73ff7dc03 Use ENCODINGTIME to set the added time, if present, otherwise use the last modified time of the file (only during the first import), fixes #595 2025-01-18 16:51:31 +01:00
emeric 10d900faf2 Simplified some path writes 2025-01-06 22:29:46 +01:00
emeric 3740c6f899 Allow to use an empty lms.conf file, default values are now all hardcoded, fixes #584 2025-01-05 16:12:25 +01:00
emeric 3661eaccb6 Added playlist import (and sync)from m3u files, ref #391 2024-12-18 14:15:25 +01:00
emeric 38efdfaf87 Prefer first embedded image that contains the 'front' keyword 2024-12-08 11:53:31 +01:00
emeric 45175a721c Various minor cleanup 2024-12-05 20:09:14 +01:00
emeric 360623c569 OpenSubsonic API: added apiKey support, ref #544 2024-11-24 15:23:14 +01:00
emeric 7b4791005a Fixed crash when a library is set with a trailing /, fixes #552 2024-11-14 23:18:00 +01:00
emeric e46682e346 Fixed bool value badly parsed, fixes #542 2024-10-30 18:55:45 +01:00
emeric f613d16fc2 Now manually parse sync/unsync lyrics frames in id3v2 tags 2024-10-27 15:21:54 +01:00
emeric 72b1367ea6 Added embedded/external lyrics support: parsing + indexing, ref #379 2024-10-26 16:58:13 +02:00
emeric 0f626f7716 Centralized default path for config file, fixes #525 2024-10-04 10:07:59 +02:00
emeric 777c36005b Do not use pipe2 to make code more portable, ref #514 2024-09-13 23:28:28 +02:00
emeric c165ed9f2f Made some UI states persistent across sessions, ref #484 2024-09-12 14:01:03 +02:00
emeric fc27a4f852 Apply all separators, not only the first one found, ref #518 2024-09-07 09:34:45 +02:00
emeric 6f3f138f52 Fixed bug in the scan settings view when no extra tag is to be parsed 2024-06-15 15:40:46 +02:00
emeric 39941d90a3 Auto reformatted the base, ref #470 2024-05-24 23:31:52 +02:00
emeric 83b868673c Added a clang-format def file, ref #470 2024-05-24 23:31:02 +02:00
emeric 1a9b392a71 Upgraded alpine images 2024-04-27 15:16:03 +02:00
emeric 1862cd23c2 Changed db optimization strategy: now perform a full analyze (only after scan if enough changes has been made, and during application startup). Also perform a vacuum if needed during startup. Added an init screen for the web interface since it can take a while to complete 2024-04-18 18:46:35 +02:00
emeric 8438da9fde Added db stats in trace metadata 2024-04-03 00:02:48 +02:00