summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2019-04-24 15:54:01 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-04-24 15:54:01 +0800
commit9718a3892c1d3ecbcab1409965ac55ed8ab1b388 (patch)
tree2e04ae1a72bb51f00e3ba2f625bbf990978cc697
parentc3102656799ab38243eafa4cc6c691a4aaccb751 (diff)
downloadweb-9718a3892c1d3ecbcab1409965ac55ed8ab1b388.tar.xz
Don't hardcode.
Also update (the currently invisible) audio gears.
-rwxr-xr-xlibs/music/header.html114
-rwxr-xr-xlibs/music/player.d/cgi-bin/m3u8.cgi3
2 files changed, 61 insertions, 56 deletions
diff --git a/libs/music/header.html b/libs/music/header.html
index 8441fce..8498157 100755
--- a/libs/music/header.html
+++ b/libs/music/header.html
@@ -1,55 +1,59 @@
-<html>
-<head>
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<title>Litter Rubbish Garbage Trash</title>
-<link rel=stylesheet href='../../common.css' type='text/css'>
-<style type="text/css">
-body
-{
- background: #acf;
- margin: 33px
-}
-pre, address
-{
- font-family: 'FreeMono', 'Courier New', Courier, monospace;
-}
-</style>
-</head>
-<body>
-<font size="6"><div class="TText"><a href="../../">Chrisoft</a>::Music Library</div></font>
-<p class="TText">Permissive licensed unless otherwise stated. Feel free to use.</p>
-<p class="TText"><a href="./player">Back to the player</a></p>
-<p>
-<div class="TText" style="padding:7px;border:1px solid #aaa;display:table;">
-<div style="text-align:center;">
-<b>Music production gears used by me</b> [<a href="#" onclick="var e=document.getElementById(&quot;list&quot;);if(e.style.display==&quot;block&quot;){e.style.display=&quot;none&quot;;this.innerHTML=&quot;show&quot;;}else {e.style.display=&quot;block&quot;;this.innerHTML=&quot;hide&quot;;}">show</a>]
-</div>
-<ul class="TText" id="list" style="display:none;">
- <li>Cubase Pro 9.5</li>
- <li>Cakewalk by BandLab</li>
- <li>Cakewalk SONAR Platinum Edition, Lifetime Pass on Steam</li>
- <li>Yamaha PSR-275</li>
- <li>Z3TA+ 1/2</li>
- <li>Retrologue 2</li>
- <li>Halion6, Halion Sonic 3 &amp; HSO</li>
- <li>Groove Agent 4 &amp; 2</li>
- <li>Cakewalk TTS-1</li>
- <li>Rapture Pro</li>
- <li>Dimension Pro</li>
- <li>Audio Fx Plugins bundled with Cubase Pro</li>
- <li>Audio Fx Plugins bundled with SONAR Platinum</li>
- <li>Edirol Super Quartet &amp; Orchestral</li>
- <li>Roland Sound Canvas VA</li>
- <li>FluidR3+GM2 Extensions</li>
- <li>The Grand 3 &amp; 2</li>
- <li>True Pianos 1.9</li>
- <li>Trilian &amp; Omnisphere</li>
- <li>EZDrummer + Electronic EZX + Claustrophobic EZX</li>
- <li>MusicLab RealGuitars/RealLPC/RealStrat 3</li>
- <li>Session Drummer 3</li>
- <li>Virtual Guitarist</li>
- <li>VG Electric Edition</li>
-</ul>
-</div>
-</p>
-
+<html>
+<head>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>Litter Rubbish Garbage Trash</title>
+<link rel=stylesheet href='../../common.css' type='text/css'>
+<style type="text/css">
+body
+{
+ background: #acf;
+ margin: 33px
+}
+pre, address
+{
+ font-family: 'FreeMono', 'Courier New', Courier, monospace;
+}
+</style>
+</head>
+<body>
+<font size="6"><div class="TText"><a href="../../">Chrisoft</a>::Music Library</div></font>
+<p class="TText">Permissive licensed unless otherwise stated. Feel free to use.</p>
+<p class="TText"><a href="./player">Back to the player</a></p>
+<p>
+<div class="TText" style="padding:7px;border:1px solid #aaa;display:table;">
+<div style="text-align:center;">
+<b>Music production gears used by me</b> [<a href="#" onclick="var e=document.getElementById(&quot;list&quot;);if(e.style.display==&quot;block&quot;){e.style.display=&quot;none&quot;;this.innerHTML=&quot;show&quot;;}else {e.style.display=&quot;block&quot;;this.innerHTML=&quot;hide&quot;;}">show</a>]
+</div>
+<ul class="TText" id="list" style="display:none;">
+ <li>Cubase Pro 9.5</li>
+ <li>Cakewalk by BandLab</li>
+ <li>Cakewalk SONAR Platinum Edition, Lifetime Pass on Steam</li>
+ <li>Cakewalk Pro Audio 9</li>
+ <li>Yamaha PSR-275</li>
+ <li>EDIROL SD-80</li>
+ <li>Focusrite Scarlett Solo</li>
+ <li>Z3TA+ 1/2</li>
+ <li>Retrologue 2</li>
+ <li>Halion 6, Halion Sonic 3 &amp; HSO</li>
+ <li>Groove Agent 5 &amp; 2</li>
+ <li>Cakewalk TTS-1</li>
+ <li>Rapture Pro</li>
+ <li>Dimension Pro</li>
+ <li>Audio Fx Plugins bundled with Cubase Pro</li>
+ <li>Audio Fx Plugins bundled with SONAR Platinum</li>
+ <li>EDIROL Super Quartet &amp; Orchestral</li>
+ <li>Roland Sound Canvas VA</li>
+ <li>FluidR3+GM2 Extensions</li>
+ <li>The Grand 3 &amp; 2</li>
+ <li>True Pianos 1.9</li>
+ <li>Trilian &amp; Omnisphere</li>
+ <li>EZDrummer + Electronic EZX + Claustrophobic EZX</li>
+ <li>MusicLab RealGuitars/RealLPC/RealStrat 3</li>
+ <li>Session Drummer 3</li>
+ <li>Kontakt 5, Electr6ity Library</li>
+ <li>Virtual Guitarist</li>
+ <li>VG Electric Edition</li>
+</ul>
+</div>
+</p>
+
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')