SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Tutorial: Preferences, Editing Scripts

Previous
Next

If using the Web UI select the script Add Album disambugation to Album title in the dropdown and then Edit we see

Name

The Add Album disambugation to Album title part is just the Name of the script, it could be anything but clearly makes sense to try and describe what the script does with a sensible name.

Script

The actual script is defined in the Script field, it is written in Javascript expression language,

This is similar to Filename Masks but there is an important difference. Filename Mask define a script that evaluates to a single value that is automatically assigned to the filename. But for scripts multiple fields can be modified and we have to specify the field(s) to modify.

Script Fields

The Script Fields lists all the metadata fields that can be used in the script.

The first list refers to the value of the metadata fields in the song being modified.

The second list refers to the values of the linked MusicBrainz album, so this allows us to get the original MusicBrainz values rather than the values stored in the song itself. This only has any effect if our song is linked to a MusicBrainz release by having a MB Track Id and MB Release Id

The third list refers to the value of the linked Discogs album so this allows us to get the original Discogs values rather than the values stored in the song itself. This only has any effect if our song is linked to a Discogs release by having a URl Discogs Release and matching discno/trackno to a track on the linked release.

The button to the right of the list add a version of the selected field to the script.

Simple
Adds the field

1st Value
Useful for fields with multiple values, adds only the 1st value for the field, only available for fields that can hold multiple values.

2nd Value
Useful for fields with multiple values, adds only the 2nd value for the field, only available for fields that can hold multiple values.

Functions

The Functions list all the predefined functions we have written that can be used in any script, this is additional to all the standard functions that come with Javascript Expression Language. The Use button adds the function prototype to the script, if the functions takes parameters the script needs to be modified to pass the correct arguments.

Examples

The Examples section uses three example files and lists any metadata fields that would be modified by running the script against the example songs.

If using the Desktop UI we can also edit the Javascript Functions and the Examples

If using Web UI then these must be accessed from the Preferences:Filename masks tab because the Web UI does not support popup windows within another popup window.

Examples and Functions are shared between Filename Masks and Scripter

Previous
Next