Skip to content

Instantly share code, notes, and snippets.

@7coil
Last active February 8, 2019 00:56
Show Gist options
  • Save 7coil/d4145767ff1163f1c4de7bd889812626 to your computer and use it in GitHub Desktop.
Save 7coil/d4145767ff1163f1c4de7bd889812626 to your computer and use it in GitHub Desktop.
Thanks Mazda

GraceNote Asterisk Fix

Thanks to Mazda's in car entertainment system using GraceNote, your tags you put in each MP3 are wasted.

This script adds an asterisk to the front of each artist, which throws GraceNote off it's guard, falling back onto the metadata within the MP3 file.


BLACKMILL IN YOUR AREA

/**
* \file AddAnAsterisk.qml
* Thanks to Mazda's in car entertainment system using GraceNote,
* your tags you put in each MP3 are wasted.
*
* This script adds an asterisk to the front of each artist,
* which throws GraceNote off it's guard, falling back onto
* the metadata within the MP3 file.
*
* \b Project: Kid3
* \author 7coil
* \date 08 Feb 2019
*/
import Kid3 1.1
Kid3Script {
onRun: {
function doWork() {
if (app.selectionInfo.tag(Frame.Tag_2).tagFormat) {
var artist = app.getFrame(tagv2, 'artist')
if (artist[0] !== '*') {
app.setFrame(tagv2, 'artist', '* ' + artist)
console.log('Added asterisk to: ' + artist)
} else {
console.log('Ignored: ' + artist + '. Already has asterisk')
}
}
if (!nextFile()) {
if (isStandalone()) {
// Save the changes if the script is started stand-alone, not from Kid3.
app.saveDirectory()
}
Qt.quit()
} else {
setTimeout(doWork, 1)
}
}
firstFile()
doWork()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment