JavaScript widget that displays your latest tracks from Libre.fm.
https://database.omg.lol/now
- JavaScript 100%
| screenshots | ||
| libre-fm-widget.js | ||
| README.md | ||
Libre.fm "Now Playing" Widget
JavaScript widget that displays your latest tracks from Libre.fm. Simply add a script tag to your website and the widget will automatically display your now playing track or recent listening history with real (most of the time) album art from Cover Art Archive. See it in action at database.omg.lol/now or Codepen.
Installation
Simply add the script tag to your HTML/Markdown where you want the widget to appear.
Usage
Replace YOUR_USERNAME with your Libre.fm username.
<script src="libre-fm-widget.js" data-username="YOUR_USERNAME" data-theme="minimal"></script>
<script src="libre-fm-widget.js" data-username="YOUR_USERNAME" data-theme="standard"></script>
<script src="libre-fm-widget.js" data-username="YOUR_USERNAME" data-theme="extended"></script>
Options
data-cache- Cache duration in minutes (0= disabled, default:1)data-session-storage- Use sessionStorage instead of localStorage (true/false)data-limit- Number of tracks to fetch (default:5)data-avatar- URL to your avatar image
Album Art
Fetches real cover art from Cover Art Archive via MusicBrainz lookup. Falls back to placeholder if unavailable.
Cache Behavior
- Default: 1 minute (15 seconds when actively listening)
- Set
data-cache="0"for fresh data every load - Set
data-session-storage="true"to clear cache when tab closes
References
Support
Got a question? Reach out via any of my links at database.omg.lol


