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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (15) hide show
  1. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/PKG-INFO +1 -1
  2. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/setup.py +1 -1
  3. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/torrent_downloader/server.py +16 -0
  4. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/torrent_downloader_react.egg-info/PKG-INFO +1 -1
  5. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/setup.cfg +0 -0
  6. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/torrent_downloader/__init__.py +0 -0
  7. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/torrent_downloader/static/assets/index-BWN4x5dM.js +0 -0
  8. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/torrent_downloader/static/assets/index-DVy8AvwL.css +0 -0
  9. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/torrent_downloader/static/index.html +0 -0
  10. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/torrent_downloader/static/vite.svg +0 -0
  11. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/torrent_downloader_react.egg-info/SOURCES.txt +0 -0
  12. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/torrent_downloader_react.egg-info/dependency_links.txt +0 -0
  13. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/torrent_downloader_react.egg-info/entry_points.txt +0 -0
  14. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/torrent_downloader_react.egg-info/requires.txt +0 -0
  15. {torrent-downloader-react-1.0.11 → torrent-downloader-react-1.0.12}/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.12
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.12",
11
11
  packages=find_packages(),
12
12
  install_requires=[
13
13
  "fastapi>=0.109.0",
@@ -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.12
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