From 67dd6f3f394879c51d046ec42604bbe2f42face2 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 17 Jun 2020 16:32:16 +0100 Subject: [PATCH] switching computers --- index.js | 2 +- logs.log | 10 ++++++++++ public/index.js | 40 ++++++++++++++++++++-------------------- src/server.js | 7 +++---- src/youtubehelper.js | 26 +++++++++++++------------- 5 files changed, 47 insertions(+), 38 deletions(-) diff --git a/index.js b/index.js index 7ed79e4..164f07a 100644 --- a/index.js +++ b/index.js @@ -1 +1 @@ -require('./src/index').Main(); +require('./src/index').Main(); diff --git a/logs.log b/logs.log index 14dc0ea..38fb5f1 100644 --- a/logs.log +++ b/logs.log @@ -83,3 +83,13 @@ [17-06-20 16:13:11] HTTP server listening on port 8080 [17-06-20 16:13:11] WebSocket server listening on 8080 [17-06-20 16:13:12] New socket connection from ip: ::1, unique id: RGn4_bvVIIU5ZnRmAAAA +[17-06-20 16:17:31] HTTP server listening on port 8080 +[17-06-20 16:17:31] WebSocket server listening on 8080 +[17-06-20 16:17:31] New socket connection from ip: ::ffff:127.0.0.1, unique id: kE6N6WlZOyiXUADtAAAA +[17-06-20 16:20:21] HTTP server listening on port 8080 +[17-06-20 16:20:21] WebSocket server listening on 8080 +[17-06-20 16:20:21] New socket connection from ip: ::1, unique id: dMN1C-rdWGOkKQXjAAAA +[17-06-20 16:20:26] New socket connection from ip: ::1, unique id: y7S-wBJ2wUWMg1B4AAAB +[17-06-20 16:20:33] HTTP server listening on port 8080 +[17-06-20 16:20:33] WebSocket server listening on 8080 +[17-06-20 16:20:33] New socket connection from ip: ::1, unique id: Oxl6l70wqHl6Wx2zAAAA diff --git a/public/index.js b/public/index.js index 624c52a..4ab590a 100644 --- a/public/index.js +++ b/public/index.js @@ -1,20 +1,20 @@ -let Socket = io(); - -(() => -{ - console.log('Starting up'); -})(); - -const VideoInput = document.getElementById("VideosToRecord"); - -VideoInput.oninput = () => -{ - const ToSend = { - // TODO: add toggle - ExpectPreview: true, - Content: VideoInput.value.split('\n') - }; - Socket.emit('VideoListUpdate', ToSend); -}; - -Socket.on('VideoListResolution', (req) => console.log(req)); +let Socket = io(); + +(() => +{ + console.log('Starting up'); +})(); + +const VideoInput = document.getElementById("VideosToRecord"); + +VideoInput.oninput = () => +{ + const ToSend = { + // TODO: add toggle + ExpectPreview: true, + Content: VideoInput.value.split('\n') + }; + Socket.emit('VideoListUpdate', ToSend); +}; + +Socket.on('VideoListResolution', (req) => console.log(req)); diff --git a/src/server.js b/src/server.js index 4dcac7d..3c6f95d 100644 --- a/src/server.js +++ b/src/server.js @@ -52,12 +52,12 @@ async function VideoListUpdate(socket, req) // { // Error: bool, // Errors: [err], - // Content: { + // Content: [{ // id: int, // url: string, // valid: bool, // action: string - // } + // }] // } if (!req || !req.Content) @@ -67,10 +67,9 @@ async function VideoListUpdate(socket, req) socket.emit('VideoListResolution', Res); return; } - - const VideoArray = req.Content; + socket.emit('VideoListResolution', ); diff --git a/src/youtubehelper.js b/src/youtubehelper.js index 5169da4..e620cd5 100644 --- a/src/youtubehelper.js +++ b/src/youtubehelper.js @@ -1,13 +1,13 @@ -const YTDL = require('ytdl-core'); - -// TODO: does the video resolver need a queue? - -module.exports.GetVideoInfoArr = async (arr) => -{ - -} - -module.exports.GetVideoInfo = async (video) => -{ - -} +const YTDL = require('ytdl-core'); + +// TODO: does the video resolver need a queue? + +module.exports.GetVideoInfoArr = async (arr) => +{ + +} + +module.exports.GetVideoInfo = async (video) => +{ + +}