Sorting isn't always a choice between "keep it" and "drop it". Some tracks are worth keeping but aren't ready to play: they come with a baked-in intro or outro, the classic "DJ so-and-so in the mix" over the opening bars, and they need trimming before they make it into a set. Until now Osky Audio Player had no way to say that. With a November 17 commit it does: one key, *, that marks the track for editing without stopping the music.
It's a small change, 151 lines added across eight files and none removed, but it touches the heart of the project: one key per decision.
What the * key does
Press * and the file that's playing gets renamed with - EDITAR ("edit" in Spanish) added before the extension. Artist - Title.flac becomes Artist - Title - EDITAR.flac, and its .lrc, if there is one, goes along. Press * again and the mark comes off. Next to the AUTO indicator there's a new EDITAR chip that lights up when the track is marked and also works with the mouse.
What matters is what it doesn't do: it doesn't stop playback or move the file to another folder. You mark it and keep listening. Once you've decided, you send it to its destination with the usual number key, and at the end a search for "EDITAR" in your file browser turns up everything that still needs trimming. The mark text can be changed in the settings, which show an example of the resulting file name.
How it's built
The new function in library.rs is short and reuses what was already there:
pub fn toggle_edit_mark(src: &Path, suffix: &str) -> Result<Vec<(PathBuf, PathBuf)>, String> {
let dir = src.parent().ok_or("Ruta inválida")?;
let stem = src.file_stem().ok_or("Nombre inválido")?.to_string_lossy().into_owned();
let new_stem = match stem.strip_suffix(suffix) {
Some(clean) if !clean.trim().is_empty() => clean.to_string(),
_ => format!("{stem}{suffix}"),
};
let ext = src.extension().map(|e| format!(".{}", e.to_string_lossy())).unwrap_or_default();
let target = dir.join(format!("{new_stem}{ext}"));
if target.exists() {
return Err(format!("Ya existe {}", target.display()));
}
move_track(src, &target)
}
I like that it doesn't invent a new mechanism. Renaming is just moving to the same folder, so it calls move_track, which already knew how to bring the .lrc files along and already refused to overwrite. If a file with the new name exists, the mark isn't applied and the app tells you. The "never overwrite anything" rule from the very first commit holds without a single extra line.
The subtle part is not cutting the audio. The player keeps the path of the playing file so it can reopen it when it ends; the commit adds rename_path, which updates that path without touching playback. Then the backend emits a renamed event so the UI keeps the waveform it already computed instead of throwing it away and analyzing the file again.
Undo is part of it too. The mark goes onto the same stack as moves and deletions, so Ctrl+Z reverts it. There's a special case: if the record is a same-folder rename and the file is the one playing, only the name is restored, just like with the key, without stopping anything. Any other record is undone as before: release the file, move it back and play it again.

Finally, the setting is validated. If the mark text is empty or contains / or \, it falls back to - EDITAR, because an empty mark couldn't be detected and a slash would turn the name into a path.
What worries me
- The mark depends on the current text. To know whether a file is marked, the app checks whether its name ends with the text configured today. If I change
- EDITARto something else, tracks I marked earlier are no longer recognized, and pressing*on them stacks the new mark on top of the old one. I'd fix it by stripping any previously known mark, or at least warning when the text changes. - Validation falls short on Windows. It blocks
/and\, but Windows also rejects:,?,",<,>,|and*itself in file names. With any of those in the mark, the rename would fail with a system error instead of a clear explanation. - Undo guesses the record type. It tells a mark from a move because the file stayed in the same folder. It works today, since destinations are always other folders, but it's an implicit rule.
MoveRecordalready has atrashedflag; with three kinds of operation I'd switch to an explicitenum. - The default is duplicated.
- EDITARlives as a constant in Rust and again, typed by hand, inmain.js. If it ever changes, someone will update only one of them. - The old to-dos are still to-dos. Undo for Delete on macOS and the automated tests I mentioned in the previous review haven't moved.
toggle_edit_markis actually the easiest function in the whole project to test: a temp folder, a file, two calls.
What's next
What I'd do next, in order: tests for library.rs, starting with the mark since it's the simplest; an enum for undo-stack records; validating the mark against the characters each OS rejects; fixing undo on macOS; and the workflow that builds installers so any DJ can try it without installing Rust.
If this is your first time reading about the project, start with the first review: Twelve seconds and one key, and the previous one covers how Delete arrived.