Commit Graph
17 Commits
Author SHA1 Message Date
yiannisha 36be67b827 Revert "Can now download all of an artists songs fixes#88"
This reverts commit 41b09712e5.
2021-10-24 19:32:32 +03:00
yiannisha 40086384b0 Can now download all of an artists songs fixes#88 2021-10-24 19:18:18 +03:00
yiannisha 41b09712e5 Can now download all of an artists songs fixes#88 2021-10-24 19:09:58 +03:00
yiannisha 18fca559b3 Added argument parsing in search function
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.
2021-10-24 18:07:12 +03:00
yiannisha 1c62ff6604 Merge branch 'main' of https://github.com/Footsiefat/zspotify 2021-10-24 17:00:37 +03:00
yiannisha ed565fa0ce Merge branch 'main' into search_options 2021-10-23 19:22:24 +03:00
yiannisha efed684e59 Fixed minor bugs 2021-10-23 19:13:04 +03:00
yiannisha a02b2f03d1 Merge branch 'main' of https://github.com/Footsiefat/zspotify into Footsiefat-main 2021-10-23 18:59:25 +03:00
yiannisha 6050630407 Merge branch 'search_options' 2021-10-23 17:22:19 +03:00
yiannisha e9ba63b9d0 Added argument parsing in search function
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.
2021-10-23 17:15:41 +03:00
yiannisha 7d81eb5cc6 Rewrote the search function
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.
2021-10-23 16:06:34 +03:00
yiannisha 3c3a2acf27 Merged with up to date zspotify.py 2021-10-22 21:21:57 +03:00
yiannisha 07c1a6a3df Fixed minor error in download_artist_albums 2021-10-21 23:40:40 +03:00
yiannisha 1bd12be1dd Modified get_artist_album 2021-10-21 23:38:58 +03:00
yiannisha 126ebe2046 Added download_artist_albums
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.
2021-10-21 23:27:02 +03:00
yiannisha 92090512d0 Added get_artist_albums
Added the get_artist_albums(access_token, artist_id)
function that returns a list of tuples that each
contain the name and the id of an album.
2021-10-21 23:15:09 +03:00
yiannisha 822b696dc4 Added Artist String Id in regex_input_for_urls 2021-10-21 23:13:39 +03:00