Added HOST and PORT config and updated the readme.md

This commit is contained in:
UrloMythus
2024-07-11 11:35:53 +02:00 Unverified
parent 2362c28dd0
commit dd13d16363
5 changed files with 99 additions and 7 deletions
+90 -4
View File
@@ -1,111 +1,197 @@
# MammaMia
A Stremio Addon for high quality HTTPS Stream in Italian
While hosting, this project, remember that Filmpertutti uses Mixdrop. Mixdrop only allows seeing the videos only from the same IP where they were generated so, if you want to scrape filmpertutti, you have to host this project locally. Else, you can only scrape streamingcommunity.
Hosting your own instance is suggested but you can use the public instance [linked](https://mammamia-urlo-mammamia.hf.space/) in the About Page of the repo.
# Installation
## Local
Install required packages
``
pip install -r requirements.txt
``
Then to start the Flask server just execute:
``
python3 run.py
``
## Hugging Face
To host this project with Hugging Face, go to the [linked](https://huggingface.co/spaces/MammaMia-Urlo/MammaMia/) page and follow these steps
1. Create an Hugging Face Account
2. Click on three dots on the top (right) part of the screen
3. Click Duplicate this Space
4. Insert TMDB Key
5. Clone the Project
6. You are done!
7. To install it on Stremio altought, you will need the Direct URL. It can be found on three dots --> Embed This Space --> Direct URL
8. Do not forget to add /manifest.json
On Hugging Face you are forced to use the 8080 port because it is the only one allowed to send/get network requests. Moreover remember that load_env needs to be disabled (it should be by default if you clone the project from HF)
## Render
To install this project on [Render](https://render.com/) follow these steps:
1. Create an Account
2. Create a Web Service
3. Clone the repo
4. Among the other environment variables, put PORT = 8080. This is needed because render needs the Port given as an environment variable.
5. As build command put `` pip install -r requirements `` and as run command put ``python3 run.py ``
6. Then just finish Render Setup and you are done :)
Remember, load_env needs to be disabled in the config.json
# How to add to Stremio
Just paste the URL/manifest.json in your search bar.
# Enviroment Variables
| Enviroment Variable | Value |
|-------------------------|---|
|TMDB_KEY|INSERT YOUR API KEY HERE|
Here is [linked](https://developer.themoviedb.org/docs/getting-started) a tutorial about how to get a TMDB KEY
# Config
In the repo there is a config.json that you can modify to change some aspects of the addon like the domains of the sites. Down here all explained:
| Enviroment Variable | Value |
| Config | Value |
|-------------------------|---|
| Domain | The domain of the site, must be a string |
|enabled | If the site is enabled or not. "1" means true. "0" means false. Remember there is no point in enabling filmpertutti on a remote server since it's IP-LOCKED|
|fast_search|"1" for enabled, "0" for disabled. It enables a faster search for TuttiFilm Provider but in case there are two movies/series with the exactly same name then it might take the wrong one|
|load_env|Put "1" if enabled, "0" if disabled. It needs to be enable if you need to load a .env file. On remote hosting services, like Hugging Face or Render, it needs to be disabled. |
|HOST| The host for the Flask APP|
|PORT| The port for the Flask APP. Default: 8080 |
Check those links to get the new Domain for the providers.
[FILMPERTUTTI](https://filmpertuttiiii.nuovo.live/)
[STREAMINGCOMMUNITY](https://t.me/+jlXmmprhtakxYWJh)
[TANTIFILM](https://tantinuovo.com/tantifilm-nuovo-indirizzo/)
Binary file not shown.
+3 -1
View File
@@ -15,7 +15,9 @@
}
},
"General":{
"load_env": "1"
"load_env": "1",
"HOST": "0.0.0.0",
"PORT": "8080"
}
}
+2
View File
@@ -16,3 +16,5 @@ STREAMINGCOMMUNITY = SITE["StreamingCommunity"]['enabled']
#General
GENERAL = config['General']
dotenv = GENERAL["load_env"]
HOST = GENERAL["HOST"]
PORT = GENERAL["PORT"]
+3 -1
View File
@@ -6,6 +6,8 @@ import config
FILMPERTUTTI = config.FILMPERTUTTI
STREAMINGCOMMUNITY = config.STREAMINGCOMMUNITY
HOST = config.HOST
PORT = int(config.PORT)
@@ -64,4 +66,4 @@ def addon_stream(type, id):
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8080)
app.run(host=HOST, port=PORT)