/** * "Well known" genres and methods for converting between numeric representations of them and the * string representation of them. */ export default class Genres { /** * ID3v1 audio genres. Index corresponds to the numeric value of the genre. */ static readonly AUDIO_GENRES: string[]; /** * DivX video genres. Index corresponds to the numeric value of the genre. */ static readonly VIDEO_GENRES: string[]; /** * Gets the genre index for a specified audio genre. * @param name Name of the genre to lookup * @returns Index of the genre in the audio array or 255 if it could not be found. */ static audioToIndex(name: string): number; /** * Gets the audio genre name for a specified index. * @param index Index of the genre in the audio genre array. Can be a `number`, * `string` or `string` wrapped in `( )`, if `allowParenthesis` is set * to `true` * @param allowParenthesis Whether or not a number wrapped in parentheses is allowed * @returns * Genre name if found, or `undefined` if `index` is outside the * bounds of the audio genre array or if `index` is not valid. */ static indexToAudio(index: number | string, allowParenthesis: boolean): string; static indexToAudioDirect(index: number | string): string; /** * Gets the video genre name for a specified index. * @param index Index of the genre in the video genre array. Can be a `number`, * `string` or `string` wrapped in `( )` if `allowParenthesis` is set * to `true` * @param allowParenthesis Whether or not a number wrapped in parentheses is allowed * @returns * Genre name if found, or `undefined` if `index` is outside the * bounds of the video genre array or if `index` is not valid. */ static indexToVideo(index: number | string, allowParenthesis: boolean): string; /** * Gets the genre index for a specified video genre. * @param name Name of the genre to lookup * @returns Index of the genre in the video array or 255 if it could not be found. */ static videoToIndex(name: string): number; private static stringToByte; }