I maintain the Genius Lyrics Source addon (https://www.mediamonkey.com/addons/brow ... ce-genius/, currently v1.0.4). It adds Genius .com as a lyrics source through Scripts/<addon>/helpers/lyricsSearch_add.js, the same way as the built-in lyricsSources addon.
Environment: MediaMonkey 2024.2.2.3222, Windows 11 (10.0.26200)
Problem:
Every lookup now ends in "Lyrics not found", for every song. The URLs are correct, for example genius .com/marilyn-manson-little-horn-lyrics and genius .com/metallica-welcome-home-sanitarium-lyrics, and both open normally in a browser.
In helpers/lyricsSearch.js, NotifyWebReq() loads the page with app.utils. web.getURLContentAsync(). The request fails, and the source's onFailure(err) receives only [null,null], with no HTTP status and no reason.
To find out why, I repeated the same request (same User-Agent header as NotifyWebReq) with app.utils. web.requestAsync(), whose doneCallback does report the status:
Code: Select all
re-request: genius .com/marilyn-manson-little-horn-lyrics
re-request status: 403
re-request response start: <!DOCTYPE html> <html lang="en"> <head> ... <title>Genius</title> ...Possible cause: NotifyWebReq() sends a fixed User-Agent from 2021:
Code: Select all
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36Requests:
- Could the rejection from getURLContentAsync include the HTTP status code and reason, and could LoadWebPageFailed pass that on to onFailure(err)? Then lyrics sources and other addons could log or handle failures meaningfully. (Related to the non-200 handling in #16757.)
- Could you check whether the hard-coded User-Agent in NotifyWebReq() is still appropriate?
- Is there a recommended way for a lyrics source to report "blocked by the site" (HTTP 403) differently from "lyrics not found", so users get a clearer message?