diff --git a/README.md b/README.md index 057d485..a2e9bc6 100755 --- a/README.md +++ b/README.md @@ -9,3 +9,14 @@ - [layer-8.moe](https://layer-8.moe/) > stay tuned + +--- + +## roadmap<sub>(sorta)</sub> of shame + +- [ ] write downloader to mask file paths +- [ ] fix routing system to mask get parameters (possibly nginx config) +- [ ] write id3 and flac tag extractor in php +- [ ] detail views for files of all types +- [ ] populate database +- [ ] invite regina \ No newline at end of file diff --git a/app/downloader.php b/app/downloader.php new file mode 100755 index 0000000..e69de29 diff --git a/app/tag_extractor.php b/app/tag_extractor.php new file mode 100755 index 0000000..784b287 --- /dev/null +++ b/app/tag_extractor.php @@ -0,0 +1,16 @@ +<?php + +function get_file_tags($input_file) { + $input_type = mime_content_type($input_file); + // echo $input_type; + + switch($input_type) { + case 'audio/mpeg': break; + case 'audio/flac': get_flac_tags($input_file); break; + default: echo("Ey boss, that file type is NOT okay."); die(); break; + } +} + +function get_flac_tags($input_file) { + echo(fread(fopen($input_file, 'r'), 4096)); +} \ No newline at end of file diff --git a/public/audio.php b/public/audio.php index bcf811d..945cc22 100755 --- a/public/audio.php +++ b/public/audio.php @@ -32,4 +32,9 @@ else { get_audio($pdo); } + + // TODO: remove this part: TESTING ONLY! + include_once('../app/tag_extractor.php'); + get_file_tags('../public/resources/aud/chronostasis.mp3'); + get_file_tags('F:\MEGA Backup\musik\chronostasis\01 the enigmatic benefits of chronostasis - dan the melon lord.flac'); ?>