|
|
|
@ -4,6 +4,7 @@ class Download { |
|
|
|
public $_id; |
|
|
|
public $timestamp; |
|
|
|
public $premURL; |
|
|
|
public $url; |
|
|
|
public $filename; |
|
|
|
public $cstate; |
|
|
|
static public $validStates = ['added', 'downloaded', 'dupp']; |
|
|
|
@ -49,6 +50,7 @@ class Download { |
|
|
|
'_id' => new MongoId(), |
|
|
|
'timestamp' => $myTime, |
|
|
|
'premURL' => $premInfos['location'], |
|
|
|
'url' => $url, |
|
|
|
'filename' => $premInfos['filename'], |
|
|
|
'cstate' => 'added' |
|
|
|
]; |
|
|
|
@ -73,6 +75,7 @@ class Download { |
|
|
|
$this->_id = $dbRet['_id']; |
|
|
|
$this->timestamp = $dbRet['timestamp']; |
|
|
|
$this->premURL = $dbRet['premURL']; |
|
|
|
$this->url = $dbRet['url']; |
|
|
|
$this->filename = $dbRet['filename']; |
|
|
|
$this->cstate = $dbRet['cstate']; |
|
|
|
} |
|
|
|
|