Closed Arlodotexe closed 2 years ago
In case dev don't forget about that the scanner has an init configurable state , maybe make it optional constructor parameter.
In case dev don't forget about that the scanner has an init configurable state , maybe make it optional constructor parameter.
I think until we can simplify the existing constructors, we should just add a property and give it the best default value for the majority of users.
Describe the problem
Right now, when you call
InitAsync()
on a file-based core (OneDrive, LocalFilesCore), the task completes before the core has a chance to scan audio files for metadata, meaning the core appears to not have any data.Worse, even if a dev knows this, there's no reliable way for them to know when data becomes available, short of hooking into every event in the
ILibrary
.Describe the proposed change
We need to fix this in a way to doesn't break the CoreModel standard. Waiting for this shouldn't require locating an extra property, or subscribing to some event, that doesn't exist on the
ICore
interface.Instead, we can add a
FileScanBehavior
enum:This should be exposed as a property or on the constructor, with
WaitIfNoData
as the default value, and InitAsync on each file-based core respecting the option.Alternatives
No response
Additional info
No response
Help us help you
No response