diff --git a/background-min.jpg b/background-min.jpg deleted file mode 100644 index 65fbe4c..0000000 Binary files a/background-min.jpg and /dev/null differ diff --git a/background.jpg b/background.jpg deleted file mode 100644 index 3bd5ea5..0000000 Binary files a/background.jpg and /dev/null differ diff --git a/docker-compose.yml b/docker-compose.yml index 4efd550..80ed25f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,3 +3,5 @@ services: image: nginx:latest ports: - '8080:80' + volumes: + - ./src:/var/www/html diff --git a/index.html b/index.html deleted file mode 100755 index f8fd9ac..0000000 --- a/index.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - -Ambient - - - -
- -
Ambient Music
-
My favorite soundtracks
such as Minecraft, Frostpunk, Warcraft and others ...
- -
- Handpicked ambient musics for work, focus and chill-out
from C418, Russell Brower, Piotr Musiał, and various artists.
-
- Total playtime: 1 hour 12 minutes -
- -
-
- (/) Title - Artist
- - - -
- -
-
Alternative play method:
- M3U Playlist -
-
- -
-
- - - diff --git a/playlist_gen.php b/playlist_gen.php deleted file mode 100644 index 6295012..0000000 --- a/playlist_gen.php +++ /dev/null @@ -1,101 +0,0 @@ -analyze($filename); - getid3_lib::CopyTagsToComments($fileinfo); // To get id3v1 and id3v2 tags at the same place. - $duration = (string)floor($fileinfo['playtime_seconds']); - $GLOBALS['TOTALTIME'] += $fileinfo['playtime_seconds']; - $artist = $fileinfo['comments']['artist'][0]; - $title = $fileinfo['comments']['title'][0]; - return '#EXTINF:'.$duration.','.$artist.' - '.$title; -} -/** - * Builds a m3u playlist from all mp3 files located in a directory. - * Returns a properly formatted m3u file. - * Input: $dir : directory to scan. - * $baseurl : Base URL where this directory is served. - * Output: (string) the resulting m3u file. - */ -function buildM3u($dir,$baseurl) -{ - $lines = Array(); - foreach(getFilesFromDir($dir) as $filename) - { - if (pathinfo($filename, PATHINFO_EXTENSION)=='mp3') - { - echo "Processing $filename\n"; - $lines[] = makeEXTInfLine($filename); - $lines[] = $baseurl.substr($filename, strlen($dir)); - } - } - return implode("\n",$lines); -} - -$data = buildM3u('.','https://ambient.colmaris.fr'); -file_put_contents('playlist.m3u',$data); -echo 'Playlist regénérée. Durée totale (en secondes): ',$GLOBALS['TOTALTIME']; -?> diff --git a/xspf_playlist.php b/xspf_playlist.php deleted file mode 100755 index 94cf5b2..0000000 --- a/xspf_playlist.php +++ /dev/null @@ -1,80 +0,0 @@ -\n".htmlspecialchars(trim($url))."\n".htmlspecialchars(trim($tracktitle))."\n".htmlspecialchars(trim($artist))."\n".$duration."000\n"; -} - -$lines = explode("\n",file_get_contents('playlist.m3u')); -$currentline = 0; -$nblines = count($lines); - -/* Example line: - #EXTINF:404,Jon Hopkins - The End - ^ ^ ^ track title - ^ ^ artist name - ^ duration (in seconds) - The next line contains the URL. - -This has to be transformed to: - - URLTracktitleArtistduration -*/ -$tracks = array(); -while ($currentline<$nblines ) { - $line = $lines[$currentline]; - if (startsWith($line,'#EXTINF:')) { - $data = substr($line, 8); // Remove #EXTINF: - - // Extract duration (in seconds) - $j = strpos($data,','); - $duration = intval(substr($data, 0, $j)); - $data = substr($data, $j+1); - - // Extract artist and track title - $k = strpos($data, ' - '); - $artist = substr($data, 0, $k); - $tracktitle = substr($data, $k+3); - - // Get URL in next line - $url = $lines[$currentline+1]; - - $currentline = $currentline + 1; - $tracks[] = buildTrackXspf($artist,$tracktitle,$duration,$url); // Build XSPF XML for this track - } - $currentline = $currentline + 1; -} - -shuffle($tracks); - - -echo << - -Alternative musics for Minecraft gameplay - - -XML; -foreach ($tracks as $track) { - echo $track; - echo "\n"; -} -echo << - -XML; -?>