torrent-downloader-react 1.0.11__tar.gz → 1.0.13__tar.gz

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.
Files changed (15) hide show
  1. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/PKG-INFO +1 -1
  2. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/setup.py +4 -2
  3. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/server.py +16 -0
  4. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/PKG-INFO +1 -1
  5. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/requires.txt +2 -0
  6. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/setup.cfg +0 -0
  7. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/__init__.py +0 -0
  8. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/static/assets/index-BWN4x5dM.js +0 -0
  9. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/static/assets/index-DVy8AvwL.css +0 -0
  10. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/static/index.html +0 -0
  11. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader/static/vite.svg +0 -0
  12. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/SOURCES.txt +0 -0
  13. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/dependency_links.txt +0 -0
  14. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/entry_points.txt +0 -0
  15. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.13}/torrent_downloader_react.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: torrent-downloader-react
3
- Version: 1.0.11
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
@@ -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.11",
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": [
@@ -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':
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: torrent-downloader-react
3
- Version: 1.0.11
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
@@ -2,3 +2,5 @@ fastapi>=0.109.0
2
2
  uvicorn>=0.27.0
3
3
  pydantic>=2.0.0
4
4
  libtorrent>=2.0.0
5
+ pytest>=8.0.0
6
+ httpx>=0.27.0