DjayNowplaying is a lightweight "Now Playing" display tool for djay Pro. It monitors djay Pro's local database to extract current track information and playback history, displaying them via a local web server. It is perfect for OBS streaming or personal use.
https://github.com/ljsquare/djaynowplaying thanks for @ljsquare
- Real-time Monitoring: Directly reads
MediaLibrary.db, no complex API configuration required. - Artwork Extraction: Automatically extracts album artwork from audio files (supports MP3, FLAC, M4A, etc., requires
mutagen). - Web Interface: Provides a beautiful HTML page to display current playback and history, supporting OBS Browser Source.
- Highly Customizable:
- Built-in settings interface to configure database path, port, and history count.
- Toggle display of History, Playback Time, and Source info via the Web interface.
- Custom Skins: Fully customize the display by modifying
template.html(CSS/HTML).
- Privacy Protection: Smartly hides sensitive "Source" paths (e.g., Explorer paths).
- Standalone: Provided as a packaged EXE, ready to use out of the box.
- Download the latest version of
DjayNowplaying.exe. - Ensure the
template.htmlfile is in the same directory as the EXE. - Double-click to run
DjayNowplaying.exe. - After startup, click "Settings" and confirm that
djay DB Pathpoints to your djay database file.- Usually located at:
C:\Users\<Username>\Music\djay\djay Media Library\MediaLibrary.db
- Usually located at:
- Open the displayed address in your browser (Default:
http://localhost:8000). - OBS Setup: Add a "Browser" source in OBS, enter the URL above, and set appropriate width/height (Recommended 800x600 or custom).
If you are familiar with Python, you can run the source code directly:
- Clone or download this project.
- Install dependencies:
(Note:
pip install mutagen
mutagenis used for artwork extraction. The tool runs without it, but artwork won't be displayed) - Run the script:
python DjayNowplaying.py
In the "Settings" interface, you can adjust:
- djay DB Path: Absolute path to the djay media library database file.
- Server Port: Web server port (Default 8000).
- Poll Interval: Database polling interval.
- Show History: Toggle history display on the web page.
- Show Time: Toggle playback time display.
- Show Source: Toggle track source display (e.g., SoundCloud, Tidal, Local).
The template.html file in the root directory controls the web page appearance. You can edit this file to modify layout, colors, fonts, or animations.
After saving changes, refresh the browser or refresh web area at OBS to see the effects immediately; no need to restart the program.
If you want to package the EXE file yourself:
- Install PyInstaller:
pip install pyinstaller
- Run the build command:
pyinstaller DjayNowplaying.spec
- After building, find
DjayNowplaying.exein thedistfolder. - Important: Remember to copy
template.htmlto the folder where the EXE is located.
MIT License
stanzas
If you find this project useful, consider giving it a star or supporting the project. If you have any custom development requests or other requirements, please contact stanzas1997@gmail.com
DjayNowplaying 是一个用于 djay Pro 的轻量级“正在播放”显示工具。它通过监控 djay Pro 的本地数据库,实时提取当前播放的曲目信息和历史记录,并通过本地 Web 服务器展示,非常适合 OBS 直播推流或个人使用。
- 实时监控:直接读取
MediaLibrary.db,无需复杂的 API 配置。 - 封面提取:自动从音频文件中提取专辑封面(支持 MP3, FLAC, M4A 等,需安装
mutagen)。 - Web 界面:提供美观的 HTML 页面展示当前播放和历史记录,支持 OBS 浏览器源。
- 高度可定制:
- 自带设置界面,可配置数据库路径、端口、历史记录数量。
- 支持通过 Web 界面开关显示:历史记录、播放时间、来源信息。
- 自定义皮肤:通过修改
template.html即可完全自定义显示效果(CSS/HTML)。
- 下载最新版本的
DjayNowplaying.exe。 - 确保
template.html文件与 EXE 在同一目录下。 - 双击运行
DjayNowplaying.exe。 - 程序启动后,点击“设置” (Settings),确认
djay DB Path指向您的 djay 数据库文件。- 通常位于:
C:\Users\<用户名>\Music\djay\djay Media Library\MediaLibrary.db
- 通常位于:
- 在浏览器中访问显示的地址(默认:
http://localhost:8000)。 - OBS 设置:在 OBS 中添加“浏览器”源,URL 填入上述地址,设置合适的宽高(推荐 800x600 或自定义)。
如果您熟悉 Python,可以直接运行源码:
- 克隆或下载本项目。
- 安装依赖:
(注:
pip install mutagen
mutagen用于提取封面,如果不安装也可以运行,但无法显示封面) - 运行脚本:
python DjayNowplaying.py
在程序界面的“设置”中,您可以调整:
- djay DB Path: djay 媒体库数据库文件的绝对路径。
- Server Port: Web 服务器端口(默认 8000)。
- Show History: 是否显示历史播放记录。
- History Count: 显示的历史记录条数。
- Poll Interval: 轮询Djay数据库的间隔。
- Show Time: 是否显示播放时间。
- Show Source: 是否显示曲目来源(如 SoundCloud, Tidal, Local)。
项目根目录下的 template.html 控制着网页的显示效果。您可以随意编辑该文件来修改布局、颜色、字体或动画。
- 修改背景透明度:编辑 CSS 中的
.now-playing-card和.history-section的background属性,使用rgba()设置透明度。 - 修改布局:直接修改 HTML 结构。
修改保存后,刷新浏览器即可看到效果,无需重启程序。
如果您想自己打包 EXE 文件:
- 安装 PyInstaller:
pip install pyinstaller
- 运行打包命令:
pyinstaller DjayNowplaying.spec
- 打包完成后,在
dist文件夹中找到DjayNowplaying.exe。 - 重要:记得将
template.html复制到 EXE 所在的文件夹中。
MIT License
stanzas
If you find this project useful, consider giving it a star or supporting the project.