search icon indicating copy to clipboard operation
search copied to clipboard

ccMixter search incorrect data response resolved

Open SisiVero opened this issue 4 months ago • 1 comments

Fixes

  • Fixes #250 by @Netacci

Description

Issue: An error was encountered when attempting to include zero as a license type in the rights variable for queries to the ccMixter API. The query string that included zero resulted in an invalid request, leading to an error response from the API.

Cause: The ccMixter API does not recognize zero as a valid license type in its query format. As zero was causing the error, the issue was identified to be a misrepresentation of the license type.

Solution: To resolve this issue, I replaced zero with cc0 in the query string. The updated code now correctly handles the public domain license type, avoiding any query errors.

Changes made:

  1. Replaced zero with cc0 to properly represent the public domain license type.
  2. Ensured that the query string is formatted correctly for the ccMixter API.

Tests

  1. After updating the license type in the query string, I tested the API request to verify that the error was resolved and the request was successful.
  2. The API now responds correctly with the expected results when cc0 is used instead of zero.

Screenshots

workingCCmixter

Checklist

  • [x] My pull request has a descriptive title (not a vague title like Update index.md).
  • [x] My pull request targets the default branch of the repository (main or master).
  • [x] My commit messages follow [best practices][best_practices].
  • [x] My code follows the established code style of the repository.
  • [x] I added or updated tests for the changes I made (if applicable).
  • [ ] I added or updated documentation (if applicable).
  • [x] I tried running the project locally and verified that there are no visible errors.

SisiVero avatar Oct 10 '24 09:10 SisiVero