Update radiorec.py

Add  content Type for aac
This commit is contained in:
Frank 2019-11-01 23:00:28 +01:00 committed by GitHub
parent 1453a7efbc
commit c489d19299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -75,6 +75,8 @@ def record_worker(stoprec, streamurl, target_dir, args):
content_type = conn.getheader('Content-Type')
if(content_type == 'audio/mpeg'):
filename += '.mp3'
elif(content_type == 'application/aacp' or content_type == 'audio/aacp'):
filename += '.aac'
elif(content_type == 'application/ogg' or content_type == 'audio/ogg'):
filename += '.ogg'
elif(content_type == 'audio/x-mpegurl'):