From de61d3abe993e9491b17ce5fbace29c2d3edd451 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 20 Oct 2018 21:58:40 +0000 Subject: [PATCH] megaplaylist --- docker-compose.yml | 2 + .../Daniel/Dan - Edgy Music YT.m3u | 20 ----- .../{ => normal}/Daniel/Dan - awesome.m3u | 1 + .../{ => normal}/Daniel/Dan - dontstarve1.m3u | 0 .../Daniel/Dan - dubstepthingies.m3u | 0 .../Daniel/Dan - electronicrealmusic.m3u | 0 .../Daniel/Dan - hackingslashing.txt | 0 .../{ => normal}/Joakim/AlternativeJoa.m3u | 0 .../{ => normal}/Joakim/JoakimDiverse.m3u | 0 .../{ => normal}/Joakim/JoakimRemixes.m3u | 0 .../playlists/{ => normal}/Musicals.m3u | 0 .../playlists/{ => normal}/Soundtracks.m3u | 0 .../{ => normal}/artists/ArianaGrande.m3u | 0 .../{ => normal}/artists/AstridS.m3u | 0 .../{ => normal}/artists/Coldplay.m3u | 0 .../{ => normal}/artists/DemiLovato.m3u | 0 .../{ => normal}/artists/KatyPerry.m3u | 0 .../{ => normal}/artists/SelenaGomez.m3u | 0 .../{ => normal}/artists/ShawnMendes.m3u | 0 .../{ => normal}/artists/TaylorSwift.m3u | 0 .../{ => normal}/artists/ZaraLarsson.m3u | 0 web/common.php | 75 +++++++++++++++++++ web/playlist.php | 21 ++++++ 23 files changed, 99 insertions(+), 20 deletions(-) rename state/liquidsoap/playlists/{ => normal}/Daniel/Dan - Edgy Music YT.m3u (98%) rename state/liquidsoap/playlists/{ => normal}/Daniel/Dan - awesome.m3u (99%) rename state/liquidsoap/playlists/{ => normal}/Daniel/Dan - dontstarve1.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/Daniel/Dan - dubstepthingies.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/Daniel/Dan - electronicrealmusic.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/Daniel/Dan - hackingslashing.txt (100%) rename state/liquidsoap/playlists/{ => normal}/Joakim/AlternativeJoa.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/Joakim/JoakimDiverse.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/Joakim/JoakimRemixes.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/Musicals.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/Soundtracks.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/artists/ArianaGrande.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/artists/AstridS.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/artists/Coldplay.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/artists/DemiLovato.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/artists/KatyPerry.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/artists/SelenaGomez.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/artists/ShawnMendes.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/artists/TaylorSwift.m3u (100%) rename state/liquidsoap/playlists/{ => normal}/artists/ZaraLarsson.m3u (100%) create mode 100644 web/common.php create mode 100644 web/playlist.php 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 @@ +