Import Songs
Find files to import
findFilesToImport
Operator user required Frontend needs to be restricted or open
Given a folder and template, list files that can be improted with their metadata.
It only browses recursively down one level, to accomodate Ultrastar songs that reside each in their own directory.
Request
{
dirname: '/home/karaokemugen/myfiles/newsongs',
tempalte: '{singer} - {title}'
}
About the template.
Possible variables are:
{title}
: song title, required in the tempalte{year}
: identifies the song production year{tagtype}
: replace tagtype by any tagtype likesinger
,series
etc.
Response
{
[
{
directory: '/home/karaokemugen/myfiles/newsongs/',
oldFile: 'Corona - The Rhythm of the Night.mp4',
newFile: {
title: 'The Rhythm of the Night'
singer: 'Corona'
}
},
...
]
}
Response
{
code: 400,
message: {
code: 'IMPORT_SONG_TEMPLATE_MISSING_TITLE_ERROR'
}
}
Response
{
code: 400,
message: {
code: 'IMPORT_SONG_TEMPLATE_ERROR_DUPLICATE_TAG'
}
}
Response
{
code: 500,
message: {
code: 'IMPORT_SONG_TEMPLATE_ERROR'
}
}
Import base
importBase
Operator user required Frontend needs to be restricted or open
Import all songs from a directory into a repository
Request
{
source: '/home/karaokemugen/myfiles/'
tempalte: '{singer} - {title}'
repoDest: 'My Custom Songs'
}
This function runs asynchronously and doesn't return anything upon completion. Errors are reported through a Websocket notification though.
Returns an operatorNotificationError
event with the following data:
Response
{
code: 'NOTIFICATION.OPERATOR.ERROR.IMPORT_BASE_OK_BUT_ERRORS_SEE_LOGS'
}