Although the number type is nullable from the type definition of ATL, the lib might still normalize all unknown values to 0 which makes doing null check only not enough. Fallback to ffprobe results when the number is 0 as well.
When writing an image to the disk, we use the completion of the async task as a signal indicating the completion of a write operation. However, this approach may not be entirely accurate, as the operating system can optimize IO operations by writing data to an intermediate cache instead of directly to the disk before completing the operation. This optimization can lead to a data race for our scanner, as subsequent tasks such as blurhash computation may attempt to read a file that has not yet been flushed from the volatile cache. Consequently, the data within the file becomes invalid, causing the blurhash computation task to fail.
Use WriteThrough mode to ensure the data is actual on disk before return to resolve this issue.
Previously, local images provided by DynamicImageResponse were never cleaned up until the server was restarted. This issue has become more severe in 10.10, as the default is now set to use the system's native temp folder, which might be a RAM backed tmpfs. This behavior could lead to resource starvation for long-running servers performing multiple library scans.
Metadata plugins prefer the old behavior should do its own backup.
Don't force non-virtual when all episodes in season are isMissing=true
Original-merge: be949af59e
Merged-by: Bond-009 <bond.009@outlook.com>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
The ATL lib provides a lot of advantages to the TagLib we are currently using.
Notably:
- auto-detect the format of the audio data, even if the file extension has the wrong label, and provides unified API for different file types.
- supports more audio formats than TagLib
- supports lyrics natively
- supports playlists and cuesheets
- srovides relatively simple and controllable way for non-standard fields, enable us to implement compatibility features instead of waiting for lib updates
- is actually maintained
Signed-off-by: gnattu <gnattuoc@me.com>