Spaces:
Paused
Paused
Update commons/index.js
Browse files- commons/index.js +21 -9
commons/index.js
CHANGED
|
@@ -1,11 +1,23 @@
|
|
| 1 |
-
const
|
| 2 |
-
const
|
| 3 |
-
const
|
| 4 |
-
const
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
module.exports = {
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
}
|
|
|
|
| 1 |
+
const axios = require('axios');
|
| 2 |
+
const Catalog = require('./catalog');
|
| 3 |
+
const Meta = require('./meta');
|
| 4 |
+
const Stream = require('./stream');
|
| 5 |
|
| 6 |
+
// Define shared dependencies
|
| 7 |
+
const dependencies = {
|
| 8 |
+
httpClient: axios,
|
| 9 |
+
env: {
|
| 10 |
+
url: {
|
| 11 |
+
search: 'https://archive.org/advancedsearch.php',
|
| 12 |
+
metadata: 'https://archive.org/metadata',
|
| 13 |
+
stream: 'https://archive.org/download',
|
| 14 |
+
},
|
| 15 |
+
},
|
| 16 |
+
};
|
| 17 |
+
|
| 18 |
+
// Export Stremio add-on functions
|
| 19 |
module.exports = {
|
| 20 |
+
...Catalog(dependencies),
|
| 21 |
+
...Meta(dependencies),
|
| 22 |
+
...Stream(dependencies),
|
| 23 |
+
};
|
|
|