torrent-downloader-react 1.0.11__tar.gz → 1.0.13__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/PKG-INFO +1 -1
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/setup.py +4 -2
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/server.py +16 -0
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/PKG-INFO +1 -1
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/requires.txt +2 -0
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/setup.cfg +0 -0
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/__init__.py +0 -0
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/static/assets/index-BWN4x5dM.js +0 -0
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/static/assets/index-DVy8AvwL.css +0 -0
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/static/index.html +0 -0
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/static/vite.svg +0 -0
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/SOURCES.txt +0 -0
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/dependency_links.txt +0 -0
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/entry_points.txt +0 -0
- {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/top_level.txt +0 -0
@@ -7,7 +7,7 @@ with open(os.path.join(os.path.dirname(os.path.dirname(__file__)), "README.md"),
|
|
7
7
|
|
8
8
|
setup(
|
9
9
|
name="torrent-downloader-react",
|
10
|
-
version="1.0.
|
10
|
+
version="1.0.13",
|
11
11
|
packages=find_packages(),
|
12
12
|
install_requires=[
|
13
13
|
"fastapi>=0.109.0",
|
@@ -15,7 +15,9 @@ setup(
|
|
15
15
|
"pydantic>=2.0.0",
|
16
16
|
# Note: On macOS, you need to install libtorrent-rasterbar first:
|
17
17
|
# brew install libtorrent-rasterbar
|
18
|
-
"libtorrent>=2.0.0"
|
18
|
+
"libtorrent>=2.0.0",
|
19
|
+
"pytest>=8.0.0",
|
20
|
+
"httpx>=0.27.0"
|
19
21
|
],
|
20
22
|
entry_points={
|
21
23
|
"console_scripts": [
|
{torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/server.py
RENAMED
@@ -1,5 +1,7 @@
|
|
1
1
|
from fastapi import FastAPI, HTTPException
|
2
2
|
from fastapi.middleware.cors import CORSMiddleware
|
3
|
+
from fastapi.staticfiles import StaticFiles
|
4
|
+
from fastapi.responses import FileResponse
|
3
5
|
from pydantic import BaseModel
|
4
6
|
import libtorrent as lt
|
5
7
|
import os
|
@@ -21,6 +23,20 @@ app.add_middleware(
|
|
21
23
|
allow_headers=["*"],
|
22
24
|
)
|
23
25
|
|
26
|
+
# Get the directory containing the static files
|
27
|
+
static_dir = Path(__file__).parent / "static"
|
28
|
+
|
29
|
+
# Mount static files
|
30
|
+
app.mount("/assets", StaticFiles(directory=str(static_dir / "assets")), name="assets")
|
31
|
+
|
32
|
+
@app.get("/")
|
33
|
+
async def read_root():
|
34
|
+
return FileResponse(str(static_dir / "index.html"))
|
35
|
+
|
36
|
+
@app.get("/favicon.ico")
|
37
|
+
async def favicon():
|
38
|
+
return FileResponse(str(static_dir / "favicon.ico"))
|
39
|
+
|
24
40
|
# Set up platform-specific paths
|
25
41
|
def get_downloads_dir() -> Path:
|
26
42
|
if sys.platform == 'win32':
|
File without changes
|
{torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|