node-taglib-sharp / Exports / Genres
"Well known" genres and methods for converting between numeric representations of them and the string representation of them.
• new Genres()
▪ Static Readonly AUDIO_GENRES: string[]
ID3v1 audio genres. Index corresponds to the numeric value of the genre.
▪ Static Readonly VIDEO_GENRES: string[]
DivX video genres. Index corresponds to the numeric value of the genre.
▸ Static audioToIndex(name): number
Gets the genre index for a specified audio genre.
| Name | Type | Description |
|---|---|---|
name |
string |
Name of the genre to lookup |
number
Index of the genre in the audio array or 255 if it could not be found.
▸ Static indexToAudio(index, allowParenthesis): string
Gets the audio genre name for a specified index.
| Name | Type | Description |
|---|---|---|
index |
string | number |
Index of the genre in the audio genre array. Can be a number, string or string wrapped in ( ), if allowParenthesis is set to true |
allowParenthesis |
boolean |
Whether or not a number wrapped in parentheses is allowed |
string
Genre name if found, or undefined if index is outside the
bounds of the audio genre array or if index is not valid.
▸ Static indexToVideo(index, allowParenthesis): string
Gets the video genre name for a specified index.
| Name | Type | Description |
|---|---|---|
index |
string | number |
Index of the genre in the video genre array. Can be a number, string or string wrapped in ( ) if allowParenthesis is set to true |
allowParenthesis |
boolean |
Whether or not a number wrapped in parentheses is allowed |
string
Genre name if found, or undefined if index is outside the
bounds of the video genre array or if index is not valid.
▸ Static videoToIndex(name): number
Gets the genre index for a specified video genre.
| Name | Type | Description |
|---|---|---|
name |
string |
Name of the genre to lookup |
number
Index of the genre in the video array or 255 if it could not be found.