Skip to content

allmusic: add tests and handle some edge cases

tycho requested to merge tycho_a/yadg:issue-24 into develop

Handle release without artist, track without artist, track without title and release with no tracks.

I don't have a release with tracks without title so I can't test that but it should be handled.

I also want to test and handle not found release but allmusic doesn't return 404s, it redirects either to the home page if the url is incorrect (like with an incomplete id: https://www.allmusic.com/album/release/selected-ambient-works-85-92-mr99) or to the search page if it's correct but the id doesn't exist (https://www.allmusic.com/album/release/selected-ambient-works-85-92-mr9999999999).

So I was thinking about disabling request redirects using get_request_kwargs and checking for 301 StatusCodeError in handle_initial_data_exception and returning either a ListResult through SearchScraper or NotFoundResult depending on the redirect location. So far my quick try isn't working but I'll investigate further tomorrow.

Edited by tycho

Merge request reports