Small Windows utility that reads the current system media session (SMTC), cleans up the track info via Ollama, and writes a formatted line to now_playing.txt. A minimal Tk window shows both the raw metadata and the normalized output.
- Windows 10/11 (SMTC support is Windows-only).
- Python 3.11+.
- Ollama installed and running with network access to the configured host.
- Ollama model available (default:
gemma3:4b).
- Run
init.bat.- Creates
venv, upgradespip, installsrequirements.txt. - Warns if
ollamais not on yourPATH. - If
start.batalready exists it will be used after setup; otherwise a new one is generated.
- Creates
- Ensure
prompt.txtexists and contains the normalization rules for the LLM.
files.now_playing: path to the output text file (default:now_playing.txt).files.prompt: path to the prompt rules file (default:prompt.txt).ollama.address: Ollama host (default:http://localhost:11434).ollama.model: model name (default:gemma3:4b).ollama.keep_alive: Ollama keep-alive value.update_interval: polling interval in milliseconds (default:1000).
- Use the generated
start.bat, or:call venv\Scripts\activate.bat python main.py [-debug] - The console minimizes in non-debug mode. When the app encounters a fatal error, it pauses for input before exiting so pythonw users can read the message.
- Reads the current SMTC session (YouTube Music/Spotify/etc. that expose SMTC).
- Sends uploader/title to Ollama with
prompt.txt, expects JSON back, and formats it as:title ᵇʸ artist (feat. X, Y) (remix)(feat/remix parts only when present). - Writes the formatted string to the configured output file.
- Model not found: run
ollama pull <model>and updateconfig.yamlif needed. - Prompt errors: ensure
prompt.txtis present and non-empty. - No track detected: confirm an SMTC-enabled player is running and active.