Repository navigation
Lyrics from more sources, desktop themes, artist and song stats - #40
Merged
Merged
Conversation
Every source that's on is asked at once. The first one in your order with timed lyrics is shown, and plain text only when none had timing. A source that's off is never contacted. Sources: BetterLyrics, lrc.red, YouTube Music synced, LRCLIB, KuGou, Unison, YouTube Music plain and Genius. Settings > Integrations has a "Lyrics sources" window to reorder them and switch each on or off. The lyrics header has a small picker listing the sources that found lyrics for the song, and a pick holds for that song this session. The old LRCLIB switch carries over: off stays off. LRC fractions are now read by their digit count, so [00:01.05] is 1.05 s, not 1.5 s. The approach follows BitChord's (github.com/kushagrasinghx/BitChord).
The icon that takes a track number's place on hover was centred in the whole number column, so it landed right of the number and reached into the gap before the title. It now ends where the numbers end, and so does the loading spinner. The row test now looks for the number itself rather than any text in the column.
… the system's Six new built-in themes: macOS Dark and Light, Windows Dark and Light (Windows 11 Fluent), and Breeze Dark and Light (KDE Plasma). Existing installs get them in their themes folder on the next start. A first start on a Mac uses macOS Dark, and on Windows uses Windows Dark, with the matching light theme for light mode. Linux keeps Classic. A settings file that already exists keeps the theme it names, so nobody's look changes on an update.
Two more entries in the theme list, offered in both modes: "GTK" and "Qt". Like Chrome's, they take their colours from the desktop. Qt's come from kdeglobals and the colour scheme it names. GTK's come from the GTK theme's named colours, read by refryt in a child process. Both are read again when the window regains focus, so a change of desktop theme follows. Picking one sets it for light and dark alike.
…sources window fits its rows A settings row whose description wraps past two lines grew taller, but its last line sat on the row's bottom edge. It now keeps 10 px under it. Rows whose words fit are unchanged. In the Lyrics sources window each source's switch left the list's cursor halfway down its row, so every row started 21 px inside the one before and they overlapped, leaving empty space under the list. The switches are now placed apart from the list, and the card's height is measured from its title, description and buttons.
Ending it at the numbers' right edge put it left of the usual one-digit track number. It now sits over the number for tracks 1 to 9, and still covers a two-digit one.
For Japanese, Korean and Chinese songs, a lyrics source with romanised lines now wins over higher ones without, and each line leads with the romanisation, the original smaller under it. The first lyrics found still show at once; a romanised answer replaces them when it arrives. Romanisation comes from Apple Music's lyrics (BetterLyrics, lrc.red), which carry it alongside the lines, and from LRC files that hold the song in Japanese and again in romaji under the same timestamps: those twins are joined into one line, when they read as romaji across the whole file. The picker marks a source that has it. The setting is "Prefer romanised lyrics" in Settings.
Reading the GTK colours starts a child process, about 0.13 s of CPU and 85 MB each time. It ran in the background at startup and again whenever the window came back into focus, even for people not using the GTK theme. Now it runs only when GTK is the light or dark theme, or once Settings, where it's offered, is open. Qt's theme is still re-read on focus.
Genius has only plain lyrics, and every song meant scraping a page of about 615 KB. It was also the slowest source but one (around 0.6 s). The other sources already cover it, synced ones included. A saved order that still lists Genius drops it.
Clicking an artist or song in Stats' top lists, or "Your stats" in a song's menu, opens a page of your listening to it, worked out from the play log: - plays, listening time, and when you first and last played it - its rank all-time and over 6 months, and the most plays in one day - for an artist: the songs of theirs you've played, your top 10, and your first song by them - plays by month (by year for a long history) The header plays the song or the artist's top songs. An artist's stats link to their artist page, and a song's to its artist's stats. The artist page gets a stats button beside Mix and Shuffle. The line under the name now names a top-10 rank, "Your #2 artist" or "Your #3 artist this month", and otherwise the plays ("N total plays by you"). That line is a point larger.
…p quits first The helper that reads the GTK colours is a second copy of refryt. If the app quit while GTK was still starting in it, the helper's println! hit a closed pipe and panicked, and since the crash hook was already installed, the next launch offered a crash report as if refryt had crashed. The helper now writes its answer without panicking, and starts before the log and the crash hook, so its failing only costs the GTK theme.
… stats The README read flat. It now speaks to the reader, lists the stats pages and lyrics sources, counts 29 themes plus GTK and Qt, and says more about installing: AppImage managers, which builds update themselves, SmartScreen's "Run anyway", and that the AUR packages may lag behind.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Everything since 0.3.2, for 0.3.3.
Lyrics
Themes
Stats
Fixes
Tested on Linux: fmt, clippy
-D warnings, 688 + 58 tests, and the app itself (screenshots of the stats and artist pages, lyrics sources, theme switching). Windows and macOS are checked by CI.