riverscuomo / new-albums

This project is for me to experiment with open-source collaboration. So please feel free to chime in and participate. I've been learning programming since 2015 but I've been mostly working on my own. So my github/collaboration skills are weak. I'd like to learn more about collaboration so I can accomplish more as a programmer through teamwork. One reason I've hesitated so long to try this is I'm worried about accidentally exposing API keys, secrets, credentials, and access to my users' data (not that I have much). So this project will be a first, low-risk, foray into the field of open-source collaboration. If things go well here, maybe I can start to open up some of my other repositiories. I could sure use some help. And I love that thought that some of my programs could be useful to others. My first goal here is to understand how different developers can work on a codebase together without sharing credentials; to create a program that different people can use with their own credentials. I've attempted this by requiring collaborators (including myself) to use environment variables.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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”