ADD: fooled around with fread, things are complicated tho

This commit is contained in:
TheShinyMelon 2025-03-11 21:32:21 +01:00
parent 7865d33a2e
commit 23402ae046
4 changed files with 32 additions and 0 deletions

View File

@ -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

0
app/downloader.php Executable file
View File

16
app/tag_extractor.php Executable file
View File

@ -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));
}

View File

@ -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');
?>