patch: sets default download progress to 0, orders active downloads ASC
This commit is contained in:
@@ -41,7 +41,7 @@ class DownloadRepository extends ServiceEntityRepository
|
||||
$firstResult = ($pageNumber - 1) * $perPage;
|
||||
$query = $this->createQueryBuilder('d')
|
||||
->andWhere('d.status IN (:statuses)')
|
||||
->orderBy('d.id', 'DESC')
|
||||
->orderBy('d.id', 'ASC')
|
||||
->setParameter('statuses', ['New', 'In Progress'])
|
||||
->setFirstResult($firstResult)
|
||||
->setMaxResults($perPage)
|
||||
@@ -66,6 +66,7 @@ class DownloadRepository extends ServiceEntityRepository
|
||||
->setImdbId($imdbId)
|
||||
->setMediaType($mediaType)
|
||||
->setBatchId($batchId)
|
||||
->setProgress(0)
|
||||
->setStatus($status);
|
||||
|
||||
$this->getEntityManager()->persist($download);
|
||||
|
||||
Reference in New Issue
Block a user