torrent-downloader-react 1.0.11__py3-none-any.whl → 1.0.13__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- torrent_downloader/server.py +16 -0
- {torrent_downloader_react-1.0.11.dist-info → torrent_downloader_react-1.0.13.dist-info}/METADATA +3 -1
- {torrent_downloader_react-1.0.11.dist-info → torrent_downloader_react-1.0.13.dist-info}/RECORD +6 -6
- {torrent_downloader_react-1.0.11.dist-info → torrent_downloader_react-1.0.13.dist-info}/WHEEL +0 -0
- {torrent_downloader_react-1.0.11.dist-info → torrent_downloader_react-1.0.13.dist-info}/entry_points.txt +0 -0
- {torrent_downloader_react-1.0.11.dist-info → torrent_downloader_react-1.0.13.dist-info}/top_level.txt +0 -0
torrent_downloader/server.py
CHANGED
@@ -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':
|
{torrent_downloader_react-1.0.11.dist-info → torrent_downloader_react-1.0.13.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: torrent-downloader-react
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.13
|
4
4
|
Summary: A modern, user-friendly torrent downloader application
|
5
5
|
Home-page: https://github.com/yourusername/torrent-downloader
|
6
6
|
Author: Your Name
|
@@ -28,6 +28,8 @@ Requires-Dist: fastapi>=0.109.0
|
|
28
28
|
Requires-Dist: uvicorn>=0.27.0
|
29
29
|
Requires-Dist: pydantic>=2.0.0
|
30
30
|
Requires-Dist: libtorrent>=2.0.0
|
31
|
+
Requires-Dist: pytest>=8.0.0
|
32
|
+
Requires-Dist: httpx>=0.27.0
|
31
33
|
|
32
34
|
# Torrent Downloader
|
33
35
|
|
{torrent_downloader_react-1.0.11.dist-info → torrent_downloader_react-1.0.13.dist-info}/RECORD
RENAMED
@@ -1,11 +1,11 @@
|
|
1
1
|
torrent_downloader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
-
torrent_downloader/server.py,sha256=
|
2
|
+
torrent_downloader/server.py,sha256=2pCQASAPSZQPWVKh5ZoIf9iM8YloHHpJVPNV-C4EGY4,5255
|
3
3
|
torrent_downloader/static/index.html,sha256=zzC3ohQn0Mw48CgKPhvFnrYJfFz00-c3vC-GS-eCjv8,464
|
4
4
|
torrent_downloader/static/vite.svg,sha256=SnSK_UQ5GLsWWRyDTEAdrjPoeGGrXbrQgRw6O0qSFPs,1497
|
5
5
|
torrent_downloader/static/assets/index-BWN4x5dM.js,sha256=FWGVaR7i3650zle1WwZ7OHFd0er5X6UNKpyCz1Fpo48,188702
|
6
6
|
torrent_downloader/static/assets/index-DVy8AvwL.css,sha256=5bEvGbnqbN9-WNs8tlnCu9rLWY5ubfi33-xuAF4Hkz4,3517
|
7
|
-
torrent_downloader_react-1.0.
|
8
|
-
torrent_downloader_react-1.0.
|
9
|
-
torrent_downloader_react-1.0.
|
10
|
-
torrent_downloader_react-1.0.
|
11
|
-
torrent_downloader_react-1.0.
|
7
|
+
torrent_downloader_react-1.0.13.dist-info/METADATA,sha256=JNVh3mwaNa5jhXvL2SYK6muP1eNltZX3f4QigarLvkA,4499
|
8
|
+
torrent_downloader_react-1.0.13.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
9
|
+
torrent_downloader_react-1.0.13.dist-info/entry_points.txt,sha256=zkljgTNEM0p9I4xw4FN0N5PVrNmB6KVLUWjBO32n0do,76
|
10
|
+
torrent_downloader_react-1.0.13.dist-info/top_level.txt,sha256=THWnh7qxxVmoQ89QVJ8v6mmSzEQdFdXnryplXTQXuCA,19
|
11
|
+
torrent_downloader_react-1.0.13.dist-info/RECORD,,
|
{torrent_downloader_react-1.0.11.dist-info → torrent_downloader_react-1.0.13.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|
File without changes
|