更新 'SrcLive.js'

master
src48597962 6 months ago
parent 4bd7ffc24e
commit f5e386866e
  1. 7
      SrcLive.js

@ -130,10 +130,11 @@ function Live() {
if (JYlives[i].indexOf('#genre#') > -1) { if (JYlives[i].indexOf('#genre#') > -1) {
group = JYlives[i].split(',')[0]; group = JYlives[i].split(',')[0];
} else if (JYlives[i].indexOf(',') > -1) { } else if (JYlives[i].indexOf(',') > -1) {
datalist.push({ group: group, name: JYlives[i].split(',')[0].trim() }); let one = JYlives[i].split(',');
datalist.push({ group: group, name: one[0].trim(), url: one[1].trim() });
} }
} else if (JYlives[i].indexOf('group-title') > -1) { } else if (JYlives[i].indexOf('group-title') > -1) {
datalist.push({ group: JYlives[i].match(/group-title="(.*?)"/)[1], name: JYlives[i].match(/",(.*?)\n/)[1] }); datalist.push({ group: JYlives[i].match(/group-title="(.*?)"/)[1], name: JYlives[i].match(/",(.*?)\n/)[1], url: JYlives[i].split("\n")[1] });
} }
} catch (e) { } catch (e) {
//log(e.message); //log(e.message);
@ -146,6 +147,8 @@ function Live() {
obj[next.name] ? "" : (obj[next.name] = true && newArr.push(next)); obj[next.name] ? "" : (obj[next.name] = true && newArr.push(next));
return newArr; return newArr;
}, []); }, []);
log(datalist.length);
log(datalist[0]);
storage0.putMyVar('JYlive_datalist', datalist); storage0.putMyVar('JYlive_datalist', datalist);
} }

Loading…
Cancel
Save