Skip to content
This repository was archived by the owner on Mar 20, 2026. It is now read-only.
This repository was archived by the owner on Mar 20, 2026. It is now read-only.

Artists with special charachters like 'ø', and 'Ø' are hard to find #39

Description

@DyonR

Some artists, like Røza, F. NøIzE, MØSCARDO, and APHØTHIC are hard to find with the current find command.
The reason for this is, is that the bot does not take diacritical marks/accents into account. My Javascript knowledge is not amazing, so I asked ChatGPT for a concept fix.
I don't fully understand this, but maybe you could use this as a basis for a fix.

findSets(query)
{
	// Normalize the query
	query = query.toLowerCase().replace(/[oø]/g, 'o');

	var ret = [];
	for (var i = 0; i < this.schedule.length; i++) {
		var stage = this.schedule[i];
		for (var j = 0; j < stage.sets.length; j++) {
			var set = stage.sets[j];
			if (set.nothing) {
				continue;
			}
			// Normalize the set name
			var setNameNormalized = set.name.toLowerCase().replace(/[oø]/g, 'o');
			// Normalize the set.who if it exists
			var setWhoNormalized = set.who ? set.who.toLowerCase().replace(/[oø]/g, 'o') : null;

			if (setNameNormalized.indexOf(query) != -1 || (setWhoNormalized && setWhoNormalized.indexOf(query) != -1)) {
				ret.push({
					set: set,
					stage: stage
				});
			}
		}
	}
	return ret;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions