Skip to content

Commit f0fa865

Browse files
committed
refactor(templates): organize
1 parent 0eea9c6 commit f0fa865

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
File renamed without changes.

index.html renamed to templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
1515
crossorigin="anonymous"
1616
/>
17-
<link href="youtube-dl/static/style.css" rel="stylesheet" />
17+
<link href="{{ url_for('static', path='/css/style.css') }}" rel="stylesheet">
1818

1919
<title>youtube-dl</title>
2020
</head>

youtube-dl-server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from youtube_dl import YoutubeDL
1414
from collections import ChainMap
1515

16-
templates = Jinja2Templates(directory="")
16+
templates = Jinja2Templates(directory="templates")
1717

1818
app_defaults = {
1919
"YDL_FORMAT": "bestvideo+bestaudio/best",
@@ -132,7 +132,7 @@ def download(url, request_options):
132132
Route("/youtube-dl", endpoint=dl_queue_list),
133133
Route("/youtube-dl/q", endpoint=q_put, methods=["POST"]),
134134
Route("/youtube-dl/update", endpoint=update_route, methods=["PUT"]),
135-
Mount("/youtube-dl/static", app=StaticFiles(directory="static"), name="static"),
135+
Mount("/static", app=StaticFiles(directory="static"), name="static"),
136136
]
137137

138138
app = Starlette(debug=True, routes=routes)

0 commit comments

Comments
 (0)