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

A popup menu appears with eight options: two for filling in missing
tags, three for orphaned library entries and three for location
profiles. Every entry has an underlined letter that you press in the
menu.

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.

Location profiles:

A location profile remembers what is different at a place: the audio
output, the speech output, the monitors for full screen and the on-air
view, the window position and the Launchpad outputs. It has nothing to
do with the server profile: the same station can run in the studio and
in the basement, each with the devices there. The profiles are stored
in the file Standorte.ini next to the program.

6. Detect location profile:
Checks the connected audio devices and screens and switches to the
matching profile; this also happens at every program start. A profile
fits when all its lead devices are present; if several fit, the one
with the most devices wins. If none fits, the values of RemotePLE.ini
apply. Sound that is playing is stopped when switching. The name of
the active profile is in the title bar and is announced.

7. Learn location profile:
Asks for a name and then for the lead devices: a list of all devices
that are present, all ticked at first. Only ticked devices must be
present later for the profile to fit. Untick devices that come and go
(for example a USB sound card) or are there everywhere (for example
the laptop speakers); the monitors are usually enough. At least one
device must stay ticked. If the name exists, RemotePLE asks before
replacing it. The current settings for outputs, monitors and windows
are stored; the "Default" audio output does not count as a device.

8. Delete location profile:
A submenu with one entry per profile; a confirmation comes before
deleting. If there is no profile, the entry says so.

While a profile is active, changes to outputs, monitors and window
position are written only to that profile, not to RemotePLE.ini.
