torrent-downloader-react 1.0.15__tar.gz → 1.0.17__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.15 → torrent-downloader-react-1.0.17}/PKG-INFO +1 -1
  2. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/setup.py +1 -1
  3. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/torrent_downloader/server.py +10 -3
  4. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/torrent_downloader_react.egg-info/PKG-INFO +1 -1
  5. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/setup.cfg +0 -0
  6. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/torrent_downloader/__init__.py +0 -0
  7. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/torrent_downloader/static/assets/index-BWN4x5dM.js +0 -0
  8. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/torrent_downloader/static/assets/index-DVy8AvwL.css +0 -0
  9. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/torrent_downloader/static/index.html +0 -0
  10. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/torrent_downloader/static/vite.svg +0 -0
  11. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/torrent_downloader_react.egg-info/SOURCES.txt +0 -0
  12. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/torrent_downloader_react.egg-info/dependency_links.txt +0 -0
  13. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/torrent_downloader_react.egg-info/entry_points.txt +0 -0
  14. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/torrent_downloader_react.egg-info/requires.txt +0 -0
  15. {torrent-downloader-react-1.0.15 → torrent-downloader-react-1.0.17}/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.15
3
+ Version: 1.0.17
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.15",
10
+ version="1.0.17",
11
11
  packages=find_packages(),
12
12
  install_requires=[
13
13
  "fastapi>=0.109.0",
@@ -26,8 +26,12 @@ app.add_middleware(
26
26
  # Get the directory containing the static files
27
27
  static_dir = Path(__file__).parent / "static"
28
28
 
29
- # Mount static files
30
- app.mount("/assets", StaticFiles(directory=str(static_dir / "assets")), name="assets")
29
+ def setup_static_files():
30
+ """Set up static file serving. Called after app creation."""
31
+ if static_dir.exists():
32
+ # Mount static files only if the directory exists
33
+ if (static_dir / "assets").exists():
34
+ app.mount("/assets", StaticFiles(directory=str(static_dir / "assets")), name="assets")
31
35
 
32
36
  @app.get("/")
33
37
  async def read_root():
@@ -69,7 +73,9 @@ DOWNLOAD_PATH = get_downloads_dir()
69
73
 
70
74
  # Initialize libtorrent session
71
75
  session = lt.session()
72
- session.listen_on(6881, 6891)
76
+ settings = session.get_settings()
77
+ settings['listen_interfaces'] = '0.0.0.0:6881'
78
+ session.apply_settings(settings)
73
79
 
74
80
  # Store active torrents
75
81
  active_torrents: Dict[str, lt.torrent_handle] = {}
@@ -164,6 +170,7 @@ async def open_downloads():
164
170
  def main():
165
171
  """Entry point for the application."""
166
172
  import uvicorn
173
+ setup_static_files() # Set up static files before running
167
174
  uvicorn.run(app, host="127.0.0.1", port=8000)
168
175
 
169
176
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: torrent-downloader-react
3
- Version: 1.0.15
3
+ Version: 1.0.17
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