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

Fix lrclib lyrics #5406

Open
wants to merge 26 commits into
base: master
Choose a base branch
from
Open

Fix lrclib lyrics #5406

wants to merge 26 commits into from

Commits on Oct 1, 2024

  1. Fix fetching lyrics from lrclib

    Adjust the base URL to perform a '/search' instead of attempting to
    '/get' specific lyrics where we're unlikely to find lyrics for the
    specific combination of album, artist, track names and the duration (see
    https://lrclib.net/docs).
    
    Since we receive an array of matching lyrics candidates, rank them by
    their duration similarity to the item's duration, and whether they
    contain synced lyrics.
    snejus committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    5b9bfa2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8eff52f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b51ce93 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    02df047 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    aefb00d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    3a0d78a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c662a92 View commit details
    Browse the repository at this point in the history
  8. lyrics: isolate test configuration

    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 committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    595c2b2 View commit details
    Browse the repository at this point in the history
  9. Centralize requests setup with requests.Session

    Improve requests performance with requests.Session which uses connection
    pooling for repeated requests to the same host.
    
    Additionally, this centralizes request configuration, making sure that
    we use the same timeout and provide beets user agent for all requests.
    snejus committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    9d3fbc1 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    0a3b9cb View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e15625d View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2f5fa21 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    60e6cbe View commit details
    Browse the repository at this point in the history
  14. Do not handle empty lyrics html case

    Due to request error handling this logic will only run for successful
    requests, so we can safely assume the html to be a string.
    snejus committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    30b7ef7 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    51ae847 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    e221f06 View commit details
    Browse the repository at this point in the history
  17. Use a single slug implementation

    Tidy up 'Google.is_page_candidate' method and remove 'Google.sluggify'
    method which was a duplicate of 'slug'.
    
    Since 'GeniusFetchTest' only tested whether the artist name is cleaned
    up (the rest of the functionality is patched), remove it and move its
    test cases to the 'test_slug' test.
    snejus committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    ec00c75 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    bc155c9 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    4ba48ca View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    3d8b2c8 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    2ead06e View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    58d6071 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    aba3776 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    f0ee0a1 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    9399f66 View commit details
    Browse the repository at this point in the history
  26. try out integration test

    snejus committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    16cfd91 View commit details
    Browse the repository at this point in the history