fernandabruno / musixmatchR

Wrapper written in R for getting metadata from Musixmatch.
3 stars 1 forks source link

Add genre to track search #1

Closed dannijt closed 6 years ago

fernandabruno commented 6 years ago

Feature added =)

dannijt commented 6 years ago

Hello, thanks for your response! it appears it isn't working for me and in the code it looks like the genre section was actually removed? Let me know if I am not looking in the right place. Thank you.

fernandabruno commented 6 years ago

Hello! You are right: I added the feature without testing it enough. I notice that there's a problem with the list based on the genre. I am adjusting it this weekend.

Sorry for the trouble =/

dannijt commented 6 years ago

okay no worries : )

fernandabruno commented 6 years ago

Solution included. Please, try it to see if it helps you now =)

dannijt commented 6 years ago

Thank you! this works

dannijt commented 6 years ago

In your opinion, what is the best way to limit the print out to 1 or the closest values. I have been used head(x, 1) but there might be something more accurate. Let me know : )

fernandabruno commented 6 years ago

Glad that helped! I can add a new column with the first genre, does it help you?

dannijt commented 6 years ago

Hello! Thank you so much for editing this for me. I have a question and I've been struggling for a while. I Was wondering if you had time to answer a question for me.

I am using your package to get song genre for a list of 3,000 tracks. On a test sample, my function worked fine. But when i scaled up collection I am getting errors. And I think it because the API doesn't recognize the songs. I want to be able to still iterate over what the API DOES recognize and just return NA or an empty column for what isn't recognized rather than stopping the entire thing.

Error in data.frame(metadata, substring(pos, 2)) : 
  arguments imply differing number of rows: 0, 1
fernandabruno commented 6 years ago

Probably you are using a Free MusixMatch Developer account. This type of account is limited to 2k API Calls daily.

Do you think it makes sense?

dannijt commented 6 years ago

That does make sense which I will be looking out for in the future, but I get the same error message when I subset to 500. The error is that the output differs in the amount of variables in the input, which I think means one of the songs on my list isn't recognized.

fernandabruno commented 6 years ago

Do you mind sending me the search terms so I can test them here?

dannijt commented 6 years ago

Sure, all 3,000 of them?

fernandabruno commented 6 years ago

If you want to, you can send me them through email that is available on my profile page.

fernandabruno commented 6 years ago

I will make this genre issue solved and we can discuss the limit problem on another thread, ok?