Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

beets can't fetch lyrics from lrclib.net #5102

Open
apioche opened this issue Feb 10, 2024 · 7 comments · May be fixed by #5406
Open

beets can't fetch lyrics from lrclib.net #5102

apioche opened this issue Feb 10, 2024 · 7 comments · May be fixed by #5406
Assignees
Labels
bug bugs that are confirmed and actionable needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature."

Comments

@apioche
Copy link

apioche commented Feb 10, 2024

I want to fetch synced lyrics from lrclib but beet can't find them even if i can find them manually on lrclib.
Here's my config:

plugins: fromfilename lastgenre lyrics
lyrics:
  sources: lrclib
  synced: yes

@jackwilsdon
Copy link
Member

Can you please fill out a bit more of the bug report template? It helps us work out what's going on. Specifically:

  • Verbose command output (with -vv)
  • beets version
  • Output of beet config

The full template can be found here: https://github.com/beetbox/beets/blob/master/.github/ISSUE_TEMPLATE/bug-report.md?plain=1

@jackwilsdon jackwilsdon added the needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature." label Feb 15, 2024
@gderber
Copy link

gderber commented May 8, 2024

Not OP, but here is my info:


name: "\U0001F41B Bug report"
about: Lyrics not found when using lrclib


Problem

Running this command in verbose (-vv) mode:

$ beet -vv lyrics -f Metallica Load

user configuration: /home/user/.config/beets/config.yaml
data directory: /home/user/.config/beets
plugin paths:
inline: adding item field multidisc
inline: adding item field lmultidisc
Sending event: pluginload
library database: /home/user/.config/beets/library.db
library directory: /home/user/Music
Sending event: library_opened
lyrics: lyrics not found: Metallica - Load - 01. Ain’t My Bitch (5:04)
lyrics: lyrics not found: Metallica - Load - 02. 2 × 4 (5:28)
lyrics: lyrics not found: Metallica - Load - 03. The House Jack Built (6:38)
lyrics: lyrics not found: Metallica - Load - 04. Until It Sleeps (4:29)
lyrics: lyrics not found: Metallica - Load - 05. King Nothing (5:28)
lyrics: lyrics not found: Metallica - Load - 06. Hero of the Day (4:21)
lyrics: lyrics not found: Metallica - Load - 07. Bleeding Me (8:18)
lyrics: lyrics not found: Metallica - Load - 08. Cure (4:54)
lyrics: lyrics not found: Metallica - Load - 09. Poor Twisted Me (4:00)
lyrics: lyrics not found: Metallica - Load - 10. Wasting My Hate (3:57)
lyrics: lyrics not found: Metallica - Load - 11. Mama Said (5:19)
lyrics: lyrics not found: Metallica - Load - 12. Thorn Within (5:51)
lyrics: lyrics not found: Metallica - Load - 13. Ronnie (5:17)
lyrics: lyrics not found: Metallica - Load - 14. The Outlaw Torn (9:48)
lyrics: lyrics not found: Metallica - Reload - 01. Fuel (4:29)
lyrics: lyrics not found: Metallica - Reload - 02. The Memory Remains (4:39)
lyrics: lyrics not found: Metallica - Reload - 03. Devil’s Dance (5:18)
lyrics: lyrics not found: Metallica - Reload - 04. The Unforgiven II (6:36)
lyrics: lyrics not found: Metallica - Reload - 05. Better Than You (5:21)
lyrics: lyrics not found: Metallica - Reload - 06. Slither (5:13)
lyrics: lyrics not found: Metallica - Reload - 07. Carpe Diem Baby (6:12)
lyrics: lyrics not found: Metallica - Reload - 08. Bad Seed (4:05)
lyrics: lyrics not found: Metallica - Reload - 09. Where the Wild Things Are (6:54)
lyrics: lyrics not found: Metallica - Reload - 10. Prince Charming (6:05)
lyrics: lyrics not found: Metallica - Reload - 11. Low Man’s Lyric (7:37)
lyrics: lyrics not found: Metallica - Reload - 12. Attitude (5:16)
lyrics: lyrics not found: Metallica - Reload - 13. Fixxxer (8:14)
Sending event: cli_exit

Led to this problem:

Modified config to use lrclib with synced lyrics

