aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/server-commands/server/servers.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/server-commands/server/servers.ts')
-rw-r--r--shared/server-commands/server/servers.ts21
1 files changed, 20 insertions, 1 deletions
diff --git a/shared/server-commands/server/servers.ts b/shared/server-commands/server/servers.ts
index 0faee3a8d..29f01774d 100644
--- a/shared/server-commands/server/servers.ts
+++ b/shared/server-commands/server/servers.ts
@@ -39,11 +39,30 @@ async function cleanupTests (servers: PeerTubeServer[]) {
39 return Promise.all(p) 39 return Promise.all(p)
40} 40}
41 41
42function getServerImportConfig (mode: 'youtube-dl' | 'yt-dlp') {
43 return {
44 import: {
45 videos: {
46 http: {
47 youtube_dl_release: {
48 url: mode === 'youtube-dl'
49 ? 'https://yt-dl.org/downloads/latest/youtube-dl'
50 : 'https://api.github.com/repos/yt-dlp/yt-dlp/releases',
51
52 name: mode
53 }
54 }
55 }
56 }
57 }
58}
59
42// --------------------------------------------------------------------------- 60// ---------------------------------------------------------------------------
43 61
44export { 62export {
45 createSingleServer, 63 createSingleServer,
46 createMultipleServers, 64 createMultipleServers,
47 cleanupTests, 65 cleanupTests,
48 killallServers 66 killallServers,
67 getServerImportConfig
49} 68}