last final mod push
This commit is contained in:
parent
9180903557
commit
3e704559f5
2 changed files with 39 additions and 11 deletions
40
server.js
40
server.js
|
|
@ -139,13 +139,19 @@ fastify.get("/fields", async function (request, reply) {
|
|||
|
||||
let folders = [];
|
||||
for (const item of list) {
|
||||
var fields = JSON.parse((await fs.readFile('/media/storage/public/sound-parade/' + item + '/fields.json')).toString('utf8'));
|
||||
folders.push({
|
||||
foldername: item,
|
||||
group: fields.group,
|
||||
title: fields.title,
|
||||
comment: fields.comment,
|
||||
let json = await fs.readFile('/media/storage/public/sound-parade/' + item + '/fields.json')
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
if (json != undefined) {
|
||||
var fields = JSON.parse(json.toString('utf8'));
|
||||
folders.push({
|
||||
foldername: item,
|
||||
group: fields.group,
|
||||
title: fields.title,
|
||||
comment: fields.comment,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
reply.send(folders);
|
||||
|
|
@ -311,6 +317,28 @@ io.on("connection", function(socket) {
|
|||
io.emit("flow", req);
|
||||
});
|
||||
|
||||
socket.on("info", async (fn) => {
|
||||
|
||||
//get list
|
||||
let list = await fs.readdir('/media/storage/public/sound-parade/');
|
||||
//list.reverse();
|
||||
|
||||
// console.log(list);
|
||||
|
||||
let folders = [];
|
||||
for (const item of list) {
|
||||
var fields = JSON.parse((await fs.readFile('/media/storage/public/sound-parade/' + item + '/fields.json')).toString('utf8'));
|
||||
folders.push({
|
||||
foldername: item,
|
||||
group: fields.group,
|
||||
title: fields.title,
|
||||
comment: fields.comment,
|
||||
});
|
||||
}
|
||||
|
||||
fn(folders);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -133,12 +133,12 @@
|
|||
"audio": "https://p.dianaband.info/public/sound-parade/" + list[flow] + "/audio.mp3",
|
||||
"alt": "알트",
|
||||
"size": {
|
||||
"base": 40,
|
||||
"random": 20
|
||||
"base": 20,
|
||||
"random": 5
|
||||
},
|
||||
"y": {
|
||||
"base": 20,
|
||||
"random": 10
|
||||
"base": 10,
|
||||
"random": 50
|
||||
},
|
||||
"showtime": 20000
|
||||
};
|
||||
|
|
@ -163,7 +163,7 @@
|
|||
|
||||
im.position(
|
||||
windowWidth * (1 + fading_factor),
|
||||
(windowHeight * (object.y.base + object.y.random * Math.random()) * 0.5) / 100 // 좀더 위로 위로 - 50% (ratio)
|
||||
(windowHeight * (object.y.base + object.y.random * Math.random()) * 0.75) / 100 // 좀더 위로 위로 - 50% (ratio)
|
||||
);
|
||||
|
||||
//그림의 크기와 초기 위치 ==> 세로 보기인 경우
|
||||
|
|
|
|||
Loading…
Reference in a new issue