torrent-downloader-react 1.0.15__py3-none-any.whl → 1.0.16__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.
@@ -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():
@@ -164,6 +168,7 @@ async def open_downloads():
164
168
  def main():
165
169
  """Entry point for the application."""
166
170
  import uvicorn
171
+ setup_static_files() # Set up static files before running
167
172
  uvicorn.run(app, host="127.0.0.1", port=8000)
168
173
 
169
174
  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.16
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
@@ -1,11 +1,11 @@
1
1
  torrent_downloader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- torrent_downloader/server.py,sha256=2pCQASAPSZQPWVKh5ZoIf9iM8YloHHpJVPNV-C4EGY4,5255
2
+ torrent_downloader/server.py,sha256=GFdt4CRIJtaGCZLX6z5nglICGwGSjelu2yp9ZhSdQuc,5531
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.15.dist-info/METADATA,sha256=bz667N36FQ4JSjGOzwbgGyvgUjFEcK4w-gJv3B1xJx8,4499
8
- torrent_downloader_react-1.0.15.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
9
- torrent_downloader_react-1.0.15.dist-info/entry_points.txt,sha256=zkljgTNEM0p9I4xw4FN0N5PVrNmB6KVLUWjBO32n0do,76
10
- torrent_downloader_react-1.0.15.dist-info/top_level.txt,sha256=THWnh7qxxVmoQ89QVJ8v6mmSzEQdFdXnryplXTQXuCA,19
11
- torrent_downloader_react-1.0.15.dist-info/RECORD,,
7
+ torrent_downloader_react-1.0.16.dist-info/METADATA,sha256=sj2Zf9enGSSl-1vvEB3rN4HMyQUFNXSDbaz1sZdT8zk,4499
8
+ torrent_downloader_react-1.0.16.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
9
+ torrent_downloader_react-1.0.16.dist-info/entry_points.txt,sha256=zkljgTNEM0p9I4xw4FN0N5PVrNmB6KVLUWjBO32n0do,76
10
+ torrent_downloader_react-1.0.16.dist-info/top_level.txt,sha256=THWnh7qxxVmoQ89QVJ8v6mmSzEQdFdXnryplXTQXuCA,19
11
+ torrent_downloader_react-1.0.16.dist-info/RECORD,,