Mythus commited on
Commit
2addd09
·
verified ·
1 Parent(s): 9a50916

Delete run.py

Browse files
Files changed (1) hide show
  1. run.py +0 -46
run.py DELETED
@@ -1,46 +0,0 @@
1
- from flask import Flask, jsonify, abort
2
- from filmpertutti import get_stream_link
3
-
4
- app = Flask(__name__)
5
-
6
- MANIFEST = {
7
- "id": "org.stremio.mammamia",
8
- "version": "1.0.0",
9
- "catalogs": [],
10
- "resources": ["stream"],
11
- "types": ["movie", "series"],
12
- "name": "Mamma Mia",
13
- "description": "Addon providing HTTPS Stream for Italian Movies/Series",
14
- "logo":"https://creazilla-store.fra1.digitaloceanspaces.com/emojis/49647/pizza-emoji-clipart-md.png"
15
- }
16
-
17
- def respond_with(data):
18
- resp = jsonify(data)
19
- resp.headers['Access-Control-Allow-Origin'] = '*'
20
- resp.headers['Access-Control-Allow-Headers'] = '*'
21
- return resp
22
-
23
- @app.route('/manifest.json')
24
- def addon_manifest():
25
- return respond_with(MANIFEST)
26
-
27
- @app.route('/')
28
- def root():
29
- return "Hello, this is a Stremio Addon providing HTTPS Stream for Italian Movies/Series, to install it add /manifest.json to the url and then add it into the Stremio search bar"
30
-
31
-
32
-
33
- @app.route('/stream/<type>/<id>.json')
34
- def addon_stream(type, id):
35
- if type not in MANIFEST['types']:
36
- abort(404)
37
-
38
- url = get_stream_link(id) # call the function to dynamically get stream links
39
- print(url)
40
-
41
- streams = {'streams': [{'title': 'Stream URL', 'url': url}]}
42
-
43
- return respond_with(streams)
44
-
45
- if __name__ == '__main__':
46
- app.run(host='0.0.0.0', port=8080)