Saturday, July 1, 2023


Backing up album information and the joy of scripting.

In combination with plexamp, plex is a great music server and I cannot find any alternative really working as a substitute for either plex or spotify. 


Different Levels

But you have to accept that plex was not built for music and thus has a different approach than mp3 players like foobar or music organization tools like mediamonkey: It is focussed on the artist and album level. This results in the one major flaw plex has: It is not working well when it comes to compilations. (The reason is obvious: On the artist/album level, compilations do not show the artists on the different tracks and plex will (if id3 tags are properly set) recognize such albums as coming from "Various Artists". )

This difference in approach means that by far not every valuable information in your plex library is mirrored by id3tags in your files: Information such as artist info, similar artists, album reviews, sonically similar albums are on the artist or album level and therefore not reflected in the tags of individual files. 

A loss of that information certainly is tolerable if you have never added anything to what plex automatically has created. But over time, a lot of us added either a missing album review, wrote one on our own or simply changed the Release Date of the record to the date where the recording was actually made (which helps a lot to have consistent decade playlists!)


Backup with scripts is no rocket science

Although plex offers the possibility to backup your database (which is always a good idea), this does not help if you want to access the information outside of plex. And you never know, no software will be there forever, you should never completely rely on proprietary code. 

So this is where scripting comes in. If you want to maintain your metadata well, you can't do without a script or two anyway, but you should run a script for backup purposes at the latest. 

For backing up album reviews and the recording data of albums, I provide the script PlexExportAlbumNFO on github. It runs through all the albums in the library and creates an .nfo file in the folder structure of the hard disk. 

If you are not familiar with python, you can make the script work with a few simple steps. Even for beginners, this is not rocket science and may be feasible with a little research on the internet or in discussion with bing chat. 

And if you're hungry for more, I've provided a number of other scripts for maintaining metadata specifically for music libraries in plex: jackctra/plex_for_music .