We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The issue here is the error just gives me empty quotes... is there something wrong with my implementation ?
` public function writeMetadata($token) {
require_once base_path('vendor/james-heinrich/getid3/getid3/getid3.php'); $track = Track::where('token', $token)->first(); $content = Storage::disk('s3')->get($track->key); $tempPath = storage_path('tempfile.mp3'); if ($content === false) { // Handle error; file download failed Log::error("Failed to download the file"); return; } file_put_contents($tempPath, $content); $tagwriter = new getid3_writetags; $tagwriter->filename = $tempPath; $tagwriter->tagformats = array('id3v2.3'); $TagData = [ 'title' => ["The mofo title"], 'artist' => ["Yaldi crew"], 'album' => ["yeer maw's got a boaby"], 'year' => ["1994"], 'genre' => ["grunge pop"], 'composer' => ["yer da"], // Add more fields as needed ]; $tagwriter->tag_data = $TagData; // Write tags if (!$tagwriter->WriteTags()) { if (is_array($tagwriter->errors)) { // If errors are in an array, use implode to convert them to a string echo("Failed to write tags for track {$token}: ".implode(", ", $tagwriter->errors)); } else { // If it's not an array, log it directly. Might need to convert to string if it's not echo("Failed to write tags for track {$token}: ".$tagwriter->errors); } } else { echo("wrote tags"); } Storage::disk('s3')->put($track->key, file_get_contents($tempPath)); // Clean up the temporary file try { unlink($tempPath); } catch (\Exception $e) { Log::error("Failed to delete the temporary file: ".$e->getMessage()); } }
`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The issue here is the error just gives me empty quotes... is there something wrong with my implementation ?
`
public function writeMetadata($token)
{
`
The text was updated successfully, but these errors were encountered: