taslim19
commited on
Commit
·
fa83fbc
1
Parent(s):
79c6ac3
added cache
Browse files
DragMusic/utils/thumbnails.py
CHANGED
@@ -106,6 +106,7 @@ def draw_text_with_shadow(background, draw, position, text, font, fill, shadow_o
|
|
106 |
|
107 |
async def gen_thumb(videoid: str):
|
108 |
try:
|
|
|
109 |
if os.path.isfile(f"cache/{videoid}_v4.png"):
|
110 |
return f"cache/{videoid}_v4.png"
|
111 |
|
|
|
106 |
|
107 |
async def gen_thumb(videoid: str):
|
108 |
try:
|
109 |
+
os.makedirs('cache', exist_ok=True)
|
110 |
if os.path.isfile(f"cache/{videoid}_v4.png"):
|
111 |
return f"cache/{videoid}_v4.png"
|
112 |
|