feat: add download tracking endpoints (sections 4.1, 4.2, 4.3, 4.4)
This commit is contained in:
@@ -361,6 +361,19 @@ func (e *TestEnv) CleanupBlocklist(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
// CleanupDownloadQueue removes all download_queue entries (for test cleanup).
|
||||
func (e *TestEnv) CleanupDownloadQueue(ctx context.Context) error {
|
||||
_, err := e.DB.Exec(ctx, "DELETE FROM download_queue")
|
||||
return err
|
||||
}
|
||||
|
||||
// CountDownloadQueue returns the number of entries in download_queue.
|
||||
func (e *TestEnv) CountDownloadQueue(ctx context.Context) (int64, error) {
|
||||
var count int64
|
||||
err := e.DB.QueryRow(ctx, "SELECT COUNT(*) FROM download_queue").Scan(&count)
|
||||
return count, err
|
||||
}
|
||||
|
||||
// GetAlbumsByArtistForeignID retrieves albums for an artist by foreign artist ID.
|
||||
func (e *TestEnv) GetAlbumsByArtistForeignID(ctx context.Context, foreignArtistID string) ([]map[string]any, error) {
|
||||
rows, err := e.DB.Query(ctx, `
|
||||
|
||||
Reference in New Issue
Block a user