mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 23:38:17 +01:00
Merge pull request 'merger: Fix f string bug' (#96) from nin0dev/poke:main into main
Reviewed-on: https://codeberg.org/ashley/poke/pulls/96
This commit is contained in:
commit
b6dda9ac2d
2 changed files with 4 additions and 9 deletions
|
@ -4,20 +4,15 @@ Takes 2 input streams, downloads them, and spits out a combined file.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Make sure `ffmpeg`, `wget`, and Python 3 are all installed.
|
1. Make sure `ffmpeg` and Python 3 are all installed.
|
||||||
2. Download the program files to your computer - `main.py` and `.env.example`.
|
2. Download the program files to your computer - `main.py` and `.env.example`.
|
||||||
3. Run `python3 -m pip install flask python-dotenv waitress`.
|
3. Run `python3 -m pip install aiohttp`.
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
1. Run `mv .env.example .env`, **even if you don't want to configure anything**.
|
|
||||||
2. Edit and fill in the values if needed.
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
1. `python3 main.py`.
|
1. `python3 main.py`.
|
||||||
2. If everything went well, you shouldn't see any output at launch.
|
2. If everything went well, you shouldn't see any output at launch.
|
||||||
3. You will now be able to call the server at the configured port.
|
3. You will now be able to call the server at :3030.
|
||||||
|
|
||||||
## Endpoints
|
## Endpoints
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ async def merge(request: aiohttp.web.Request):
|
||||||
#await response.write_eof()
|
#await response.write_eof()
|
||||||
else:
|
else:
|
||||||
# Likely to be chromium browser, so to avoid browser shitting itself we download file
|
# Likely to be chromium browser, so to avoid browser shitting itself we download file
|
||||||
job_id = f"{request.rel_url.query["id"]}_{request.rel_url.query["audio_itag"]}_{request.rel_url.query["video_itag"]}"
|
job_id = f'{request.rel_url.query["id"]}_{request.rel_url.query["audio_itag"]}_{request.rel_url.query["video_itag"]}'
|
||||||
if os.path.isfile(f"{job_id}.mp4"):
|
if os.path.isfile(f"{job_id}.mp4"):
|
||||||
return web.FileResponse(
|
return web.FileResponse(
|
||||||
path=f"{job_id}.mp4"
|
path=f"{job_id}.mp4"
|
||||||
|
|
Loading…
Reference in a new issue