v0.18.0: paste a link, get the song
File > Import from URL... runs trav's `song` helper (yt-dlp --extract-audio --audio-format mp3) from inside the app. Everything at the link downloads to a private temp dir and is imported as each song lands. "and add to current playlist?" puts the batch above the selected song, else at the end of the playing playlist, else at the end of the shown one, in the link's order. Each song goes straight into Identify Track. With no AcoustID key, the proposal comes from the filename alone. Album art now opens on a single click, in a window shaped like the cover and as big as the screen allows. Also fixed the dev fixture's play journal, which crashed startup (wrong shape) and would have been ignored anyway (wrong keys). The loader now skips a journal it can't read instead of aborting. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R5m9mXFPHNro78BdD69mG2
This commit is contained in:
@@ -245,6 +245,30 @@ persistence) → GUI (Qt widgets that read the manager and connect to its signal
|
||||
undated — so a second MusicBrainz call would return the same wrong year, and
|
||||
the file's own name is the only place 1961 exists.
|
||||
|
||||
- **`lintunes/url_import.py`** — `File → Import from URL…` (Round 49): trav's
|
||||
`song` shell helper (`yt-dlp --extract-audio --audio-format mp3 "$@"`) run
|
||||
from inside the app. Those flags are passed **verbatim**; everything else on
|
||||
the command line is plumbing: `-P <tempdir>`, `--print before_dl:LTSTART …`,
|
||||
`--print after_move:LTFILE %(filepath)s` and an `LTPROG` progress template,
|
||||
so output is read from markers rather than scraped. yt-dlp is a *runtime
|
||||
CLI tool* (`shutil.which`, the fpcalc pattern), never a pip dep, and needs
|
||||
ffmpeg for the mp3. **No `-o`**: yt-dlp's default `Title [id].mp3` is what
|
||||
`filename_tags` parses. `UrlImportWorker` (daemon thread, `ExportWorker`'s
|
||||
shape, shares the status-bar progress widgets and so `_busy_worker()`)
|
||||
downloads into a private `mkdtemp`, emits `downloaded(path)` per song, and
|
||||
the GUI imports each one *as it lands*, through the normal `import_files`
|
||||
(a copy into the organized tree) and straight into the Identify queue, so
|
||||
song 1's dialog can be up while song 5 downloads. The GUI deletes the temp
|
||||
dir only on `finished`/`failed`, which are queued after every `downloaded`.
|
||||
`resolve_target` is the rule for "and add to current playlist?": above the
|
||||
selected song in the shown playlist, else the end of the *playing*
|
||||
playlist, else the end of the shown one, else the checkbox is grayed.
|
||||
Smart/folder/system playlists are never targets. A batch keeps the link's
|
||||
order (`position + songs already inserted`). With no AcoustID key,
|
||||
`TrackIdentifier` proposes from the filename alone and never touches fpcalc
|
||||
or the network. Only a URL import reaches that path, since the menu route
|
||||
still insists on setup first.
|
||||
|
||||
- **`lintunes/mpris.py`** — registers `org.mpris.MediaPlayer2.lintunes` over D-Bus
|
||||
so the desktop's media keys / now-playing popup control playback. Spacebar and
|
||||
arrow keys are handled locally via `MainWindow.eventFilter`.
|
||||
|
||||
Reference in New Issue
Block a user