Setup

  • OS: debian trixie
  • Python version: 3.11.8
  • beets version: 1.6.0
  • Turning off plugins made problem go away (yes/no): No

My configuration (output of beet config) is:

lyrics:
    bing_lang_from: []
    auto: yes
    sources: lrclib
    synced: yes
    bing_client_secret: REDACTED
    bing_lang_to:
    google_API_key: REDACTED
    google_engine_ID: REDACTED
    genius_api_key: REDACTED
    fallback:
    force: no
    local: no

plugins:
- chroma
- fromfilename
- acousticbrainz
- embedart
- fetchart
- lastgenre
- lyrics
- mbsync
- metasync
- replaygain
- bucket
- inline
- the
- badfiles
- duplicates
- info
- mbcollection
- mbsubmit
- missing
- random
- types
- alternatives

asciify_paths: yes

format_item: $artist - $album - $track. $title ($length)
format_album: $albumartist - $album
sort_item: albumartist+ album+ disc+ track+
per_disc_numbering: yes
terminal_encoding: utf8

clutter:
- Thumbs.DB
- .DS_Store
- '*.m3u'
- .pls
- '*.jpg'
max_filename_length: 64
id3v23: yes

import:
    write: yes
    copy: yes
    move: no
    link: no
    hardlink: no
    resume: ask
    quiet: no
    log: ~/tmp/beetslog
    detail: yes

musicbrainz:
    user: gderber
    pass: REDACTED

match:
    strong_rec_thresh: 0.08
    max_rec:
        missing_tracks: low
        unmatched_tracks: medium
        track_length: strong
    preferred:
        countries:
        - US
        - XW
        - CA
        - XE
        - GB|UK
        - AU
        - DE
        media: [CD, Digital Media|File]

paths:
    singleton: '%ifdef{sort,$sort,Unsorted}/%ifdef{album_holiday,$album_holiday}%ifdef{soundtrack_type,$soundtrack_type}/%the{%asciify{$albumartist}}/Non-Album/%the{%asciify{$title}}'
    comp: '%ifdef{sort,$sort,Unsorted}/%ifdef{album_holiday,$album_holiday}%ifdef{soundtrack_type,$soundtrack_type}/%the{%asciify{$albumartist}}/%the{%asciify{$album}}/%if{$multidisc,%if{$lmultidisc,$disc,%right{$disc,1}}}$track - %asciify{$title}'
    default: '%ifdef{sort,$sort,Unsorted}/%ifdef{album_holiday,$album_holiday}%ifdef{soundtrack_type,$soundtrack_type}/%the{%asciify{$albumartist}}/%ifdef{series,%the{$series}}/%ifdef{series_no,$series_no - }%the{%asciify{$album}}/%if{$multidisc,%if{$lmultidisc,$disc,%right{$disc,1}}}$track - %asciify{$title}'
chroma:
    auto: yes
acousticbrainz:
    auto: yes
    force: no
    tags: []
edit:
    itemfields: track title artist album
    albumfields: album albumartist
embedart:
    auto: yes
    compare_threshold: 0
    ifempty: yes
    maxwidth: 0
    remove_art_file: no
    quality: 0

fetchart:
    auto: yes
    cautious: yes
    cover_names: cover front art album folder
    minwidth: 480
    maxwidth: 0
    quality: 0
    max_filesize: 0
    enforce_ratio: no
    sources:
    - filesystem
    - coverart
    - itunes
    - amazon
    - albumart
    google_key: REDACTED
    google_engine: 001442825323518660753:hrh5ch1gjzm
    fanarttv_key: REDACTED
    lastfm_key: REDACTED
    store_source: no
    high_resolution: no
    deinterlace: no
    cover_format:
ftintitle:
    auto: no
    format: feat. {0}
keyfinder:
    auto: no
lastgenre:
    auto: yes
    fallback: ''
    source: album
    whitelist: ~/.config/beets/genres.txt
    min_weight: 10
    count: 1
    canonical: no
    force: yes
    separator: ', '
    prefer_specific: no
    title_case: yes
metasync:
    source: amarok
replaygain:
    backend: gstreamer
    overwrite: yes
    targetlevel: 89
    auto: yes
    threads: 8
    parallel_on_import: no
    per_disc: no
    peak: 'true'
    r128: [Opus]
    r128_targetlevel: 84
