Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Feb 4, 2025
1 parent 4d1f2ca commit 2d95834
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions objects/Encoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,19 @@ public static function getYoutubeDl($videoURL, $queue_id, $destinationFile, $add
{
global $global;
$videoURL = str_replace("'", '', $videoURL);
$videoURL = trim($videoURL);
if(strpos($videoURL, "/") === 0){
if(!file_exists($videoURL)){
$videoURL2 = str_replace(' ', '-', $videoURL);
if(file_exists($videoURL2)){
$videoURL = $videoURL2;
}else{
_error_log("getYoutubeDl: Local file does not exists $videoURL " . json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)));
return false;
}
}
}

$videoURL = escapeshellarg($videoURL);
$tmpfname = _get_temp_file('youtubeDl');

Expand Down

0 comments on commit 2d95834

Please # to comment.