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

Fix playlists

parent 72bb1cd2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!15Playlist system creation
......@@ -273,20 +273,19 @@ 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]*) - (.+) \[(.+)\] \(U\)/;
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 {
logger.debug("bbb",data);
dataObj = __mpdToObject(data);
logger.debug("aaa",data);
karaList = data.split("\n");
if(dataObj.continue){
karaList.splice(-3);
......@@ -294,7 +293,10 @@ class LktClient {
else{
karaList.splice(-1);
}
logger.debug("aaa",karaList);
logger.debug("aaa", karaList[0])
if(karaList[0] == "OK") {
client.close();
}
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