Add test for adding artist, and allow artist as Artist or string

This commit is contained in:
hugovk 2014-03-01 23:54:45 +02:00
parent 7eb640fa88
commit bdb429cc8a
2 changed files with 22 additions and 3 deletions

View file

@ -2032,7 +2032,10 @@ class Library(_BaseObject):
"""Add an artist to this library."""
params = self._get_params()
params["artist"] = artist.get_name()
if type(artist) == str:
params["artist"] = artist
else:
params["artist"] = artist.get_name()
self._request("library.addArtist", False, params)