Skip to content
Extraits de code Groupes Projets
Valider 72bb1cd2 rédigé par Deurstann's avatar Deurstann
Parcourir les fichiers

Fixed regex for kara in playlists

parent 44926c26
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!15Playlist system creation
......@@ -273,18 +273,20 @@ class LktClient {
var dataObj;
var karaList;
var prevcont=0;
const regex = /([0-9]+) (vo|va|amv|cdg|vocaloid|autres|vtuber) - (jp|fr|en|ru|sp|it|ch|latin|heb|por|pol|kor|fin|ara|swe|de|multi|undefined) \/ (.+) - (OP|ED|IS|AMV|PV|MV|LIVE)([0-9]*) - (.+) \[ (.+) \]/;
const regex = /([0-9]+) (vo|va|amv|cdg|vocaloid|autres|vtuber) - (jp|fr|en|ru|sp|it|ch|latin|heb|por|pol|kor|fin|ara|swe|de|multi|undefined) \/ (.+) - (OP|ED|IS|AMV|PV|MV|LIVE)([0-9]*) - (.+) \[(.+)\] \(U\)/;
var reg = new RegExp(regex);
function __getResult(client) {
return new Promise(resolv => {
client.m_socket.setTimeout(0);
client.m_socket.on('data', data => {
if (!once) {
logger.debug(`listplaylist ${playlist}\n`);
client.m_socket.write(`listplaylist ${playlist}\n`);
once = true;
return null;
} else {
dataObj = __mpdToObject(data);
logger.debug("aaa",data);
karaList = data.split("\n");
if(dataObj.continue){
karaList.splice(-3);
......@@ -292,6 +294,7 @@ class LktClient {
else{
karaList.splice(-1);
}
logger.debug("aaa",karaList);
karaList.forEach(kara => {
matches = reg.exec(kara);
result.push( {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter