Update index.js
Browse files
index.js
CHANGED
|
@@ -140,10 +140,8 @@ const m3u8_parse = async url => {
|
|
| 140 |
app.get('*', async (req, res) => {
|
| 141 |
try {
|
| 142 |
if (!/\/http/i.test(req.path)) return
|
| 143 |
-
const
|
| 144 |
-
|
| 145 |
-
const result = await upload_buffer(file_url)
|
| 146 |
-
res.send(result)
|
| 147 |
} catch (e) {
|
| 148 |
res.send(e.toString())
|
| 149 |
}
|
|
|
|
| 140 |
app.get('*', async (req, res) => {
|
| 141 |
try {
|
| 142 |
if (!/\/http/i.test(req.path)) return
|
| 143 |
+
const file = await m3u8_parse(req.path.replace(/^\//, ''))
|
| 144 |
+
res.send(await upload_buffer(file))
|
|
|
|
|
|
|
| 145 |
} catch (e) {
|
| 146 |
res.send(e.toString())
|
| 147 |
}
|