Skip to content

Generates playlists for streaming music services from various song charts.

Notifications You must be signed in to change notification settings

cofiem/music-playlists

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Music Playlists

Generates streaming music playlists create from various song charts.

Playlists

Triple J Unearthed Weekly

Playlist Source

YouTube Music

Spotify

Triple J Most Played Daily

Playlist Source

YouTube Music

Spotify

Double J Most Played Daily

Playlist Source

YouTube Music

Spotify

Radio 4zzz Weekly

Playlist Source

YouTube Music

Spotify

Last.fm Most Popular Weekly

Playlist Source

YouTube Music

Spotify

SoundCloud Trending Australia Weekly

Not available due to Soundcloud closing access to API keys.

Playlist Source

YouTube Music

Spotify

Other playlists

Script Setup

The script requires some environment variables to run.

  • PLAYLIST_TIME_ZONE - Set the time zone for dates, particularly the generated playlists.

YouTube Music

  • YOUTUBE_MUSIC_AUTH_CONFIG - the contents of the headers_auth.json config file from these instructions
  • The YouTube Music playlist ids:
    • YOUTUBE_MUSIC_PLAYLIST_ID_TRIPLEJ_UNEARTHED
    • YOUTUBE_MUSIC_PLAYLIST_ID_TRIPLEJ_MOST_PLAYED
    • YOUTUBE_MUSIC_PLAYLIST_ID_DOUBLEJ_MOST_PLAYED
    • YOUTUBE_MUSIC_PLAYLIST_ID_RADIO_4ZZZ_MOST_PLAYED
    • YOUTUBE_MUSIC_PLAYLIST_ID_LASTFM_MOST_POPULAR_AUS

Spotify

  • SPOTIFY_AUTH_REFRESH_TOKEN - the refresh token obtained from Spotify.login_init
  • SPOTIFY_AUTH_CLIENT_ID - the client id from the dashboard
  • SPOTIFY_AUTH_CLIENT_SECRET - the client secret from the dashboard from the /authorize endpoint
  • The Spotify playlist ids:
    • SPOTIFY_PLAYLIST_ID_TRIPLEJ_UNEARTHED
    • SPOTIFY_PLAYLIST_ID_TRIPLEJ_MOST_PLAYED
    • SPOTIFY_PLAYLIST_ID_DOUBLEJ_MOST_PLAYED
    • SPOTIFY_PLAYLIST_ID_RADIO_4ZZZ_MOST_PLAYED
    • SPOTIFY_PLAYLIST_ID_LASTFM_MOST_POPULAR_AUS

Last.fm

  • LASTFM_AUTH_API_KEY - the Last.fm API Key

Development

Local development can require running the script multiple times in quick succession. This is not a great thing to do for web services. There is the possibility to cache output for each class.

Change the cache setting in the Downloader in main.py.

With thanks to sigma67 for ytmusicapi.