| 42 | } |
| 43 | |
| 44 | void CoverDownloadDialog::onDownloadProgress(int value, int range) |
| 45 | { |
| 46 | // Limit to once every five seconds, otherwise it's way too flickery. |
| 47 | // Ideally in the future we'd have some way to invalidate only a single cover. |
| 48 | if (m_last_refresh_time.GetTimeSeconds() >= 5.0f) |
| 49 | { |
| 50 | emit coverRefreshRequested(); |
| 51 | m_last_refresh_time.Reset(); |
| 52 | } |
| 53 | |
| 54 | if (range != m_ui.progress->maximum()) |
| 55 | m_ui.progress->setMaximum(range); |
| 56 | m_ui.progress->setValue(value); |
| 57 | } |
| 58 | |
| 59 | void CoverDownloadDialog::onDownloadComplete() |
| 60 | { |
nothing calls this directly
no test coverage detected