Admin Tools are hidden maintenance functions accessible via Ctrl+Shift+Alt+A.

A popup menu appears with five options: two for filling in missing
tags and three for orphaned library entries.

1. Fill tags completely:
   Fills the tag fields only if ALL five fields (Title, Artist, Album, Genre, Year)
   are empty for a track. Tracks with any existing tag data are skipped.

2. Fill tags granularly:
   Fills only the individual empty fields for each track.
   Existing values are left unchanged.

Both modes read the missing values from the original audio files
on a local copy of the server (e.g. a network drive E:\).

Procedure (two phases):
Phase 1 - Scan:
The database is scanned for tracks with empty fields.
For each found track, the corresponding local file is opened
and the tags are read (Title, Artist, Album, Genre, Year).
Results are cached in memory. At the end, the number of entries
that would be filled is announced and a Yes/No confirmation is shown.

Phase 2 - Write:
After confirmation, the cached values are written to the database.
No files are re-read in this phase.

Progress and abort:
A progress bar shows the current progress.
Press Escape to abort the operation.

All changes are logged in detail in the log file (PLELog).

Path input:
After opening the menu, you are prompted for the path to the local copy
of the server files (e.g. E:\). The mapping between the database path
and the local copy is done by replacing the drive letter.

Orphaned library entries:

An orphaned entry is a track that is listed in the RadioBOSS library
but whose file is no longer on the server. The three menu items below
find and clean up such entries. They work in the database only and
never delete an audio file.

3. Find and mark orphaned entries:

Checks every valid entry and sets those whose file is missing to
invalid. This step is reversible, nothing is deleted. RemotePLE
queries each directory only once instead of asking for every single
file, so even large libraries are checked within a few minutes.

Every run writes a report as a text file into the Backups folder next
to the program. It lists every affected track with path and reason and
ends with the totals. Read it before you delete anything in the next
step.

4. Check and delete orphaned entries:

Re-checks all entries marked invalid and shows the result as a tick
list. Initially ticked are the entries whose file is still missing.
The Delete button removes only those from the database, the Restore
button sets entries that were found again back to valid. Both act only
on ticked rows with the matching state and report afterwards how many
rows they left untouched. Deleting is preceded by a spoken warning and
a confirmation prompt. A button for which the list holds no matching
row is switched off and is skipped when tabbing; that is why the
announcement when the window opens names both numbers.

5. Restore the entries of one directory:

Asks for a directory on the server and checks only the invalid entries
below it. Ticked here are the entries that were found again, that is
exactly those the Restore button acts on. Useful after you have put
files back on the server.

Protection against false alarms:

Before every run all root paths are checked; if one is unreachable the
run does not start at all. If the connection drops during a run,
nothing is written. If a directory cannot be listed, RemotePLE first
looks for it with different upper and lower case: the database comes
from a Windows machine, whereas the server usually does distinguish
between capital and small letters. Only if that fails as well is the
directory treated as deleted, and it then appears separately in the
report.

Deleting removes every row of the track: the library assignments, the
tag row and the track itself. The audio file is never touched. Escape
aborts the check while it is running. The writing itself, that is
deleting and restoring, runs through; while it does, the buttons and
closing the window are blocked.
