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

Map properly MusicBrainz to Spotify track while searching #29

Closed
skuill opened this issue Feb 4, 2022 · 2 comments
Closed

Map properly MusicBrainz to Spotify track while searching #29

skuill opened this issue Feb 4, 2022 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@skuill
Copy link
Owner

skuill commented Feb 4, 2022

Spotify don't use MBID and use it's own ID for artists/tracks.
We can't compare artistName. For example for artist "ноганно" actual spotify name is "noganno".
Now we return first result from searching artist/track.

For example (false search):
image

@skuill skuill added bug Something isn't working enhancement New feature or request labels Feb 4, 2022
@skuill skuill self-assigned this Feb 4, 2022
@skuill
Copy link
Owner Author

skuill commented Oct 23, 2022

  1. Search with Market set does not work:
    var searchArtist = await _spotifyClient.Search.Item(new SearchRequest(SearchRequest.Types.Artist, name) { Market = "RU"});
    Error logs:
    2022-10-23 13:58:15.933 +00:00 [Error] [MusicSearcher.MusicSearcherClient] Can't get artist from music service [SpotifyServiceClient] SpotifyAPI.Web.APIException: Unlaunched market at SpotifyAPI.Web.Http.APIConnector.ProcessErrors(IResponse response) at SpotifyAPI.Web.Http.APIConnector.DoRequest(IRequest request) at SpotifyAPI.Web.Http.APIConnector.DoSerializedRequest[T](IRequest request) at SpotifyAPI.Web.Http.APIConnector.SendAPIRequest[T](Uri uri, HttpMethod method, IDictionary2 parameters, Object body, IDictionary2 headers) at MusicSearcher.MusicService.Spotify.SpotifyServiceClient.SearchArtistByName(String name) in C:\Projects\ConcertBuddy\ConcertBuddy\MusicSearcher\MusicService\Spotify\SpotifyServiceClient.cs:line 84 at MusicSearcher.MusicSearcherClient.SearchArtistByMBID(String artistMBID) in C:\Projects\ConcertBuddy\ConcertBuddy\MusicSearcher\MusicSearcherClient.cs:line 139
  1. Search with country ISO code in query does not work (return the same result as without it):
    var searchArtist = await _spotifyClient.Search.Item(new SearchRequest(SearchRequest.Types.Artist, name + " RU"));

  2. But search with area (country) full name does not work (return empty collection of artists items):
    var searchArtist = await _spotifyClient.Search.Item(new SearchRequest(SearchRequest.Types.Artist, name + " Russia"));

@skuill
Copy link
Owner Author

skuill commented Oct 23, 2022

We only could compare artists by name. There is not any information about artists alternative names or countries to compare..
Workaround: Try to return first artist after search with the same name. Otherwise return first from a collection

skuill added a commit that referenced this issue Oct 23, 2022
… return first artist after search with the same name. Otherwise return first from a collection. +UnitTests
@skuill skuill added the deploy Fix is ready and merged. Need to deploy label Oct 23, 2022
skuill added a commit that referenced this issue Oct 23, 2022
… Some hyphen from MusicBrainz are the wrong hyphen. Added UnitTest
skuill added a commit that referenced this issue Oct 28, 2022
@skuill skuill closed this as completed Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant