The functions in this section are varied and have specialized applicability. Some are primarily used internally by MC to generate values available in various Library fields.
- Returns a file's calculated album artist.
The AlbumArtist() function calculates the album artist value used in various views and fields. It is used to populate the Library field album artist (auto) with its value. Either the field or AlbumArtist() can be used.
Returns the value present in the album artist (auto) field.
- Returns a unique album key for a file.
The AlbumKey() function returns "[album artist (auto)] - [album]". It is a convenience function, used to return the generally unique album / artist combination string used to distinguish between two like-named albums such as "Greatest Hits".
For an album named Greatest Hits and an album artist (auto) of The Eagles, returns The Eagles - Greatest Hits.
- Returns the album type for a file.
The AlbumType() function returns a description regarding an album's completeness and its quantity of artists. It is used to populate the Library field album type with its value. Either the field or AlbumType() can be used.
Returns, for example, Single artist (complete), or Multiple artists (incomplete).
- Returns the state of audio analysis for a file.
The AudioAnalysisState() function returns a file's state of audio analysis. It can be used to determine if audio analysis (Library Tools > Analyze Audio...) should be performed on a media file. The AudioAnalysisState() function will return a string indicating the state of analysis. Possible values are currently:
Returns, for example, Needed for files that require audio analysis, or N/A if the file type does not support audio analysis.
- Returns a character from the numeric code of that character
|Description||Char(Numeric Number Code)|
- Returns internal data to the expression language.
The CustomData() function supports returning Media Center internal data to the expression language. Currently the only supported mode provides a file's row number in a file list, which is useful in the Rename, Move & Copy tool to assist in numbering files. It can also be used in expressions in a playlist to obtain the file's sequence number.
Available mode values:
|Examples|| Spring_Break_Bash_padnumber(customdata(#), 4)
In the Rename, Move & Copy tool, each consecutive file would be named Spring_Break_Bash_ followed by a four digit, zero-padded number starting at 0001.
- Returns a list of playlists a file belongs to.
This function returns the list of playlists a file is in separated by semi-colons.
Using this will return a list of all the playlists a file is in, separated by semi-colons.
In and of itself, you might think that this is not 'all that', however, remember that we can combine this with other functions, thus giving us the ability to create expressions with playlist rules. A simple example would be:
which when used in the search bar, will return all files that appear on any playlist containing 'Genre' in its name
- Returns a string as given without any formatting or processing
Literal() returns a given string as-is without any formatting or processing
|Examples|| If(IsEqual([Artist], Queen, 1), Literal(If all music was Queen, I would be 10/10ths happy!), Literal(This is not Queen, which makes me sad. :-/))
/*Left(Theater,3) returns/* Left(Theater,3)
- Repeats a given string a specified number of times
|Description|| Repeat(Value, Count)
Repeats "Value", "Count" number of times.
- Returns the row number of a list entry
Row() returns the row number for each item in a list.
- Returns a file's size in a format specific to the media type.
The Size() function returns media size information specific to the particular media type. It is used to populate the Library fields duration and dimensions with their values. Either the field or Size() can be used.
Type of information reported by size for the file's media type:
Returns values such as 400x225 for images, or 3:09 for audio files.
- Converts an English string found in the program to the current language selected in the language menu
When using Media Center with any language other than English, the Translate() function can be used to translate an English string in the program to the current language.
- Returns the selected tree path.
Available mode values:
What this function does is self-explanatory. This conversation on the Interact forums demonstrates a practical use-case scenario.
- Miscellaneous television and other pre-formatted information.
The TVInfo() function is multi-purpose, and returns a specific type of information about television recordings, programs, and pre-formatted informational strings for use in captions, thumbnails, grouping, etc.
Available type values:
Returns formatted name and series output. If the file has no [series] value, only [name] is output.