@@ -134,7 +134,7 @@ public function fetchFormats($force_pull = false)
134
134
$ this ->formats = unserialize (file_get_contents ($ this ->availableFormatsPath ));
135
135
} else {
136
136
$ creds = $ this ->getCreds ();
137
- $ out = shell_exec (' youtube-dl " ' . $ this ->url . '" --dump-json ' . $ creds );
137
+ $ out = shell_exec ($ GLOBALS [ ' config ' ][ ' ytd_binary ' ] . ' " ' . $ this ->url . '" --dump-json ' . $ creds );
138
138
$ json_formats = json_decode ($ out , 1 );
139
139
if (isset ($ json_formats )) {
140
140
foreach ($ json_formats ['formats ' ] as $ format ) {
@@ -341,7 +341,7 @@ private function dispatchToAria2c()
341
341
{
342
342
$ this ->incrementAttempts ();
343
343
$ creds = $ this ->getCreds ();
344
- $ url = shell_exec (' youtube-dl -f " ' . $ this ->selectedFormat . '" " ' . $ this ->url . '" -g ' . (($ this ->useCookiesForAria2c == 0 ) ? '' : '--cookies ' . $ this ->cookiesPath ) . $ creds );
344
+ $ url = shell_exec ($ GLOBALS [ ' config ' ][ ' ytd_binary ' ] . ' -f " ' . $ this ->selectedFormat . '" " ' . $ this ->url . '" -g ' . (($ this ->useCookiesForAria2c == 0 ) ? '' : '--cookies ' . $ this ->cookiesPath ) . $ creds );
345
345
if ($ url === "" || is_null ($ url )) {
346
346
return null ;
347
347
}
@@ -612,12 +612,12 @@ public function pListInternalQueue($type, $offset = 0, $limit = 100)
612
612
break ;
613
613
}
614
614
$ stmt = $ this ->connection ->prepare ("select count(id) as count from downloads where dispatched = :type_code " );
615
- $ stmt ->bindValue (':type_code ' , $ type_code );
615
+ $ stmt ->bindValue (':type_code ' , $ type_code );
616
616
$ stmt ->execute ();
617
617
$ count = $ stmt ->fetch (PDO ::FETCH_ASSOC );
618
618
$ pages = ceil ($ count ['count ' ] / $ limit );
619
619
$ stmt = $ this ->connection ->prepare ("select id, url, formatOption, download_url, opt, priority, attempts, addedTime, dispatched from downloads where dispatched = :type_code order by " . ($ type_code === 0 ? "priority desc, " : "" ) . " id " . ($ type_code === 0 ? "asc " : "desc " ) . " limit :limit offset :offset " );
620
- $ stmt ->bindValue (':limit ' , $ limit );
620
+ $ stmt ->bindValue (':limit ' , $ limit );
621
621
$ stmt ->bindValue (':offset ' , $ offset );
622
622
$ stmt ->bindValue (':type_code ' , $ type_code );
623
623
$ stmt ->execute ();
0 commit comments