summaryrefslogtreecommitdiff
path: root/libs/music/player.d/cgi-bin
diff options
context:
space:
mode:
Diffstat (limited to 'libs/music/player.d/cgi-bin')
-rwxr-xr-xlibs/music/player.d/cgi-bin/pcm.cgi10
1 files changed, 8 insertions, 2 deletions
diff --git a/libs/music/player.d/cgi-bin/pcm.cgi b/libs/music/player.d/cgi-bin/pcm.cgi
index a1dc27f..6e51018 100755
--- a/libs/music/player.d/cgi-bin/pcm.cgi
+++ b/libs/music/player.d/cgi-bin/pcm.cgi
@@ -4,6 +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/'
ro={'status':200,'message':'OK'}
if 'folder' not in d or d['folder']=='':
@@ -23,8 +24,13 @@ def getfilelist(d):
for line in f:
line=line.strip()
if len(line)>0:
- #hard code this for now, until pcm api stabilizes
- alblist.append({'fileName':quote(line+'.ogg'),'fileSize':0,'modifiedTime':0})
+ alblist.append({
+ 'fileName':quote(line+'.ogg'),
+ 'url':quote(AUDIO_BASE+line+'.ogg'),
+ 'displayName':quote(line),
+ 'fileSize':0,
+ 'modifiedTime':0
+ })
rro={'type':'fileList','data':{'musicList':alblist[1:],'subFolderList':list()}}
ro['result']=rro
print(json.dumps(ro))