# Disable directory listing
Options -Indexes

# Deny access to the folder itself
<If "%{REQUEST_URI} =~ m#^/yt/downloads/?$#">
    Require all denied
</If>

# Allow access to all audio files
<FilesMatch "\.(mp3|m4a|webm)$">
    Require all granted
</FilesMatch>
<FilesMatch "\.(webm|mp3|m4a|mp4|avi|wmv)$">
  ForceType application/octet-stream
  Header set Content-Disposition attachment
</FilesMatch>