Skip to content

Commit

Permalink
Merge pull request #3 from jsmith0103/master
Browse files Browse the repository at this point in the history
Add .mp4 as viable file type
  • Loading branch information
hcgonzalezpr committed Apr 27, 2018
2 parents 868503c + 516ae78 commit 41d55c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/html/nbproject/private/
*.txt
6 changes: 3 additions & 3 deletions html/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<?php
// Path
$dir = "/home/pi/songs/";
$files = glob($dir . '*.mp3');
$files = glob($dir . '*.{mp3,mp4}', GLOB_BRACE);
$ar = null; ?>

<div data-role="page" id="home">
Expand Down Expand Up @@ -91,7 +91,7 @@
$ar = $artist;
}

echo '<li data-filtertext="' . $artist . ':' . $song . '" ><a href="#trackDialog" data-artist-title="' . $filename . '" onclick="selectTrack(\'' . $file . '\');" data-rel="dialog" data-transition="pop">' . $song . '</a></li>';
echo '<li data-filtertext="' . $artist . ':' . $song . '" ><a href="#trackDialog" data-artist-title="' . $filename . '" onclick="selectTrack(\'' . str_replace("'","\'",$file) . '\');" data-rel="dialog" data-transition="pop">' . $song . '</a></li>';
}
?></ul>
</div>
Expand Down Expand Up @@ -186,4 +186,4 @@ function xmlParser(xml) {
})(jQuery);
</script>
</body>
</html>
</html>

0 comments on commit 41d55c9

Please sign in to comment.