Skip to content

Commit

Permalink
Merge pull request #6 from ctpk/master
Browse files Browse the repository at this point in the history
Set Content-type for audio files to audio/
  • Loading branch information
Aquafina-water-bottle authored Feb 17, 2023
2 parents 6ecaf53 + 6ab5438 commit 89d3d03
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 89d3d03

Please sign in to comment.