torrent-downloader-react 1.0.14__tar.gz → 1.0.16__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/PKG-INFO +1 -1
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/setup.py +1 -1
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader/server.py +7 -2
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader_react.egg-info/PKG-INFO +1 -1
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/setup.cfg +0 -0
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader/__init__.py +0 -0
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader/static/assets/index-BWN4x5dM.js +0 -0
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader/static/assets/index-DVy8AvwL.css +0 -0
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader/static/index.html +0 -0
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader/static/vite.svg +0 -0
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader_react.egg-info/SOURCES.txt +0 -0
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader_react.egg-info/dependency_links.txt +0 -0
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader_react.egg-info/entry_points.txt +0 -0
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader_react.egg-info/requires.txt +0 -0
- {torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader_react.egg-info/top_level.txt +0 -0
{torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader/server.py
RENAMED
@@ -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
|
-
|
30
|
-
|
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__":
|
File without changes
|
{torrent-downloader-react-1.0.14 → torrent-downloader-react-1.0.16}/torrent_downloader/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|