Added a block for parsing arguments passed with options
-l -limit
-t -type
in the search_term. They work as follows:
* -l -limit <number> : sets the limit of results to that number
and raises a ValueError if that number exceeds 50. Default is 10.
* -t -type <album/track/playlist> : sets the type that is requested
from the API about the search query. Raises a ValueError if an arguments
passed are different than track, album, playlist. Default is all three.
Example:
Enter search or URL: <query> -l 30 -t track album
This will result with 30 tracks and 30 albums associated with query.
Options can be passed in any order but the query must be first.
Added a block for parsing arguments passed with options
-l -limit
-t -type
in the search() function. Arguments are passed inside search_term.
They work as follows:
* -l -limit <number> : sets the limit of results to that number
and raises a ValueError if that number exceeds 50. Default is 10.
* -t -type <album/track/playlist> : sets the type that is requested
from the API about the search query. Raises a ValueError if an arguments
passed is different than track, album, playlist. Default is all three.
Example:
Enter search or URL: <query> -l 30 -t track album
This will result with 30 tracks and 30 albums associated with query.
Options can be passed in any order but the query must be first.
It still works in the same way and no
other functions need to be changed. Just
changed it to store needed data about each
track/album/playlist in a dictionary so
tracking it in the end is simpler.
Added a function to be called in client if
artist_id_str is not None;
download_artist_albums(artist_id_str) that
uses the get_artist_album function to get the
artist's album id's and then downloads each one
with the download_album function.
Also modified get_artist_album function to return
a list of album ids instead of a list of tuples
of album ids and names.