diff options
author | Chris Xiong <chirs241097@gmail.com> | 2024-06-18 23:48:02 -0400 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2024-06-18 23:48:02 -0400 |
commit | f3040bedcae1f2639fe937590bd9f493157497da (patch) | |
tree | 4101b067c5e5fefce6633cd013dcaaf4cdcbaa96 /libs/music/player.d/cgi-bin | |
parent | 4607dabecdcf8649faf6b4135b8d0731c042a3f2 (diff) | |
download | web-f3040bedcae1f2639fe937590bd9f493157497da.tar.xz |
oh no shit's broken
Diffstat (limited to 'libs/music/player.d/cgi-bin')
-rwxr-xr-x | libs/music/player.d/cgi-bin/m3u8.cgi | 7 | ||||
-rwxr-xr-x | libs/music/player.d/cgi-bin/pcm.cgi | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/libs/music/player.d/cgi-bin/m3u8.cgi b/libs/music/player.d/cgi-bin/m3u8.cgi index 506ce0e..3e463ca 100755 --- a/libs/music/player.d/cgi-bin/m3u8.cgi +++ b/libs/music/player.d/cgi-bin/m3u8.cgi @@ -18,9 +18,10 @@ print('Content-type: audio/mpegurl',end='\r\n') print(end='\r\n') f.readline() try: - fmt=d['type'][0] if d['type'][0] in ['ogg','flac','opus','m4a'] else 'ogg' + fmt=d['type'][0] if d['type'][0] in ['vorbis','flac','opus','m4a'] else 'vorbis' except KeyError: - fmt='ogg' + fmt='vorbis' +ext='ogg' if fmt == 'vorbis' else fmt for line in f: - print(f'https://filestorage.chrisoft.org/music/{fmt}/{urllib.parse.quote(line.strip())}.{fmt}') + print(f'https://filestorage.chrisoft.org/music/{fmt}/{urllib.parse.quote(line.strip())}.{ext}') f.close() diff --git a/libs/music/player.d/cgi-bin/pcm.cgi b/libs/music/player.d/cgi-bin/pcm.cgi index 34539ad..460b1db 100755 --- a/libs/music/player.d/cgi-bin/pcm.cgi +++ b/libs/music/player.d/cgi-bin/pcm.cgi @@ -4,7 +4,7 @@ from urllib.parse import quote,unquote def getfilelist(d): fmt='ogg' if 'fmt' not in d else d['fmt'] - AUDIO_BASE='//filestorage.chrisoft.org/music/ogg/' + AUDIO_BASE='//filestorage.chrisoft.org/music/vorbis/' ro={'status':200,'message':'OK'} if 'folder' not in d or d['folder']=='': |