Download videos from oldest to newest
This commit is contained in:
parent
27e365de27
commit
e4630565fd
@ -43,7 +43,7 @@ func DownloadAllVideos(db *sql.DB) error {
|
||||
log.Printf("Starting downloads...")
|
||||
for {
|
||||
// Fetch the next record from the database
|
||||
row := db.QueryRow("select id, url, `cast`, title, description, upload_date, thumbnail from videos where state = 'pending' limit 1")
|
||||
row := db.QueryRow("select id, url, `cast`, title, description, upload_date, thumbnail from videos where state = 'pending' order by id desc limit 1")
|
||||
var id int
|
||||
var href, cast, title, description, uploadDateStr, thumbnailUrl string
|
||||
err = row.Scan(&id, &href, &cast, &title, &description, &uploadDateStr, &thumbnailUrl)
|
||||
|
Loading…
x
Reference in New Issue
Block a user