Skip to content

Commit

Permalink
Set Content-type for audio files to audio/
Browse files Browse the repository at this point in the history
  • Loading branch information
ctpk committed Feb 17, 2023
1 parent 6ecaf53 commit 6ab5438
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugin/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ def get_audio(self, media_dir, file_path):

if audio_file.endswith(".mp3"):
self.send_response(200)
self.send_header("Content-type", "text/mpeg")
self.send_header("Content-type", "audio/mpeg")
elif audio_file.endswith(".aac"):
self.send_response(200)
self.send_header("Content-type", "text/aac")
self.send_header("Content-type", "audio/aac")
else:
self.send_response(400)
return
Expand All @@ -63,10 +63,10 @@ def _get_audio_android(self, source, file_path):
"""
if file_path.endswith(".mp3"):
self.send_response(200)
self.send_header("Content-type", "text/mpeg")
self.send_header("Content-type", "audio/mpeg")
elif file_path.endswith(".aac"):
self.send_response(200)
self.send_header("Content-type", "text/aac")
self.send_header("Content-type", "audio/aac")
else:
self.send_response(400)
return
Expand Down

0 comments on commit 6ab5438

Please sign in to comment.