Skip to content

Repository files navigation

Daily Drive (Personal Fork)

Recreates Spotify's retired Daily Drive experience by building a playlist that blends podcast episodes with music on an automatic schedule.

This repo is my personal fork/customization of the original project by Patrick Deglon.

Credit

All core project credit goes to:

  • Patrick Deglon
  • Original project: patdeg/dailydrive

This fork keeps the same core idea and expands it for my own usage and deployment workflow.

What This Project Does

  • Authenticates with Spotify using OAuth (setup.js)
  • Pulls latest episodes from configured podcasts
  • Pulls music from one or more sources:
    • top tracks
    • source playlists
    • genre discovery search
  • Mixes podcasts + music using a configurable pattern like PMMMM
  • Updates a target Spotify playlist
  • Caches run state to avoid unnecessary updates

What I Changed in This Fork

Compared to the original baseline concept, this version includes practical enhancements for my daily use:

  • Added hourly podcast-only refresh mode (--podcast-only) so short-lived episodes stay fresh without reshuffling music
  • Added daily + hourly automation scripts in scripts/ for cron-based scheduling
  • Uses Spotify playlist /items endpoint for playlist reads to avoid the deprecated /tracks behavior
  • Added music filtering controls (exclude_keywords, optional classical filtering) for cleaner mixes
  • Added state-aware behavior to skip updates when podcast episodes have not changed
  • Added AI taste profile helpers:
    • taste-profile.js (Demeterics)
    • taste-profile-google.js (Gemini)
  • Added Docker support (Dockerfile, docker-compose.yml) for containerized deployment

Requirements

  • Node.js 18+
  • Spotify Premium account (required for current Spotify dev restrictions)
  • Spotify Developer app credentials

Quick Start

  1. Install dependencies:
npm install
  1. Create config from template:
cp config.example.yaml config.yaml
  1. Fill in config.yaml:
  • spotify.client_id
  • spotify.client_secret
  • spotify.redirect_uri (use http://127.0.0.1:8888/callback)
  • playlist_id
  • podcast show IDs and music preferences
  1. Run first-time auth:
npm run setup
  1. Dry run:
npm test
  1. Update playlist:
npm start

Commands

  • npm run setup - run OAuth setup and save Spotify token
  • npm start - full playlist refresh
  • npm test - dry run (no playlist write)
  • npm run taste - generate genre suggestions via Demeterics
  • npm run taste:google - generate genre suggestions via Gemini

Scheduling

For unattended updates, use the scripts in scripts/ with cron:

  • scripts/daily-refresh.sh - full refresh + housekeeping
  • scripts/hourly-refresh.sh - podcast-only refresh

These are designed for Linux-style deployments (including mini PCs and SBCs).

Configuration Highlights

Main file: config.yaml

  • podcasts[] supports episodes and optional position: first
  • music.top_tracks controls personal favorites source
  • music.genres enables discovery tracks
  • music.playlists imports tracks from existing playlists
  • music.total_songs sets music count target
  • mix_pattern controls interleave logic (P=podcast, M=music)

Example pattern:

  • PMMMM = 1 podcast, then 4 songs, repeat

Security Notes

This repo intentionally keeps secrets out of git. Do not commit:

  • config.yaml
  • .env
  • .spotify-token.json
  • state.json

License

MIT (see LICENSE).


If you are here from the original project: thank you again to Patrick for creating and sharing the foundation this fork is built on.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages