summaryrefslogtreecommitdiff
path: root/libs/music/player.d/cgi-bin
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2021-11-15 02:56:17 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2021-11-15 02:56:17 +0800
commitae0e6ac0effd0cef0d61231f62d559ac68db8dee (patch)
treea16848b3c6ec291b4270e14e38ddba9834d24bc7 /libs/music/player.d/cgi-bin
parent4b382cfa467b7eb480e4e574d09092e4ce5735c4 (diff)
downloadweb-ae0e6ac0effd0cef0d61231f62d559ac68db8dee.tar.xz
Warder's magic modules.
Also minor fix to PCM backend.
Diffstat (limited to 'libs/music/player.d/cgi-bin')
-rwxr-xr-xlibs/music/player.d/cgi-bin/pcm.cgi4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/music/player.d/cgi-bin/pcm.cgi b/libs/music/player.d/cgi-bin/pcm.cgi
index 65aa0a6..e43262f 100755
--- a/libs/music/player.d/cgi-bin/pcm.cgi
+++ b/libs/music/player.d/cgi-bin/pcm.cgi
@@ -1,6 +1,6 @@
#!/usr/bin/python3
import sys,os,cgi,json
-from urllib.parse import quote
+from urllib.parse import quote,unquote
d=cgi.parse(fp=sys.stdin)
print('Status: 200 OK',end='\r\n')
@@ -19,7 +19,7 @@ if 'folder' not in d or d['folder']=='':
ro['result']=rro
print(json.dumps(ro))
else:
- alp=os.environ['DOCUMENT_ROOT']+'/libs/music/player.d/playlists/'+d['folder'][0].strip('/')+'.playlist'
+ alp=os.environ['DOCUMENT_ROOT']+'/libs/music/player.d/playlists/'+unquote(d['folder'][0]).strip('/')+'.playlist'
alblist=list()
with open(alp,mode='r',encoding='utf-8') as f:
for line in f: