No description
  • Python 98.8%
  • Shell 0.8%
  • Makefile 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-27 20:59:19 +02:00
rhdav Write the playlists as M3U files for other players, version 0.0.24 2026-09-21 21:37:03 +02:00
tests Write the playlists as M3U files for other players, version 0.0.24 2026-09-21 21:37:03 +02:00
.gitignore inital 2026-09-18 19:51:38 +02:00
install.sh Rename to rhdav, sync playlists and podcast subscriptions 2026-09-21 01:21:51 +02:00
LICENSE Rename to rhdav, sync playlists and podcast subscriptions 2026-09-21 01:21:51 +02:00
Makefile Write the playlists as M3U files for other players, version 0.0.24 2026-09-21 21:37:03 +02:00
README.md README: shorter, unwrapped paragraphs; drop the davsync migration note and the development section 2026-09-27 20:59:19 +02:00

WebDAV sync for Rhythmbox

A Rhythmbox plugin that keeps your music library folder in sync with a folder on a WebDAV server (Nextcloud, ownCloud, Apache mod_dav, a NAS, ...). Use it to back the library up, or to keep the same library on several computers. Play counts, ratings, playlists and podcast subscriptions are synced too, so they survive a reinstall.

Needs Rhythmbox 3.x with Python 3 plugin support.

Install

./install.sh              # copy to ~/.local/share/rhythmbox/plugins
./install.sh --link       # or symlink this folder (for development)
./install.sh --uninstall

Restart Rhythmbox, open Plugins and enable WebDAV Sync.

Use

Tools → Sync Library with WebDAV... opens the sync window. Enter the server under the gear button (or in the plugin's Preferences):

Setting
Server URL The WebDAV folder to sync with, e.g. https://cloud.example.com/remote.php/dav/files/me/Music for Nextcloud. It is created if missing.
Port Only for a server on a non-standard port. Empty: 443 for https, 80 for http, or the port written in the URL.
User name / Password The password is stored in the desktop keyring. For Nextcloud, use an app password.
Local folder Defaults to the Rhythmbox library location.
Direction Both directions, upload only (local files are never changed) or download only (the server is never changed).
Propagate deletions Off: a file deleted on one side is restored from the other. On: it is deleted there too - after you confirmed it; local files go to the trash.
Sync play counts and ratings See Play counts and ratings below.
Sync playlists See Playlists and podcasts below.
Sync podcast subscriptions See Playlists and podcasts below.
Check the server certificate Turn off only for your own server with a self-signed certificate.
Sync when Rhythmbox starts Runs in the background; the window only appears if something needs attention.

Preview lists what a sync would do without changing anything. Closing the window does not stop a running sync; Cancel does, and the next sync picks up where it stopped. Downloaded files are added to the Rhythmbox library, deleted ones are removed from it.

How?

After each sync the plugin remembers size, modification time and server ETag of every file (~/.config/rhdav/state.json). Compared with that:

  • a file that is new or changed on one side is copied to the other,
  • a file changed on both sides: the newer one wins,
  • a file missing on one side was deleted there (see Propagate deletions); if the remaining copy was edited in the meantime, the edit wins,
  • on the first sync, files that exist on both sides with the same size are taken as identical.

If one side is completely empty while deletions would be propagated (an unmounted drive, a wiped server folder), the sync refuses to run. Hidden files (names starting with a dot) are not synced.

On Nextcloud and ownCloud the plugin also remembers the server's folder tree. There a folder's ETag changes whenever anything below it changes, so the next sync only reads the folders that changed - a sync with nothing new on the server is a single request. After a sync with failed files everything is read again once. Other servers give no such guarantee and are read completely each time.

Limits: only HTTP Basic authentication (use https), no redirects, files are compared by metadata and not by content.

Play counts and ratings

Rhythmbox keeps play counts, ratings and last-played times in its own database, not in the music files. Each sync also merges them with the file .rhdav.json in the server folder:

  • plays made on different computers add up, the latest last-played time wins,
  • a rating you changed wins over the one on the server, a rating you did not touch follows the server,
  • tracks are matched by their path inside the music folder, so the music folder can be somewhere else on every computer.

After reinstalling the computer or Rhythmbox: enable the plugin, enter the server and sync. Missing music is downloaded, and every track gets its play count and rating back - tracks that Rhythmbox is still importing get them as soon as they show up in the library. A track without plays and rating never clears what the server has.

With Upload only the plays in Rhythmbox are not changed, with Download only the file on the server is not changed.

Playlists and podcasts

The same file holds your playlists and the podcast feeds you subscribed to.

  • Playlists are matched by name. Tracks added or removed on different computers are merged; a new order made on this computer wins. A Playlist deleted on one computer is deleted on the others, unless it was edited there in the meantime. Propagate deletions is about music files only.
  • Only the playlists you put together yourself are synced, not the automatic ones, and only their tracks inside the music folder. Other tracks stay in the playlist on the computer they are on.
  • A track that was just downloaded shows up in its playlists once Rhythmbox has imported it, at first at the end. The next sync puts it in its place.
  • Podcasts: the subscriptions are synced, not the episodes or what you have listened to. Unsubscribing on one computer unsubscribes on the others; episodes that were downloaded there are kept.
  • A Rhythmbox without any playlists, podcasts and plays is taken as a new one: it gets everything from the server and deletes nothing there. The same goes for a server that lost .rhdav.json.

The direction applies here too: Upload only never changes the playlists and subscriptions in Rhythmbox, Download only never changes the server.

Playlists for other players (Symfonium, ...)

Other players cannot read .rhdav.json, so every synced playlist is also written to the server folder as <name>.m3u: UTF-8, one track per line, the paths relative to the playlist file. The files are in the music folder itself, so the paths need no ../ and also fit players that resolve them against the music folder. In Symfonium add the server folder as a WebDAV provider, browse it in file mode and import the playlist from the menu of the .m3u file.

These files are written, never read: edit the playlists in Rhythmbox, a change made to a .m3u file on the server is overwritten. .m3u files directly in the music folder are not part of the file sync, on either side; a playlist file of your own with the name of a synced playlist is replaced on the server. Characters that do not belong in a file name become _. Download only writes no playlist files.