Skip to content

Commit

Permalink
Issue 497: allow .m4a audio files.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed Aug 6, 2024
1 parent 350b5ec commit 1284c25
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lute/book/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class NewBookForm(FlaskForm):
validators=[
FileAllowed(
["txt", "epub", "pdf", "srt", "vtt"],
"Please upload a valid '.txt', '.epub', '.pdf', '.srt' or '.vtt' file.",
"Please upload a valid text (txt, epub, pdf, srt, vtt)",
)
],
)
Expand All @@ -45,8 +45,8 @@ class NewBookForm(FlaskForm):
"Audio file",
validators=[
FileAllowed(
["mp3", "wav", "ogg", "opus"],
"Please upload a valid audio file (mp3, wav, ogg, opus)",
["mp3", "m4a", "wav", "ogg", "opus"],
"Please upload a valid audio file (mp3, m4a, wav, ogg, opus)",
)
],
)
Expand Down
2 changes: 1 addition & 1 deletion lute/templates/book/create_new.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</tr>

<tr>
<td>{{ form.audiofile.label }}</td>
<td>{{ form.audiofile.label }} <i>(.mp3, .m4a, .wav, .ogg, .opus)</i></td>
<td>{{ form.audiofile() }}</td>
</tr>

Expand Down
3 changes: 1 addition & 2 deletions lute/templates/book/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
</tr>

<tr>
<td>{{ form.audiofile.label }}</td>
<td>
<td>{{ form.audiofile.label }} <i>(.mp3, .m4a, .wav, .ogg, .opus)</i></td>
{{ form.audiofile() }}
{{ form.audio_filename() }}
{% if book.audio_filename %}
Expand Down

0 comments on commit 1284c25

Please sign in to comment.