Recently Added Music Plugin (Experimental)

What could be better than taking the time during a sick day to create a new plugin? :slight_smile:

:warning: Disclaimer

This plugin was developed with the assistance of AI (Claude by Anthropic). While it has been tested on real hardware and is functional, it is provided as-is without warranty. Use at your own risk. The author assumes no responsibility for any damage to your hardware, software, or data. Always back up your Volumio configuration before installing third-party plugins.

Description

After creating the OLED display plugin I was wondering if I could tackle a long missed feature in Volumio. I’m talking about a way to find music that has been recently added to the library. With around 42k+ tracks it gets kinda hard to keep track of what’s been added recently and all those new additions seemed to disappear in the abyss.
I again worked with Claude and would like to present you my Recently Added Plugin. :slight_smile:

What you see: A new tile sits next to Albums, Artists, Favorites, etc. on the Browse page, with the same visual treatment as the stock tiles. Tapping it gives a list of four time windows: Last 7 days, Last 14 days, Last 30 days, Last 90 days. Tap a window and you get the additions within that range, grouped into two sections - Albums on top, Artists below. Album entries forward to Volumio’s standard music-library view, so playback, queue, and artwork all work the same as everywhere else in the UI. Tapping an artist drills into just that artist’s recent additions in the same window.

Settings: A View Mode dropdown lets you switch between “Albums only”, “Artists only”, and “Albums and Artists” (default). For libraries where you typically add a few albums at a time, “Both” is convenient. For larger ingestion sessions, switching to a single mode keeps the list focused. There are also three MPD connection settings (host, port, query timeout) but the defaults work for any standard Volumio install.

How it works under the hood: The plugin is intentionally stateless. There’s no separate index, no filesystem watcher, no SQLite database, and no native modules to compile. When you tap a window, the plugin sends a single ‘find modified-since ’ command to MPD over its standard protocol port, gets back the list of files modified in that window, groups them by parent directory and AlbumArtist in memory, and renders the result. MPD’s tag cache makes this fast even for libraries with several thousand tracks. No queries happen while you’re listening to music or browsing other sections, the plugin only talks to MPD when you actively open a Recently Added view.

What this means in practice: Because the plugin reads directly from MPD’s database, what shows up in Recently Added is exactly what’s browsable in Volumio’s Music Library section. There’s no possibility of “phantom” entries that fail to open. The corollary: when you add new music to your library, run Volumio’s normal Update Library action as you always have, and the new content appears in Recently Added at the same moment it appears everywhere else. The plugin is a read-only view over MPD’s truth, not a parallel record-keeping system.

Features

  • Time-windowed browse: four windows out of the box — Last 7 / 14 / 30 / 90 days
  • Configurable view modes: Albums only / Artists only / Both (default)
  • Artist drill-down: tap an artist to see only their recently-added albums in the selected window
  • AlbumArtist grouping: compilations stay together even when per-track Artist values differ
  • Album-tag titles: album entries show the embedded Album tag (with folder-name fallback for untagged music)
  • Album cover artwork: tiles use Volumio’s standard albumart resolution, with fallback icons when no cover exists
  • Native multilingual UI: English, German, French, Italian, Spanish, Dutch, Polish — picked up automatically from Volumio’s language setting
  • Zero database overhead: stateless reads against MPD’s existing tag cache; no SD-card writes, no watcher state
  • Always in sync with Volumio: because we read what MPD reads, every visible album is by construction browsable; the standard “Update Library” workflow makes new music appear here too

Screen Previews

Browse tile

Time-window list (root)

Albums + Artists section view

Album drill-down

Artist drill-down

Limitations

  • Updating tags of an audio file might cause it to appear in the Recently Added view again after updating the library as MPD doesn’t differ when the file has been added and when it has been updated (it only knows one date).
  • The plugin has been tested on RPi 4 with Volumio 4.119 and 42k files in library without performance impact. No guarantee that impacts would not occur on larger libraries and weaker systems - feedback welcome!
  • Changing the system language might only be adapted to the plugin after a reboot.

Source

Let me know what you think! :slight_smile:

2 Likes

Snap! I vibe coded for this as well just last night :slight_smile: I will post separately about this. My approach was quite different though.

My plugin is more simple - adds a “Recently Added” browse source. It scans configured NAS folders, treats immediate subfolders as albums, sorts by folder modified date, opens albums into track lists, and plays tracks via MPD-relative paths.

Can’t wait to try yours!

1 Like

I tried a similar approach, too by maintaining an SQLite database of recent added items on all storage sources including SMB shares. Problem is when MPD hasn‘t updated the library yet you could see the folders but they appeared empty as MPD hasn’t put the tracks to the inventory yet. Eventually I wanted to treat MPD‘s library as source of truth, hence the approach by simply querying it‘s socket, clean and simple. :slightly_smiling_face:

Interested in seeing yours!

Hi @Zhapox

Mine is still very much a proof of concept rather than a polished plugin. I decided to hold off posting about it until it’s a bit more complete.

At the moment it works by scanning configured NAS/local folder paths rather than using MPD’s library “added” metadata. Each album folder is detected from the filesystem, then the plugin sorts albums by folder modified date, newest first. On my setup this lines up reasonably well with “recently added”, although I know it is not the same thing as a true library-added timestamp.

Current behaviour is:

  • Browse page shows Recently Added
  • Inside that, Recently Added Albums lists album folders newest first
  • Clicking an album opens its track list
  • Track playback works from inside the album
  • FLAC track ordering uses embedded tags via metaflac, especially DISCNUMBER, TRACKNUMBER and TITLE
  • If tags are missing, it falls back to filename-based ordering

So the intended flow is currently:
Browse → Recently Added → Recently Added Albums → Album → play track

This iCloud video shows the current user experience: iCloud Photo Sharing

The plugin settings are folder paths and maximum number of albums shown. At the moment the scanner assumes fairly simple album-folder layouts, but I’m considering adding bounded recursive scanning so it can handle mixed folder structures such as:

Root / Album / Tracks
and:
Root / Artist / Album / Tracks
and possibly:
Root / Genre / Artist / Album / Tracks

I’d be interested in your view on whether it makes sense. At least it works for me :slight_smile:

I can ping you the zip file if you’re interested to try it out.

Hey this is great, thank you for doing this. However, after following the instructions, I cannot get it to play anything. I go into “Recently Added” and tap the play icon in the lower right corner of the box titled “Last 7 days” and nothing happens. How do I go about troubleshooting this? I didn’t see a corresponding issue in the troubleshooting section on the github page.

After rereading your post above, I see that you intended this to help you find an album recently added but not necessarily play from the selection of recently added tracks as I attempted. I think that might be a neat addition to your plugin if you can make it work.

1 Like

Watching this, as this is a functionality that I really miss and it’s great to have. Will test it soon (48K tracks in my collection, similar to yours - also on RPi 4).

1 Like

I uploaded a new version with the following improvements:

v0.4.4

Documentation only:

  1. Install instructions updated to recommend volumio plugin install. This is Volumio’s own plugin manager command — invoked from inside the extracted source folder, it copies files into place, runs install.sh, and registers the plugin. No manual folder creation, no manual file copying, and no reboot required. The previous manual-extraction method is kept as a fallback section for older Volumio versions where the CLI may not work.

v0.4.3

New feature:

  1. Inline play and add-to-queue work on time-window and artist-drill-down rows. Previously the play button on rows like Last 7 days or an artist tile inside the Artists section appeared but did nothing — the plugin’s explodeUri() was a stub. It now expands those URIs into a flat track list and hands it to Volumio’s queue. Tracks are returned in the same order they’re displayed: most-recent album first, with disc-aware track ordering within each album (disc 1 tracks 1→N, then disc 2 tracks 1→N — multi-disc albums no longer interleave). The artist drill-down play button queues only that artist’s tracks, including from compilations where they’re one contributor among many. Album play buttons were unaffected — those URIs route to MPD’s own controller and have always worked. Sentinel-style URIs (the root tile, anything we don’t own) remain no-ops.

@jammerx19: Thanks for trying out the plugin and hinting that issue! The above listed update should address your finding. In the time window view (Last 7 days, etc.) you can now hover your mouse over either of those time windows and hit the play button. As described in the above changelog of v0.4.3 it will put all contained albums into the queue and play them in chronological order when they have been added to the library (newest first). Same applies when you go into the artist drilldown and hit the play button on any artist. This already worked for the album view before but now works on the others, too!

@ManuCV: I’m happy to fill this gap, let me know how it works!

@jhscann: I saw your recent thread and will have a look at it!

1 Like

Oh man, thank you! Really appreciate the work you’re putting into this. One question: how do I upgrade it? Do I just replace the guts of the installation folder and reboot or do I uninstall via Volumio dashboard and reinstall?

1 Like

I’d recommending reinstalling it. A thing I noticed when using install scripts manually to install the plugin is that the uninstall plugin button on the GUI won’t work. Hence I updated the install instructions to use the following procedure:

  • Upload the plugin anywhere to your Volumio device (e.g. home directory)
  • cd into the plugin directory
  • run the command volumio plugin install and follow the instructions.

With this procedure the uninstall button will work on the GUI, too.

To manually remove the old plugin you can just remove the directory recently_added at /data/plugins/music_service/ and then install the new plugin.

Yep, I figured it out. Thanks again!

1 Like

Great, let me know if you should find any further findings!

v0.5.0

New feature:

  1. Configurable sort order for albums and artists. Two new settings under Display: Albums sort and Artists sort, each offering Newest first (default) or Alphabetical. The Albums setting applies to the Albums section in window views and to the album list inside artist drill-downs (so both views stay consistent). The Artists setting applies to the Artists section. Alphabetical sort uses locale-aware comparison so diacritics fall in their natural language positions (ż, ü, ñ, é). When sorting artists alphabetically, the Unknown Artist placeholder is pinned to the end of the list rather than appearing under “U”. Leading articles (“The”, “Der”, “Le”) are not stripped — sort matches Volumio’s stock convention. Track ordering within an album is unchanged: tracks always play in disc → track-number order. Translations for all new UI strings are bundled across the seven supported languages.