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

Structure of return from track.search is different if there is one match only #46

Closed
Sleft opened this issue Jan 14, 2013 · 2 comments
Closed

Comments

@Sleft
Copy link

Sleft commented Jan 14, 2013

If there is only one match

@lastfm.track.search(track: song.to_search_term)['results']['trackmatches']['track']

returns a hash but otherwise it returns an array. Is this intended?

Currently I hack around this fact by putting the resulting hash in an array if there only one match.

@youpy youpy closed this as completed in d4c9ec2 Jan 14, 2013
@Sleft
Copy link
Author

Sleft commented Jan 14, 2013

That was fast. Thanks!

@youpy
Copy link
Owner

youpy commented Jan 14, 2013

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants