Feature Proposal : New albums based on your top genres
watteria opened this issue · comments
Hello, I wanted to propose the option that the list of albums be made according to the ranking of styles most listened to by your user. Also that you can choose if you want to search worldwide or specify the country
I would use the style ranking for sure. Try it out if you like.
I think i got it.
I have restructured a bit to make it more practical
I have separated the ideas into classes and I have put them in the /classes directory inside you will find:
userClass.py : User class where I receive the list of my top 40 styles from spotify, it is done from the set_user_top_genres function and is saved in the userClass.genres property
playlistClass.py : Class of the playlist that stores in property “accepted” the list of albums to be uploaded, in rejected_by_genre the list of albums that have been discarded from rejects.py and rejected_by_my_top the list of albums that have been discarded for not being in my list of genres
The function get_spotify_songs_from_playlist is not used, do you need it for something?
remove_rejects function filters albums based on rejects.py
filter_by_your_top_genres filters the albums according to your list of genres consulted in userClass
artistClass.py : Class of the artist, through its id, spotify returns its name and its styles
albumClass.py : Class that manages the albums, the function get_new_album_ids pass country variable, searches and then filters according to the functions of the playlistClass remove_rejects and filter_by_your_top_genres . get_track_ids_for_album I think I haven't touched anything
You will see that self.spotify is called among the objects, that is because I have been passing the spotify object between them like this, if someone comes up with something better... feel free..
I have also added in the scope of spotify user-top-read
In the setup.py I have added the option that asks you the country according to the ISO code
I have also modified the way the result is displayed. I think it's friendlier and even my mother would understand
Also I change the remove rejects, it filter not only the first genre of the artist, now checks all his genres
I tried to comment as much as possible in the code
I hope all this is understood despite my English, help someone and see if we can make it evolve to generate song lists where they sing the word “fart”