Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - JonThysell

Pages: 1
Developers' Area / Intercept tagging when syncing to a device?
« on: September 30, 2022, 09:17:26 PM »
When syncing files to a device, there is built-in functionality to replace the Artist tag with Sort/Display Artist, and Genre with Genre Category.

Is there any way for a plugin to intercept the tagging during the sync and do other replacements?

I use my AsciiTools Plugin to ensure filenames are ASCII-only for devices which don't support Unicode. I like to be able to do the same with with tags, but in a way I can limit to only happen during device syncing. I.e., I want my source files to remain in Unicode, but have the device files use ASCII.

I can almost get there by forcing MP3s to be tagged with 2.3 ASCII, but then I have two problems:

1. I have to change the setting before every sync, then change it back before I edit any source files so I don't mess them up.
2. The IDS2.3 ASCII-only option leaves ? in my tags, so I'd prefer to use the ASCII Tools conversion which doesn't.



Plugins / ASCII Tools Plugin
« on: September 27, 2022, 03:29:03 AM »

I've created a plugin which (for now) provides a $TransliterateToAscii() function which can transliterate (or "Romanize") Unicode text into ASCII. I use it to make sure that even if my tags are in Unicode, the files have names in ASCII, to prevent issues with other hardware/software that aren't Unicode-friendly.

For example given a track with the following Unicode metadata:

Artist: Israel Kamakawiwoʻole
Title: Lā ʻElima

and setting the naming template to:

$TransliterateToAscii(<Artist>) - $TransliterateToAscii(<Title>)

you would get the ASCII filename:

Israel Kamakawiwo`ole - La `Elima.flac

I wrote it because sometimes I use older devices that use FAT32 disks, and FAT32 doesn't always play nicely with Unicode in the filenames.



While my example shows a simple example of stripping the vowel accents (ā to a) and replacing the ʻokina with a backtick (ʻ to `), the underlying library, AnyAscii, can do far more impressive transliterations, like 深圳 to ShenZhen, or Δημήτρης Φωτόπουλος to Dimitris Fotopoylos.

Pages: 1