parent
a611fc1789
commit
2aa2ca65dc
|
@ -8,3 +8,4 @@ stale_outputs_checked
|
|||
__pycache__
|
||||
Thoughts.iml
|
||||
.env
|
||||
*.pages
|
||||
|
|
|
@ -100,7 +100,7 @@ def post(request):
|
|||
"-i", thought.media.path,
|
||||
"-codec:a", "aac", "-vn",
|
||||
os.path.join(settings.MEDIA_ROOT, f"{thought.uuid}.aac")
|
||||
])
|
||||
], check=True)
|
||||
os.remove(os.path.join(settings.MEDIA_ROOT, f"{thought.uuid}.m4a")) # Remove the original file
|
||||
thought.media.name = f"{thought.uuid}.aac" # Update the file in the DB
|
||||
|
||||
|
|
|
@ -26,4 +26,3 @@ urlpatterns = [
|
|||
path("post", views.post, name="post"),
|
||||
path("feed", MainFeed())
|
||||
] + (static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG else [])
|
||||
|
||||
|
|
Loading…
Reference in New Issue