diff --git a/docker-compose.yml b/docker-compose.yml index 0138c8a..a1fc228 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,6 +63,8 @@ services: - MAIN_PORT_5000_TCP=tcp://main:5000 links: - main + volumes: + - ./state/liquidsoap/playlists:/playlists labels: - traefik.enable=true - traefik.frontend.rule=Host:radio.dodsorf.as diff --git a/state/liquidsoap/playlists/Daniel/Dan - Edgy Music YT.m3u b/state/liquidsoap/playlists/normal/Daniel/Dan - Edgy Music YT.m3u similarity index 98% rename from state/liquidsoap/playlists/Daniel/Dan - Edgy Music YT.m3u rename to state/liquidsoap/playlists/normal/Daniel/Dan - Edgy Music YT.m3u index 131aeb3..3ae23c9 100644 --- a/state/liquidsoap/playlists/Daniel/Dan - Edgy Music YT.m3u +++ b/state/liquidsoap/playlists/normal/Daniel/Dan - Edgy Music YT.m3u @@ -16,23 +16,3 @@ ffmpeg2wav:youtube-dl-x:https$(colon)//www.youtube.com/watch?v=R7IJC6nMons ffmpeg2wav:youtube-dl-x:https$(colon)//www.youtube.com/watch?v=0nlJuwO0GDs ffmpeg2wav:youtube-dl-x:https$(colon)//www.youtube.com/watch?v=KOrXKiSy8ZY ffmpeg2wav:youtube-dl-x:https$(colon)//www.youtube.com/watch?v=jDyZj4msaoE - - - - - - - - - - - - - - - - - - - - diff --git a/state/liquidsoap/playlists/Daniel/Dan - awesome.m3u b/state/liquidsoap/playlists/normal/Daniel/Dan - awesome.m3u similarity index 99% rename from state/liquidsoap/playlists/Daniel/Dan - awesome.m3u rename to state/liquidsoap/playlists/normal/Daniel/Dan - awesome.m3u index db900ad..e64cc85 100644 --- a/state/liquidsoap/playlists/Daniel/Dan - awesome.m3u +++ b/state/liquidsoap/playlists/normal/Daniel/Dan - awesome.m3u @@ -1,3 +1,4 @@ +#EXTINF #EXTINF:420,Savant feat. Qwentalis - Starscream Forever (Original Mix) ffmpeg2wav:youtube-dl-x:BkJtsNBL8Lc #EXTINF:248,Zelda Medley- Lindsey Stirling diff --git a/state/liquidsoap/playlists/Daniel/Dan - dontstarve1.m3u b/state/liquidsoap/playlists/normal/Daniel/Dan - dontstarve1.m3u similarity index 100% rename from state/liquidsoap/playlists/Daniel/Dan - dontstarve1.m3u rename to state/liquidsoap/playlists/normal/Daniel/Dan - dontstarve1.m3u diff --git a/state/liquidsoap/playlists/Daniel/Dan - dubstepthingies.m3u b/state/liquidsoap/playlists/normal/Daniel/Dan - dubstepthingies.m3u similarity index 100% rename from state/liquidsoap/playlists/Daniel/Dan - dubstepthingies.m3u rename to state/liquidsoap/playlists/normal/Daniel/Dan - dubstepthingies.m3u diff --git a/state/liquidsoap/playlists/Daniel/Dan - electronicrealmusic.m3u b/state/liquidsoap/playlists/normal/Daniel/Dan - electronicrealmusic.m3u similarity index 100% rename from state/liquidsoap/playlists/Daniel/Dan - electronicrealmusic.m3u rename to state/liquidsoap/playlists/normal/Daniel/Dan - electronicrealmusic.m3u diff --git a/state/liquidsoap/playlists/Daniel/Dan - hackingslashing.txt b/state/liquidsoap/playlists/normal/Daniel/Dan - hackingslashing.txt similarity index 100% rename from state/liquidsoap/playlists/Daniel/Dan - hackingslashing.txt rename to state/liquidsoap/playlists/normal/Daniel/Dan - hackingslashing.txt diff --git a/state/liquidsoap/playlists/Joakim/AlternativeJoa.m3u b/state/liquidsoap/playlists/normal/Joakim/AlternativeJoa.m3u similarity index 100% rename from state/liquidsoap/playlists/Joakim/AlternativeJoa.m3u rename to state/liquidsoap/playlists/normal/Joakim/AlternativeJoa.m3u diff --git a/state/liquidsoap/playlists/Joakim/JoakimDiverse.m3u b/state/liquidsoap/playlists/normal/Joakim/JoakimDiverse.m3u similarity index 100% rename from state/liquidsoap/playlists/Joakim/JoakimDiverse.m3u rename to state/liquidsoap/playlists/normal/Joakim/JoakimDiverse.m3u diff --git a/state/liquidsoap/playlists/Joakim/JoakimRemixes.m3u b/state/liquidsoap/playlists/normal/Joakim/JoakimRemixes.m3u similarity index 100% rename from state/liquidsoap/playlists/Joakim/JoakimRemixes.m3u rename to state/liquidsoap/playlists/normal/Joakim/JoakimRemixes.m3u diff --git a/state/liquidsoap/playlists/Musicals.m3u b/state/liquidsoap/playlists/normal/Musicals.m3u similarity index 100% rename from state/liquidsoap/playlists/Musicals.m3u rename to state/liquidsoap/playlists/normal/Musicals.m3u diff --git a/state/liquidsoap/playlists/Soundtracks.m3u b/state/liquidsoap/playlists/normal/Soundtracks.m3u similarity index 100% rename from state/liquidsoap/playlists/Soundtracks.m3u rename to state/liquidsoap/playlists/normal/Soundtracks.m3u diff --git a/state/liquidsoap/playlists/artists/ArianaGrande.m3u b/state/liquidsoap/playlists/normal/artists/ArianaGrande.m3u similarity index 100% rename from state/liquidsoap/playlists/artists/ArianaGrande.m3u rename to state/liquidsoap/playlists/normal/artists/ArianaGrande.m3u diff --git a/state/liquidsoap/playlists/artists/AstridS.m3u b/state/liquidsoap/playlists/normal/artists/AstridS.m3u similarity index 100% rename from state/liquidsoap/playlists/artists/AstridS.m3u rename to state/liquidsoap/playlists/normal/artists/AstridS.m3u diff --git a/state/liquidsoap/playlists/artists/Coldplay.m3u b/state/liquidsoap/playlists/normal/artists/Coldplay.m3u similarity index 100% rename from state/liquidsoap/playlists/artists/Coldplay.m3u rename to state/liquidsoap/playlists/normal/artists/Coldplay.m3u diff --git a/state/liquidsoap/playlists/artists/DemiLovato.m3u b/state/liquidsoap/playlists/normal/artists/DemiLovato.m3u similarity index 100% rename from state/liquidsoap/playlists/artists/DemiLovato.m3u rename to state/liquidsoap/playlists/normal/artists/DemiLovato.m3u diff --git a/state/liquidsoap/playlists/artists/KatyPerry.m3u b/state/liquidsoap/playlists/normal/artists/KatyPerry.m3u similarity index 100% rename from state/liquidsoap/playlists/artists/KatyPerry.m3u rename to state/liquidsoap/playlists/normal/artists/KatyPerry.m3u diff --git a/state/liquidsoap/playlists/artists/SelenaGomez.m3u b/state/liquidsoap/playlists/normal/artists/SelenaGomez.m3u similarity index 100% rename from state/liquidsoap/playlists/artists/SelenaGomez.m3u rename to state/liquidsoap/playlists/normal/artists/SelenaGomez.m3u diff --git a/state/liquidsoap/playlists/artists/ShawnMendes.m3u b/state/liquidsoap/playlists/normal/artists/ShawnMendes.m3u similarity index 100% rename from state/liquidsoap/playlists/artists/ShawnMendes.m3u rename to state/liquidsoap/playlists/normal/artists/ShawnMendes.m3u diff --git a/state/liquidsoap/playlists/artists/TaylorSwift.m3u b/state/liquidsoap/playlists/normal/artists/TaylorSwift.m3u similarity index 100% rename from state/liquidsoap/playlists/artists/TaylorSwift.m3u rename to state/liquidsoap/playlists/normal/artists/TaylorSwift.m3u diff --git a/state/liquidsoap/playlists/artists/ZaraLarsson.m3u b/state/liquidsoap/playlists/normal/artists/ZaraLarsson.m3u similarity index 100% rename from state/liquidsoap/playlists/artists/ZaraLarsson.m3u rename to state/liquidsoap/playlists/normal/artists/ZaraLarsson.m3u diff --git a/web/common.php b/web/common.php new file mode 100644 index 0000000..4104b5e --- /dev/null +++ b/web/common.php @@ -0,0 +1,75 @@ +";die(var_dump($path_errors));} + } + + // This is how we scan directories + static private function find_contents($dir){ + $result = array(); + $root = scandir($dir); + foreach($root as $value){ + if($value === '.' || $value === '..') {continue;} + if(is_file($dir.DIRECTORY_SEPARATOR.$value)){ + if(!self::$ext_filter || in_array(strtolower(pathinfo($dir.DIRECTORY_SEPARATOR.$value, PATHINFO_EXTENSION)), self::$ext_filter)){ + self::$files[] = $result[] = $dir.DIRECTORY_SEPARATOR.$value; + } + continue; + } + if(self::$recursive){ + foreach(self::find_contents($dir.DIRECTORY_SEPARATOR.$value) as $value) { + self::$files[] = $result[] = $value; + } + } + } + // Return required for recursive search + return $result; + } +} +?> diff --git a/web/playlist.php b/web/playlist.php new file mode 100644 index 0000000..f9d6b7a --- /dev/null +++ b/web/playlist.php @@ -0,0 +1,21 @@ +