GUI-STUDIO commited on
Commit
8bb097e
·
1 Parent(s): 8aaf2c5

Refactor download/showtime crawling and probing

Browse files

Restructure download and showtime crawling logic to improve cache checks, provider fallbacks and probing. Introduces CHECK_CACHE enhancements (returns mp4/mkv lists, failed servers and internal 720p flag) and centralizes crawl orchestration with CRAWL_VID_VAULT and CRAWL_SHOWTIME_PORTAL returning unified results. construct_downloadable_list refactored to support ffmpeg v2 probe workflow, ping modes (1-by-1 or parallel), improved subtitle handling/formatting, dynamic file size handling, and delivery endpoint probing. Proxima/sub-router changes add robust upstream retry/fallback, content-type and content-length fixes, subtitle conversion adjustments, and various header/proxy handling improvements. Minor type updates in generic.ts and showtime-v2 cache-check condition fix. Adds two sample static files. Overall changes aim to make provider selection, probing and download URL construction more resilient and maintainable.

src/sub-router/ffmpeg/v2.ts CHANGED
@@ -91,6 +91,8 @@ const sub_router = new Elysia({ prefix: "/ffmpeg/v2" }).post(
91
  })
92
  });
93
 
 
 
94
  if (E_) {
95
  throw E_;
96
  }
 
91
  })
92
  });
93
 
94
+ console.error("\n", E_, "\n");
95
+
96
  if (E_) {
97
  throw E_;
98
  }
src/sub-router/ffmpeg/validator-v2.ts CHANGED
@@ -23,7 +23,7 @@ const playback = t.Object(
23
  }),
24
  picture_quality: t.Optional(
25
  t.String({
26
- minLength: 1,
27
  errorMessage: "Invalid picture quality"
28
  })
29
  )
@@ -37,7 +37,7 @@ const live = t.Object(
37
  {
38
  sbe_id: t.Optional(
39
  t.String({
40
- minLength: 1,
41
  errorMessage: "Invalid sbe id"
42
  })
43
  ),
@@ -52,7 +52,7 @@ const live = t.Object(
52
  ),
53
  delivery_name: t.Optional(
54
  t.String({
55
- minLength: 1,
56
  errorMessage: "Invalid delivery name"
57
  })
58
  ),
@@ -72,7 +72,7 @@ const live = t.Object(
72
  ),
73
  progress_update_endpoint: t.Optional(
74
  t.String({
75
- minLength: 1,
76
  errorMessage: "Invalid progress update endpoint"
77
  })
78
  )
 
23
  }),
24
  picture_quality: t.Optional(
25
  t.String({
26
+ minLength: 0,
27
  errorMessage: "Invalid picture quality"
28
  })
29
  )
 
37
  {
38
  sbe_id: t.Optional(
39
  t.String({
40
+ minLength: 0,
41
  errorMessage: "Invalid sbe id"
42
  })
43
  ),
 
52
  ),
53
  delivery_name: t.Optional(
54
  t.String({
55
+ minLength: 0,
56
  errorMessage: "Invalid delivery name"
57
  })
58
  ),
 
72
  ),
73
  progress_update_endpoint: t.Optional(
74
  t.String({
75
+ minLength: 0,
76
  errorMessage: "Invalid progress update endpoint"
77
  })
78
  )