diff options
Diffstat (limited to 'src/server/Main.hx')
| -rw-r--r-- | src/server/Main.hx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/server/Main.hx b/src/server/Main.hx index c5eb36f..e7c38a6 100644 --- a/src/server/Main.hx +++ b/src/server/Main.hx @@ -531,8 +531,7 @@ class Main { if (userList.admins.exists( a -> a.name.toLowerCase() == lcName && a.hash == hash)) { client.isAdmin = true; - } - else { + } else { serverMessage(client, "passwordMatchError"); send(client, {type: LoginError}); return; @@ -587,6 +586,17 @@ class Main { broadcast(data); case ServerMessage: + case GetYoutubeVideoInfo: + final url = data.getYoutubeVideoInfo.url; + YoutubeFallback.getInfo(url, info -> { + send(client, { + type: data.type, + getYoutubeVideoInfo: { + url: url, + response: info + } + }); + }); case AddVideo: if (isPlaylistLockedFor(client)) return; if (!checkPermission(client, AddVideoPerm)) return; @@ -1038,7 +1048,9 @@ class Main { duration: duration, time: time }); - while (flashbacks.length > FLASHBACKS_COUNT) flashbacks.pop(); + while (flashbacks.length > FLASHBACKS_COUNT) { + flashbacks.pop(); + } } function isPlaylistLockedFor(client:Client):Bool { |
