feat: add lyrics support - #496
Conversation
b53dad1 to
9f3fc38
Compare
9f3fc38 to
c50626e
Compare
Coverage Report for CI Build 31704789072Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 100.0%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Coverage Report for CI Build 32845250442Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 100.0%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
There was a problem hiding this comment.
Pull request overview
Adds embedded, external, and uploaded LRC lyrics support to the media library and player.
Changes:
- Extracts, stores, parses, displays, and synchronizes lyrics.
- Adds administrative LRC uploads and full-library synchronization.
- Adds player lyrics controls, styling, API endpoints, and tests.
Reviewed changes
Copilot reviewed 47 out of 55 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
test/test_helper.rb |
Adds lyrics test helpers. |
test/models/song/lyrics/parser_test.rb |
Tests LRC parsing. |
test/models/song/lyrics_test.rb |
Tests lyrics retrieval and uploads. |
test/models/media_test.rb |
Tests lyrics synchronization. |
test/models/media_file_test.rb |
Tests embedded lyrics extraction. |
test/jobs/media_sync_all_job_test.rb |
Tests full-sync behavior. |
test/fixtures/files/sample.lrc |
Adds an LRC fixture. |
test/controllers/songs/lyrics_controller_test.rb |
Tests lyrics endpoints. |
test/controllers/songs_controller_test.rb |
Tests song editing and API updates. |
test/controllers/media_syncing_controller_test.rb |
Tests full-sync requests. |
db/schema.rb |
Adds the lyrics column. |
db/migrate/20260806103000_add_lyrics_to_songs.rb |
Migrates song lyrics storage. |
config/routes.rb |
Adds lyrics and song-edit routes. |
config/locales/en.yml |
Adds lyrics and sync labels. |
config/brakeman.ignore |
Reformats existing ignore metadata. |
app/views/songs/lyrics/show.json.jbuilder |
Returns raw lyrics as JSON. |
app/views/songs/lyrics/show.html.erb |
Renders parsed lyrics. |
app/views/songs/edit.html.erb |
Adds the LRC upload form. |
app/views/songs/_song.html.erb |
Adds song editing access. |
app/views/shared/_player.html.erb |
Adds the lyrics toggle. |
app/views/shared/_icons.html.erb |
Updates the lyrics icon. |
app/views/shared/_empty_alert.html.erb |
Supports custom empty messages. |
app/views/settings/libraries/show.html.erb |
Adjusts library sync layout. |
app/views/media_syncing/_button.html.erb |
Adds quick/full sync choices. |
app/views/layouts/lyrics.html.erb |
Adds the lyrics frame layout. |
app/views/layouts/application.html.erb |
Integrates the lyrics panel. |
app/views/albums/show.html.erb |
Adds song editing access. |
app/models/song/lyrics/parser.rb |
Implements LRC parsing. |
app/models/song/lyrics.rb |
Implements lyrics loading and uploads. |
app/models/song.rb |
Includes lyrics behavior. |
app/models/media.rb |
Persists synchronized lyrics. |
app/models/media_file.rb |
Extracts embedded lyrics. |
app/jobs/media_sync_all_job.rb |
Adds full synchronization. |
app/javascript/player.js |
Exposes seek events and playback time. |
app/javascript/controllers/player_controller.js |
Manages the lyrics panel. |
app/javascript/controllers/mini_player_controller.js |
Updates the player selector. |
app/javascript/controllers/lyrics_controller.js |
Synchronizes displayed lyrics. |
app/javascript/controllers/index.js |
Registers the lyrics controller. |
app/helpers/song_helper.rb |
Exposes lyrics URLs. |
app/helpers/application_helper.rb |
Extends loader and alert helpers. |
app/controllers/songs/lyrics_controller.rb |
Serves song lyrics. |
app/controllers/songs_controller.rb |
Handles lyrics uploads. |
app/controllers/media_syncing_controller.rb |
Enqueues full synchronization. |
app/assets/stylesheets/settings/theme.css |
Adds lyrics theme variables. |
app/assets/stylesheets/components/lyrics.css |
Styles the lyrics panel. |
app/assets/stylesheets/components/button.css |
Styles active icon buttons. |
app/assets/stylesheets/application.css |
Imports lyrics styles. |
Suppressed comments (1)
app/views/media_syncing/_button.html.erb:25
data-turbo-submits-withis attached to the form here, so Turbo will not swap the Full Sync button text while submitting. Put this attribute in thebutton_todata:option, as the previous single sync button did.
form: { data: { "turbo-submits-with" => t("button.syncing") } }
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Fix #156