Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Separators in custom fields
25-02-2023, 17:46 (This post was last modified: 25-02-2023 17:48 by edj.)
Post: #1
Question Separators in custom fields
I have been using field Custom 6 to build playlists. Sounds odd but it's because I hate having actual .m3u (etc) playlist files - they don't transfer well between systems. A nightmare when you have the same collection mirrored on different devices. So Custom 6 contains the playlist title and MS or whatever music software I'm using searches Custom 6 to automatically create playlists.

My problem is that the Custom field doesn't seem to be respecting ";" in the same way as other fields in MS, ie when I want to use the field to assign a song to more than one playlist.

For example, if I tag a song's genre as "Funk; Electronica", it won't create a new genre entry called "Funk; Electronica", instead the song will simply appear in both genres. This is the desired outcome.

However with this Custom field, rather than the song appearing in both "playlists", Custom shows an entry including the ";".

So using the Funk/Electronica example, if I have two playlists, one called Funk and one called Electronica, if I want a particular song to be in both, then MS shows a playlist called "Funk; Electronica" rather than splitting it into both Funk and Electronica.

So I guess the question is: how do I force MS to respect ";" separators in custom tag fields?

Hope the above makes sense and I haven't confused things by referring to playlists when I don't really mean playlists!!
Find all posts by this user
Quote this message in a reply
25-02-2023, 18:21
Post: #2
RE: Separators in custom fields
Actually, using .m3u playlists is the best way to transfer playlists between different devices. The playlists need to use relative paths and "forward slash" path separators.

As an example, if your library contains the following folder structure:

some/path/Music
some/path/Music/playlists
some/path/Music/playlists/playlist1.m3u
some/path/Music/Album1
some/path/Music/Album1/track1
some/path/Music/Album2
some/path/Music/Album2/track2

then your playlist1.m3u file should contain the following:

../Album1/track1
../Album2/track2

You can now copy the library to another device with a different top-level path, for example:

completely/different-path/musicfiles
completely/different-path/musicfiles/playlists
completely/different-path/musicfiles/playlists/playlist1.m3u
completely/different-path/musicfiles/Album1
completely/different-path/musicfiles/Album1/track1
completely/different-path/musicfiles/Album2
completely/different-path/musicfiles/Album2/track2

and the playlist1.m3u file will continue to work correctly. This works for Windows, Mac, NAS and other Linux systems.

Regarding ';' separators in tag values, these are not handled by MinimServer but by your tagging program. It sounds like your tagging program is using ';' to split Genre values but not Custom6 values.
Find all posts by this user
Quote this message in a reply
27-02-2023, 16:34
Post: #3
RE: Separators in custom fields
Unfortunately the way I manage my library means that the folder structure does not always stay the same, so even relative paths won't work.

Thanks for the info regarding separator handling/tagging, I have raised a request in the relevant forum (MediaMonkey, I know it's one of your favourites!).
Find all posts by this user
Quote this message in a reply
08-03-2023, 23:51
Post: #4
RE: Separators in custom fields
I decided to give your m3u playlist idea a go.

My main problem now is that MS won't link the files because the programme I am using sets up the m3u playlists with backslashes, not forward slashes.

It looks like the general m3u format should accept both forward and back slashes, so is there any reason why MS recognises forward slashes only?
Find all posts by this user
Quote this message in a reply
09-03-2023, 11:26
Post: #5
RE: Separators in custom fields
On Windows, MinimServer recognizes both backslashes and forward slashes as path separators. Neither of these is a valid character in a filename, so this doesn't cause any problems.

On Linux, MinimServer recognizes forward slashes only as path separators. This is because a backslash is a valid character in a Linux filename, so you could have an audio file named (for example) back\slash.flac. To reference this file in a .m3u file, the entry would be

../some/path/back\slash.flac

If MinimServer were to treat backslashes as path separators on Linux, it would not be possible to reference this audio file in a .m3u file.
Find all posts by this user
Quote this message in a reply
09-03-2023, 12:34
Post: #6
RE: Separators in custom fields
Well that is pretty absolute! Thanks.

Back to the drawing board
Find all posts by this user
Quote this message in a reply
09-03-2023, 12:38
Post: #7
RE: Separators in custom fields
Have you found other UPnP servers that can use backslashes as path separators on Linux? I am wondering how they would handle this issue.
Find all posts by this user
Quote this message in a reply
09-03-2023, 15:20
Post: #8
RE: Separators in custom fields
No - MS is the only server I use.

It seems weird that Linux would accept \ in filenames as it's a fairly standard directory break (or whatever it may be called).
Find all posts by this user
Quote this message in a reply
09-03-2023, 17:54
Post: #9
RE: Separators in custom fields
I tried Asset UPnP for Synology and Synology Media Server to see how they handle this. These servers assume that both '/' and '\' represent a folder separator in the path. They don't allow a playlist to refer to a file containing a '\' character in its filename.

I think there could be a solution that works for both cases. A future version of MinimServer could look at the first '/' or '\' character in the path. If this character is a '/', MinimServer would work as it does now by using '/' characters as folder separators and '\' characters as filename characters. If this character is a '\', MinimServer would treat this character and all other '\' or '/' characters in the path as folder separators.

Here are some examples:

../a/b/c.mp3 would treat a and b as folder names and c.mp3 as a filename
..\a\b\c.mp3 would treat a and b as folder names and c.mp3 as a filename
../a/b\c.mp3 would treat a as a folder name and b\c.mp3 as a filename
..\a\b/c.mp3 would treat a and b as folder names and c.mp3 as a filename
Find all posts by this user
Quote this message in a reply
09-03-2023, 20:58
Post: #10
RE: Separators in custom fields
That looks like a good solution to me.

I have to admit though, on the MediaMonkey forums they have confirmed that the Mood tag (I tried this after the Custom ones) will be amended so that separators work properly, from the next release.

So from my point of view the problem has been solved, and so your solution above should probably be at the bottom of the pile given that (I assume) nobody has raised this before!

Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)