~savoy/bpm

fix/refactor: submitting tracks to playlist

Prior, the code to delete and submit new tracks to a playlist did
not work due to an undefined variable. This `data` variable is now
initialized prior to the loop of track deletion/submission.

The `submit()` method has also been refactored into `_submit()` to not
duplicated code, as the steps in `requests.delete` and `requests.post`
are idential.

Additionally, a bad f-string has been fixed with correct quotations.

Signed-off-by: savoy <git@liberation.red>
fix: better error handling for getting tracks

Given API limits when calling on individual tracks that can't be
chunked, (i.e. audio features), there is now more robust handling by
having a user-defined value for internal rate limiting (call every N
seconds) and saving any track info acquired into the cache database
instead of dropping it at the first sign of an Imperial cruiser.

The writing of the data to the cache database also makes sure the
original database values are string values; an empty database will pull
up a dataframe with default i64 per series.

Signed-off-by: savoy <git@liberation.red>
ci: git-cliff config for changelogs

Signed-off-by: savoy <git@liberation.red>
fix: rate limiter, read_db method, json method

pl.read_database with a URI string is being deprecated, so moved to the
correct pl.read_database_uri.

When getting track features, the response is saved as JSON; no need to
try .json() again.

The rate limit time is now configurable in the bpm config.

Signed-off-by: savoy <git@liberation.red>
doc: README and LICENSE

Signed-off-by: savoy <git@liberation.red>
feat: reads/writes to cache to minimize API calls

Signed-off-by: savoy <git@liberation.red>
feat: can read/write to DB with polars

Signed-off-by: savoy <git@liberation.red>
fix: login auth saved even if no refresh code

Signed-off-by: savoy <git@liberation.red>
feat: add "energy" as track metric

From the Spotify API:

Energy is a measure from 0.0 to 1.0 and represents a perceptual measure
of intensity and activity. Typically, energetic tracks feel fast,
loud, and noisy. For example, death metal has high energy, while a Bach
prelude scores low on the scale. Perceptual features contributing to
this attribute include dynamic range, perceived loudness, timbre, onset
rate, and general entropy.

Signed-off-by: savoy <git@liberation.red>
fix: combined playlist drops dupes

Signed-off-by: savoy <git@liberation.red>
fix: feeders filtered to upper limit & correct csv

The feeder playlists are now filtered down to only songs within the BPM
range to exclude both too fast and too slow songs.

The `main` method now passes the correct tuple to `csv`, which is only
target playlist.

Signed-off-by: savoy <git@liberation.red>
style: organized imports

Signed-off-by: savoy <git@liberation.red>
feat: first commit

Signed-off-by: savoy <git@liberation.red>