Problem
Settings > Root Folders > Scan for unmatched files opened its own Unmatched Files modal, which matched nothing:
- Add opened the add modal filled from the file tags, so a file without an ASIN was added with only the tag data;
- Add all with ASIN looked each ASIN up with no region, so in the US catalogue, whatever the configured region.
- Another type of search done in another screen with it's own rules and edge cases
Library Import already does all of this properly (Start Matching, Find Match, the region rules), for any root folder.
Change
- The button now opens Library Import on that root folder (
/library-import?rootFolder=<id>&scan=1): the folder is selected and scanned once, thenscan=1is removed from the address so a reload doesn't scan again. WithoutrootFolder, Library Import opens on the default folder as before. - If the address names a root folder that is no longer in Settings > Root Folders (an old link or bookmark), Library Import opens on the default folder as on a normal visit, scans nothing, and shows This root folder no longer exists as a warning above the results, even when the default folder has saved results.
rootFolderandscanare removed from the address. Scanning or picking another folder clears the message. - One scan at a time: while a scan runs, the root folder list, Choose another folder… and Scan are disabled, and coming back to Library Import during a scan shows that scan. Starting a new scan (from Settings) replaces the previous one: the old job still finishes on the server, but neither its answer nor a late load writes the page any more. Scanning a folder keeps the matches already saved for it.
- Library Import as a whole will be reworked after this PR (background work, cancellation, per-folder state): see this comment.
- Matching and adding go through Library Import...
Automated Canary build