diff options
Diffstat (limited to 'libs/music/player.d/cgi-bin')
-rwxr-xr-x | libs/music/player.d/cgi-bin/m3u8.cgi | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/music/player.d/cgi-bin/m3u8.cgi b/libs/music/player.d/cgi-bin/m3u8.cgi index c90871c..7e14493 100755 --- a/libs/music/player.d/cgi-bin/m3u8.cgi +++ b/libs/music/player.d/cgi-bin/m3u8.cgi @@ -1,10 +1,11 @@ #!/usr/bin/python3 import cgi +import os import urllib.parse d=cgi.parse() try: plist=d['plist'][0] - f=open(f'/var/www/html/libs/music/player.d/playlists/{plist}.playlist','r',encoding='UTF-8') + f=open(f'{os.environ["DOCUMENT_ROOT"]}/libs/music/player.d/playlists/{plist}.playlist','r',encoding='UTF-8') except (OSError,KeyError) as e: print('Status: 400 Bad Request',end='\r\n') print('Content-type: text/plain',end='\r\n') |