Poster search through a posters table and releases_poster_newest_idx; complete releases are final; the tail before everything (-3)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c9a9c0155e
commit
c0e00f1707
8 files changed
+105
-8
No files matched your search
@@ -61,7 +61,7 @@ test.group('Final completeness', (group) => {
|
||||
}
|
||||
const final = async (id: number) => {
|
||||
const r = await db.from('releases').where('id', id).firstOrFail()
|
||||
const { rows } = await db.rawQuery(`SELECT release_final(?, ?, ?, ?, ?) AS final`, [r.group_id, r.first_article, r.last_article, r.posted_at, r.last_posted_at])
|
||||
const { rows } = await db.rawQuery(`SELECT release_final(?, ?, ?, ?, ?, ?) AS final`, [r.group_id, r.first_article, r.last_article, r.posted_at, r.last_posted_at, r.complete])
|
||||
return rows[0].final as boolean
|
||||
}
|
||||
|
||||
@@ -76,6 +76,8 @@ test.group('Final completeness', (group) => {
|
||||
assert.isTrue(await final(middle))
|
||||
assert.isTrue(await final(first))
|
||||
assert.isFalse(await final(edge))
|
||||
// Complete there: every file found, nothing to wait for.
|
||||
assert.isTrue(await final(await release(196_000, '2026-01-01T22:30:00Z', { files: 5, complete: true, name: 'Complete.Edge' })))
|
||||
assert.isFalse(await final(island))
|
||||
|
||||
// Search: an incomplete release that isn't final isn't left out as incomplete; the API says which is final.
|
||||
|
||||
Reference in new issue
Block a user