ADD: fooled around with fread, things are complicated tho
This commit is contained in:
parent
7865d33a2e
commit
23402ae046
11
README.md
11
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
|
0
app/downloader.php
Executable file
0
app/downloader.php
Executable file
16
app/tag_extractor.php
Executable file
16
app/tag_extractor.php
Executable 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));
|
||||
}
|
@ -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');
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user