bucket:
    bucket_year: [1980-89]
    extrapolate: yes
    bucket_alpha: []
    bucket_alpha_regex: {}
item_fields:
    multidisc: 1 if disctotal > 1 else 0
    lmultidisc: 1 if disctotal > 9 else 0

the:
    a: yes
    the: yes
    patterns: []
    strip: no
    format: '{0}, {1}'
thumbnails:
    force: yes
badfiles:
    commands:
        ogg: myoggchecker --opt1 --opt2
        flac: flac --test --warnings-as-errors --silent
duplicates:
    album: no
    checksum: ''
    copy: ''
    count: no
    delete: no
    format: ''
    full: no
    keys: []
    merge: no
    move: ''
    path: no
    tiebreak: {}
    strict: no
    tag: ''
mbcollection:
    auto: no
    collection: ''
    remove: no
mbsubmit:
    threshold: medium
    format: $track. $title - $artist ($length)
missing:
    format: $albumartist - $album - $track - $title
    count: no
    total: no
    album: no
types:
    rating: int
    playcount: int

Not really sure if that helps or not.

https://lrclib.net/search/Metallica%20Hero%20of%20the%20Day for example exists.

@jgregoire
Copy link

jgregoire commented Aug 12, 2024

I also have this issue.

beets version 1.6.0
Python version 3.11.2
plugins: convert, embedart, fetchart, ftintitle, lastgenre, lyrics, mpdupdate, random, replaygain, smartplaylist

@Zerodya
Copy link

Zerodya commented Aug 25, 2024

Same here, I get a lyrics: lyrics not found: error for every track when I use the lrclib source.

I can't use other sources because Navidrome only supports synced lyrics, and lrclib is the only source where I can get them from.

My lyrics config:

lyrics:
    bing_lang_from: []
    force: yes
    sources: lrclib
    synced: yes
    auto: yes
    bing_client_secret: REDACTED
    bing_lang_to:
    google_API_key: REDACTED
    google_engine_ID: REDACTED
    genius_api_key: REDACTED
    fallback:
    local: no

Maybe LRCLIB had some API changes under the hood?

Although we intend to maintain backward compatibility, please be aware that there may be breaking changes in future updates.

@snejus
Copy link
Member

snejus commented Aug 26, 2024

I have fixed this issue locally, will submit a PR in a couple of days!

@snejus snejus added the bug bugs that are confirmed and actionable label Aug 26, 2024
@snejus snejus self-assigned this Aug 26, 2024
@snejus snejus linked a pull request Sep 4, 2024 that will close this issue
3 tasks
@snejus snejus linked a pull request Sep 4, 2024 that will close this issue
3 tasks
@snejus
Copy link
Member

snejus commented Sep 4, 2024

The PR with a fix has not been submitted.

Maybe LRCLIB had some API changes under the hood?

The issue was with the plugin implementation: see part of the diff from the PR:
image

Previously the plugin attempted to get lyrics for a specific album, artist, title and duration combination where your local track details were unlikely to specifically match whatever's available on LRCLib.

I updated the implementation to perform a search instead - this way, I discovered, it found lyrics for most of the tracks I was interested in.

Additionally, LRCLib is now prioritised over other sources in the default configuration since the search is quick and reliable, and it provides high quality lyrics.

snejus added a commit that referenced this issue Sep 11, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Sep 11, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Sep 19, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Sep 19, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Sep 21, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
@BANanaD3V
Copy link

same issue. will this get merged?

snejus added a commit that referenced this issue Sep 29, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Oct 1, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit to snejus/beets that referenced this issue Oct 2, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(beetbox#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Oct 3, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Oct 3, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Oct 3, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Oct 3, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Oct 12, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Oct 12, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Oct 12, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Oct 12, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Oct 18, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Oct 30, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Nov 22, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit to snejus/beets that referenced this issue Dec 5, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(beetbox#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
snejus added a commit that referenced this issue Dec 7, 2024
Create 'helpers.ConfigMixin' which sets up testing configuration.
This is helpful for tests (e.g. test_lyrics.py) that only need the
configuration and do not require temp dir.

(#5102) Refactor lyrics tests to fix the issue global beets config
issue.

Additionally, add 'integration_test' mark that can be used to mark tests
that should only run once a week.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs that are confirmed and actionable needinfo We need more details or follow-up from the filer before this can be tagged "bug" or "feature."
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants