Add check to sub-process

* Add pages file to gitignore
This commit is contained in:
MatthiasSaihttam 2021-09-11 10:56:54 -04:00
parent a611fc1789
commit 2aa2ca65dc
3 changed files with 2 additions and 2 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ stale_outputs_checked
__pycache__
Thoughts.iml
.env
*.pages

View File

@ -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

View File

@ -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 [])