Skip to content

Instantly share code, notes, and snippets.

@adam137016
adam137016 / gist:001ed4bfa393a8f33ca8e7d020e4b69d
Created April 25, 2026 13:38
Playlist Poster Generator for Sonic Dashboard
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Plex Sonic Auto Playlist Poster Generator</title>
<!--
═══════════════════════════════════════════════════════════════════════════════
PLEX SONIC AUTO PLAYLIST — POSTER GENERATOR
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sonic Adventure</title>
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
# Sonic Adventure Playlist Generator for Plex
Generate smooth, genre-transitioning playlists in Plex using its built-in **Sonic Adventure** feature. Pick genre waypoints, choose a seed mode, and let Plex's own sonic analysis build a musical journey between them.
Includes four tools:
- **Interactive script** — run from the command line, pick your genres and modes manually
- **Auto script** — runs on a schedule, generates playlists automatically from your enabled genres
- **Web dashboard** — a local web app you can bookmark on your phone or any device
- **Playlist Poster Generator** — generates custom retro-style poster art for each Auto: playlist so they display a unique image instead of random album collages
#!/usr/bin/env python3
"""
sonic_dashboard.py
Flask web dashboard for Sonic Adventure playlist generation.
Includes Manual tab (pick waypoints + generate) and Auto tab
(scheduled runs with genre toggles, configurable from the UI).
Usage: python sonic_dashboard.py
pythonw sonic_dashboard.py (Windows, no console window)
Access: http://localhost:5000
@adam137016
adam137016 / gist:d3fa85ef6c03858bc78579ce4836088c
Last active April 24, 2026 11:15
Auto Sonic Adventure Playlist Generator
#!/usr/bin/env python3
"""
generate_sonic_auto_playlists.py
Auto-generates Sonic Adventure playlists on a schedule. Each run picks
random genre presets from your enabled list and builds playlists using
Plex's sonic analysis to transition smoothly between seed tracks.
Schedule via Windows Task Scheduler or cron every 2-3 days.
Place on Desktop alongside other Plex playlist scripts.
@adam137016
adam137016 / gist:857b6e5a03caca8af83814adc70fa09d
Last active April 19, 2026 18:23
Sonic Adventure Generator for Plex — Genre-Aware Playlist Script
#!/usr/bin/env python3
"""
================================================================================
generate_sonic_adventures.py — v2
A genre-aware Sonic Adventure playlist generator for Plex Music libraries
Requires: Plex Media Server with a Music library and Plex Pass
================================================================================
WHAT IT DOES:
Uses Plex's built-in Sonic Adventure engine (the same one Plexamp uses) to
generate a playlist that travels musically from one seed track to another.
@adam137016
adam137016 / generate_plex_auto_playlists.py
Last active April 6, 2026 11:26
Plex music playlist generator
import requests
import random
from collections import defaultdict
from datetime import datetime
import time
# ── Configuration ────────────────────────────────────────────────────────────
PLEX_URL = "http://YOUR_PLEX_SERVER_IP:32400"
PLEX_TOKEN = "YOUR_PLEX_TOKEN"
LIBRARY_ID = "YOUR_MUSIC_LIBRARY_ID"