Sync File Masks Filenames [#16901][#16902]

Get answers about syncing MediaMonkey 4 with iPods and other devices.

Moderator: Gurus

CosmicKnowledge
Beiträge: 171
Registriert: So Mär 15, 2020 11:24 am

Sync File Masks Filenames [#16901][#16902]

Beitrag von CosmicKnowledge »

I think my player has problems with special characters. I'm using the Sync mask function in the device profile to create a new mask that uses 2 characters from the title, author, album name and track number. I have 100,000 song with some using special characters, foreign characters like Japanese, spaces, and null entries (no entry).

Is there something I can put into the character mask textbox to strip out anything but alphanumeric characters? I want it to generate only numbers and letters.
Lowlander
Beiträge: 59890
Registriert: Sa Sep 06, 2003 5:53 pm

Re: Sync File Masks Filenames

Beitrag von Lowlander »

I don't know if Sync uses [FilenameMappings] from the MediaMonkey.ini, but this is used to change characters to others when doing filename creation in MediaMonkey.
CosmicKnowledge
Beiträge: 171
Registriert: So Mär 15, 2020 11:24 am

Re: Sync File Masks Filenames

Beitrag von CosmicKnowledge »

I found the section but what exactly does it mean? e.g. 3A=2D? Is that hex?
Lowlander
Beiträge: 59890
Registriert: Sa Sep 06, 2003 5:53 pm

Re: Sync File Masks Filenames

Beitrag von Lowlander »

CosmicKnowledge
Beiträge: 171
Registriert: So Mär 15, 2020 11:24 am

Re: Sync File Masks Filenames

Beitrag von CosmicKnowledge »

Does the INI syntax read 'if this --> then replace with this'?
e.g. 3A=2D
== replace 3A with 2D?
CosmicKnowledge
Beiträge: 171
Registriert: So Mär 15, 2020 11:24 am

Re: Sync File Masks Filenames

Beitrag von CosmicKnowledge »

Lowlander hat geschrieben: ↑Do Aug 20, 2020 4:36 pm Yes, this may help: https://www.rapidtables.com/code/text/ascii-table.html
Also, won't that affect filenames on the host OS and not syncing to a device?
Lowlander
Beiträge: 59890
Registriert: Sa Sep 06, 2003 5:53 pm

Re: Sync File Masks Filenames

Beitrag von Lowlander »

Yes, that's how it replaces, and yes this is used when creating filename in MediaMonkey. I don't know if it's used for Sync, it's something you'll have to try as the alternative is use $Replace() in the Mask which is very tedious if you have lots of characters to replace.
CosmicKnowledge
Beiträge: 171
Registriert: So Mär 15, 2020 11:24 am

Re: Sync File Masks Filenames

Beitrag von CosmicKnowledge »

Lowlander hat geschrieben: ↑Do Aug 20, 2020 5:41 pm Yes, that's how it replaces, and yes this is used when creating filename in MediaMonkey. I don't know if it's used for Sync, it's something you'll have to try as the alternative is use $Replace() in the Mask which is very tedious if you have lots of characters to replace.
I think the developers will need to add a function to masks.. something like
alphanum($title,2) + alphanum($artist,2) + alphanum($track,2) + alphanum($album,2)
where the function is alphanum and it takes an input variable and the number of characters to output.
It would have to replace anything except alpanumeric inputs (no spaces, no hyphens, etc.).
CosmicKnowledge
Beiträge: 171
Registriert: So Mär 15, 2020 11:24 am

Sync with non-alpha characters

Beitrag von CosmicKnowledge »

I'm trying to sync to an SD card. I'm trying to figure out why the player only finds a fraction of the songs in the m3u8 playlist. I can't determine what the problem is but it might have to do with special characters. Is the character in this playlist (selected row on the right) the same thing as the character used on the filename (on the left)? When I copy the filename on the left and paste/search for that string in the text editor on the right, it does find it in the playlist.

Bild
Lowlander
Beiträge: 59890
Registriert: Sa Sep 06, 2003 5:53 pm

Re: Sync File Masks Filenames

Beitrag von Lowlander »

The square indicates that the text editor can't display the character. It likely is the same.

As your filenames make little sense any way you may want to go with Random Number as filename, this way preventing any special characters from tags to end up in the filename.
CosmicKnowledge
Beiträge: 171
Registriert: So Mär 15, 2020 11:24 am

Re: Sync File Masks Filenames

Beitrag von CosmicKnowledge »

Lowlander hat geschrieben: ↑Sa Aug 22, 2020 12:16 pm The square indicates that the text editor can't display the character. It likely is the same.

As your filenames make little sense any way you may want to go with Random Number as filename, this way preventing any special characters from tags to end up in the filename.
Random number and Autonumber were the first things I tried. There's one problem to both: they result in a geometric increase in the number of files. It appears that MM processes every playlist independently. So when a song exists in 3 playlists, it creates 3 different files on the device, each having a different name. In one experiment, I had 80GB of songs sync out to > 300GB, which exceeds the device capability.

Autonumber/Random would work *if* MM didn't create many copies of the same file.
Lowlander
Beiträge: 59890
Registriert: Sa Sep 06, 2003 5:53 pm

Re: Sync File Masks Filenames

Beitrag von Lowlander »

Correct, if a filename is unique MediaMonkey respects that and creates the multiple copies.
CosmicKnowledge
Beiträge: 171
Registriert: So Mär 15, 2020 11:24 am

Re: Sync File Masks Filenames

Beitrag von CosmicKnowledge »

Lowlander hat geschrieben: ↑Sa Aug 22, 2020 12:36 pm Correct, if a filename is unique MediaMonkey respects that and creates the multiple copies.
The input filename is not unique. MM is unnecessarily creating copies of the same input file onto the SD card because it appears to process every playlist separately rather. MM does not use the same output file if that file is used across various playlists.

Code: Alles auswählen

PC                  Playlist         Music Device
================   ===========       =============
MySong1.mp3   --->  Playlist 1  -->  Song1.mp3
              --->  Playlist 2  -->  Song2.mp3
              --->  Playlist 3  -->  Song3.mp3
              --->  Playlist 4  -->  Song4.mp3

This is a big problem that MM developers need to address because I can't sync due to the huge space requirements of creating so many unnecessary copies. I wish a programmer would contact me personally so I could show them the situation. There's also a problem where playlists on the device end up having less songs than the playlists on the PC.

Bottom line, I don't think there is a solution right now without developers fixing this in MM.
Lowlander
Beiträge: 59890
Registriert: Sa Sep 06, 2003 5:53 pm

Re: Sync File Masks Filenames

Beitrag von Lowlander »

The [FilenameMappings] method failed on sync?
CosmicKnowledge
Beiträge: 171
Registriert: So Mär 15, 2020 11:24 am

Re: Sync File Masks Filenames

Beitrag von CosmicKnowledge »

Lowlander hat geschrieben: ↑Sa Aug 22, 2020 12:52 pm The [FilenameMappings] method failed on sync?
Did not solve the problem. Not to mention the charactersets are huge. It's not just one or two characters. What is needed is a new function in the sync mask logic called ConvAlpha() which strips/converts non-alpha characters to strictly numbers and letters.

Not to mention, this really should be a developer solution rather than a customer one. Pretending I know nothing about computers, syncing doesn't work properly.
Antworten