Tool request: content of txt-file in media folder to plex db field

Hello,
I would like to be able to restore the whole database by just starting a new library and scanning my directory containing the audiobooks. All metadata is stored in the m4b tags. Except this field:

Bildschirmfoto 2021-12-16 um 14.44.09

(Don’t know what it is called in english - “notation”?)

and this field (collections):

Bildschirmfoto 2021-12-16 um 14.44.22

Is there already a tool, or can somebody write one (tell me what it would cost) which would import the content of a txt file into those fields?
And as a bonus: Write the content of “album” into “album sort name”. (I hate it, when the sort name is different from the album name.

The idea is:

  • In the directory of the audiobook (every book has its own directory) will be a file “notation.txt” containing a single word or nothing at all. This word (or nothing) should go to the plex-tag “notations” (if this is the correct term).
  • In the directory of the audiobook also will be a file “collections.txt” containing a single word or several words. This word(s) should go to the plex-tag “collections”.
  • The content of “album” should be written into “album sort name” in plex. Overwriting the existing entry.

There are three libraries (Audiobooks, Music and Movies), only the Audiobooks should be affected.

If this is performant enough, it can be run manually every time new entries are thrown into plex and run through everything (not very elegant). If not, it would be better to write a log-file which will be used by the tool to skip the directories which are already processed. (Deleting this file, would run through everything again.)

You’re referring to the (sharing) label. This isn’t actually metadata. It’s used to filter / restrict the content of libraries shared with friends.

For video based libraries, the collection tags can be placed in the files‘ embedded metadata, using the Album tag. That will however not work for audio based libraries (for obvious reasons, given they’re already using that tag)

You can already configure Plex to not automatically drop leading articles from their sort titles (e.g. the, der, die, das, le, la, el…). This is a hidden option though, which means you’ll need to manually edit Plex configuration (not available through the user interface).
See the ArticleStrings property in the related support article:

1 Like

Yes, I’ve learned that in another post. Thank you.

For plex using the “der, die das…” is a huge step in the direction I want. - Also, there are other letters in German which are wrong in the album sort name. (Ä, ä, Ö usw…) but this is not really relevant. So I could skip that.

So the task is one point shorter now. Thank you!