This pull request implements "Automatic Posting". This introduces a way for nowplaying to continually stay up to date without someone triggering the weekly posts manually. Originally it was to be a cron job run at a specific time, however it was implemented as a polling system that way if a certain time was missed it would simply post the next iteration.
Posts are scheduled to go up when the week changes. This happens Saturday night/Sunday morning and the new week's post should be added automatically. The code first looks for this week's post, and if it can't find it it will create the post. If the post exists then the function exits.
We can expect some time until the recap posts are working correctly because they require a manual input of the payout. I would also like to test that thoroughly before using it because it sends out steem power to participants which is something we don't want to mess up.
Spotify authentication was moved to the database, this allows us to not have to refresh the authentication every time we run the program. The database saves both an access token and a refresh token to be used with the API to fetch and manipulate spotify playlists. This creates an entirely new table in the database called settings, which holds important information that may vary depending on your database. In this case the spotify credentials are information that is aligned with the database.
Check out the #nowplaying community and bot in action here