When a playlist filename is changed

I've migrated from iTunes to Mp3tag, and wonder how people deal with maintaining playlists when they change a filename? In iTunes, when you edit a tag that forces a filename change you don't break the playlists, because the playlists are maintained internally by iTunes.

I saw an old post about placing multiple playlist names in the comment tag, and then automatically creating playlists based on the tags. That seems like a possible solution to this problem.

Is that the best solution, or is there something other way to maintain playlists when filenames change that I'm not aware of?

You don't have to use the field COMMENT for that but you could create a user-defined field that holds the name(s).
If you also add the position number in the playlist-field, then you can restore the original list even more easily.

That makes sense to create a user-defined field for this purpose. I don't know what "position number" is, so I don't understand what you wrote about that.

Is this, therefore the way this is normally done, and would you be able to chare the code for automatically creating the playlists?

iTunes (like Foobar, Media Monkey, MusicBee, etc.) is a library management program designed to keep track of a collection of audio files and assemble them into a common place for playing those files. Building a playlist here can force this library management to update those files with any changes. But typically managing the tags in these programs has limited options.

The difference here is that mp3tag is a tag editing program that is driven to best manage those tags, and facilitate powerful functions to enable mass edits across many files at once. Building a playlist for the files currently loaded into mp3tag can be done on the fly, but there is no backwards functionality to update these playlists once more edits have been done to those files afterwards. But you can reload your files here, filter them as desired, then save them over the previous playlist if you choose.

Don't you arrange the titles in a playlist so that they create a certain mood or play together nicely like they fade into each other? This would define their position - and I think that from "first" to "last" could best be expressed with a number.

So, if you have e.g. a playlist for "Christmas", then I would arange the tracks in the order you want in MP3tag (you can move them around the file list while pressing the Alt Button). and then I would use an action of the type "Format value" for PLAYLISTMEMBER
Format string: Christmas$num(%_counter%,3)
which would fill the field PLAYLISTMEMBER with Christmas001 to Christmas100 if there are 100 files in the playlist.
If you then create a column with the Field and Value %playlistmember% you can sort by that column.
If it should happen that 1 track is member of several playlists, you could append the list of entries in PLAYLISTMEMBER - but it will be harder to sort.
To find the files that you originally assigned to the playlist "Christmas", use the filter
%playlistmember% HAS Christmas

I don't, but that sounds real nice. I am happy with a large playlist of songs that I really enjoy, and hearing them in random order works well enough for me.Lots of fun surprises.

I guess once I've cleaned up my library I shouldn't have to be renaming tracks. I think I will create a user defined tag to hold multiple playlist names.

Did you know that if you have m3u or m3u8 playlists in iTunes, you can drag&drop them into MP3tag and add the playlist name there.
If these are other playlists, then you may open them first in iTunes and drag&drop all the files into MP3tag and process the tags further in MP3tag.
This applies only to static playlists. Automatic playlists are a feature of the player.

Good to know. Thank you.