Skip to content

Commit 786dcdd

Browse files
committed
actually activating that now yes good idea
1 parent 0fccada commit 786dcdd

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

index.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static function FetchStaleJobs()
101101
foreach($worker as $job)
102102
{
103103
$fn=$job->getFilename();
104-
if(subst($fn,-4)!==".job")
104+
if(substr($fn,-4)!==".job")
105105
{
106106
if($job->getCTime()<$cutoff)
107107
{
@@ -114,22 +114,22 @@ static function FetchStaleJobs()
114114

115115
static function NukeJob($jobid)
116116
{
117-
unlink(self::$jobpath . "/" . $jobid);
118-
unlink(self::$jobpath . "/" . $jobid.".job");
117+
@unlink(self::$jobpath . "/" . $jobid);
118+
@unlink(self::$jobpath . "/" . $jobid.".job");
119119

120120
$remover=new FilesystemIterator(self::$dl_dir_common."/".$jobid);
121121
foreach($remover as $item)
122122
{
123-
unlink(self::$dl_dir_common."/".$jobid."/".$item->getFilename());
123+
@unlink(self::$dl_dir_common."/".$jobid."/".$item->getFilename());
124124
}
125-
unlink(self::$dl_dir_common."/".$jobid);
125+
@unlink(self::$dl_dir_common."/".$jobid);
126126

127127
$remover=new FilesystemIterator(self::$dl_dir_mp3."/".$jobid);
128128
foreach($remover as $item)
129129
{
130-
unlink(self::$dl_dir_mp3."/".$jobid."/".$item->getFilename());
130+
@unlink(self::$dl_dir_mp3."/".$jobid."/".$item->getFilename());
131131
}
132-
unlink(self::$dl_dir_mp3."/".$jobid);
132+
@unlink(self::$dl_dir_mp3."/".$jobid);
133133
}
134134

135135
static function SetupDir($dirname)
@@ -156,6 +156,8 @@ static function Init()
156156

157157
self::$args['tmp']=self::$yt_dl_temp_path;
158158
self::$args['out-tpl']=self::$output_format;
159+
160+
self::FetchStaleJobs();
159161
self::LoadDownloader();
160162
return $dirs_present;
161163
}

0 commit comments

Comments
 (0)