{c:Chorus}
{tempo-android:60}
-{zoom-android:1.3710576}
\ No newline at end of file
+{zoom-android:1.3710576}{musicpath:/storage/emulated/0/SongBook/Media/Across the Universe.mp3}
{title:All You Need Is Love}
-{subtitle:ohn Lennon/Paul McCartney}
+{subtitle:John Lennon/Paul McCartney}
{c:Intro}
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (Win98; U) [Netscape]">
- <title>Songbook" Artist</title>
+ <title>Songbook Artist</title>
<link rel="stylesheet" type="text/css" media="screen" href="/css/Music.css">
<link rel="stylesheet" type="text/css" media="print" href="/css/Print.css">
<link rel="SHORTCUT ICON" href="http://defaria.com/favicon.ico" type="image/png">
function getSongs () {
global $songs;
- $path = $baseDir . "../Songs/*.pro";
+ $path = "/opt/clearscm/songbook/Songs";
// Why didn't the previous one execute correctly?
- $songs = glob($baseDir . '../Songs/*.pro');
+ $songs = glob("$path/*.pro");
} // getSongs
function songsDropdown () {
global $songs;
- print "<form method=\"post\" action=\"webchord.cgi\" name=\"song\">";
+ print "<form method=\"get\" action=\"webchord.cgi\" name=\"song\">";
print "Songs: ";
print "<select name=\"chordpro\">";
$title = basename ($song, ".pro");
$artist = getArtist ($song);
+ print "<option value=\"$title.pro\">$title</option>";
+
if ($artist != "") {
$title .= " ($artist)";
} // if
-
- print "<option value=\"$song\">$title</option>";
} // foreach
print "<input type=\"submit\" value=\"Go\">";
$artists = getArtists ($songs);
- print "<form method=\"post\" action=\"displayartist.php\" name=\"artist\">";
+ print "<form method=\"get\" action=\"displayartist.php\" name=\"artist\">";
print "Artists: ";
print "<select name=\"artist\">";
my $debug = param ('debug');
my $infile = param ('chordpro');
+unless (-f $infile) {
+ $infile = '/opt/clearscm/songbook/Songs/' . $infile;
+
+ unless (-f $infile) {
+ print "Unable to $infile";
+ exit 1;
+ } # unless
+} # unless
sub debug ($) {
my ($msg) = @_;
debug "ENTER musicFileExists ($song)";
my $title = fileparse ($song, qr/\.pro/);
- my $musicfile = "/songbook/Media/$title.mp3";
+ my $musicfile = "/opt/clearscm/songbook/Media/$title.mp3";
- if (-r "$documentRoot$musicfile") {
+ if (-r $musicfile) {
debug "Exists!";
return $title;
} else {
- debug "Could not find $documentRoot$musicfile";
+ debug "Could not find $musicfile";
return undef;
} # if
print <<"END";
<td align="right">
<audio controls autoplay>
- <source src="http://defaria.com/songbook/Media/$title.mp3" type='audio/mp3'>
+ <source src="http://defaria.com/Media/$title.mp3" type='audio/mp3'>
<p>Your user agent does not support the HTML5 Audio element.</p>
</audio>
</td>