You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ENTS24 API is hit with today's date and a postcode. These postcodes are taken by hand as a rough approx. of each city centre. Those listings are then taken to the Spotify API search function, the first song found by the artist is then added to that months' playlist.
The end result are playlists with the pattern {location}-{month}.
An SQLite3 database keeps track of tracks with the schema:
Requirements
Spotify API credentials
Ents24 API credentials
Save credentials at root of project as config.json with structure:
unique_track_artist_in_month_playlist: Ensures that the combination of artist_name, track_uri, uk_city_playlist_id, and venue_name is unique.
FOREIGN KEY(uk_city_playlist_id): Establishes a relationship with the uk_city_playlist table.
uk_city_playlist Table Schema
Column Name
Data Type
Constraints
uk_city_playlist_id
INTEGER
PRIMARY KEY
month
TEXT
NOT NULL
name
TEXT
NOT NULL
playlist_id
TEXT
postcode
TEXT
NOT NULL
unique_name_month_postcode
UNIQUE (month, name, postcode)
Constraints
unique_name_month_postcode: Ensures that the combination of month, name, and postcode is unique.
Implementation
I've been running this as a CRON job on a raspberry pi with the idea that it is semi-autonomous (there's a need to refresh credentials from time-to-time, but this could also be automated) with tracks being added and then removed again when out-of-date. Streaming could be an option instead of CRON here.