]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/server/servers.ts
Refactor server errors handler
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / server / servers.ts
index 6ab7bee9098e94b2e40db6ba789ee7c87fca5b8d..d04757470d15bf65d73cc130ed79e77e042d8ada 100644 (file)
@@ -37,6 +37,7 @@ interface ServerInfo {
   customConfigFile?: string
 
   accessToken?: string
+  refreshToken?: string
   videoChannel?: VideoChannel
 
   video?: {
@@ -44,9 +45,12 @@ interface ServerInfo {
     uuid: string
     name?: string
     url?: string
+
     account?: {
       name: string
     }
+
+    embedPath?: string
   }
 
   remoteVideo?: {
@@ -272,8 +276,12 @@ async function reRunServer (server: ServerInfo, configOverride?: any) {
   return server
 }
 
-function checkTmpIsEmpty (server: ServerInfo) {
-  return checkDirectoryIsEmpty(server, 'tmp', [ 'plugins-global.css' ])
+async function checkTmpIsEmpty (server: ServerInfo) {
+  await checkDirectoryIsEmpty(server, 'tmp', [ 'plugins-global.css', 'hls', 'resumable-uploads' ])
+
+  if (await pathExists(join('test' + server.internalServerNumber, 'tmp', 'hls'))) {
+    await checkDirectoryIsEmpty(server, 'tmp/hls')
+  }
 }
 
 async function checkDirectoryIsEmpty (server: ServerInfo, directory: string, exceptions: string[] = []) {