Skip to content

Commit

Permalink
Added polish diacritics in non_ascii_equivalents.py
Browse files Browse the repository at this point in the history
  • Loading branch information
finem4n authored Oct 31, 2024
1 parent 437b7a6 commit 49dc251
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions plugins/non_ascii_equivalents/non_ascii_equivalents.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,32 @@
instead of displaying weird or blank symbols. It's an attempt to do a little
better than Musicbrainz's native "Replace non-ASCII characters" option.
Currently replaces characters on "album", "artist", and "title" tags.'''
Currently replaces characters on "album", "albumartist", "albumartists", "albumartistsort", "albumsort", "artist", "artists", "artistsort" and "title" tags.'''

CHAR_TABLE = {
# Acute # Grave # Umlaut # Circumflex
"Á": "A", "À": "A", "Ä": "A", "Â": "A",
"É": "E", "È": "E", "Ë": "E", "Ê": "E",
# Acute # Grave # Umlaut # Circumflex # Ogonek # Overdot # Slash
"Á": "A", "À": "A", "Ä": "A", "Â": "A", "Ą": "A",
"Ć": "C",
"É": "E", "È": "E", "Ë": "E", "Ê": "E", "Ę": "E",
"Í": "I", "Ì": "I", "Ï": "I", "Î": "I",
"Ł": "L",
"Ń": "N",
"Ó": "O", "Ò": "O", "Ö": "O", "Ô": "O",
"Ś": "S",
"Ú": "U", "Ù": "U", "Ü": "U", "Û": "U",
"Ý": "Y", "Ỳ": "Y", "Ÿ": "Y", "Ŷ": "Y",
"á": "a", "à": "a", "ä": "a", "â": "a",
"é": "e", "è": "e", "ë": "e", "ê": "e",
"Ź": "Z", "Ż": "Z",
"á": "a", "à": "a", "ä": "a", "â": "a", "ą": "a",
"ć": "c",
"é": "e", "è": "e", "ë": "e", "ê": "e", "ę": "e",
"í": "i", "ì": "i", "ï": "i", "î": "i",
"ł": "l",
"ń": "n",
"ó": "o", "ò": "o", "ö": "o", "ô": "o",
"ś": "s",
"ú": "u", "ù": "u", "ü": "u", "û": "u",
"ý": "y", "ỳ": "y", "ÿ": "y", "ŷ": "y",
"ź": "z", "ż": "z",

# Misc Letters
"Å": "AA",
Expand Down Expand Up @@ -126,7 +136,13 @@

FILTER_TAGS = [
"album",
"albumartist",
"albumartists",
"albumartistsort",
"albumsort",
"artist",
"artists",
"artistsort",
"title",
]

Expand Down

0 comments on commit 49dc251

Please sign in to comment.