From 5d8c9f8860e09ad98b23243659b592ee1be47e5c Mon Sep 17 00:00:00 2001 From: Konstantin Seiler Date: Mon, 11 Nov 2019 19:00:19 +1100 Subject: [PATCH] Hide waiting for download message during seek. --- audio/src/fetch.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/audio/src/fetch.rs b/audio/src/fetch.rs index 2331b5c6..69e34d28 100644 --- a/audio/src/fetch.rs +++ b/audio/src/fetch.rs @@ -971,9 +971,11 @@ impl Read for AudioFileStreaming { let mut download_message_printed = false; while !download_status.downloaded.contains(offset) { - if !download_message_printed { - debug!("Waiting for download of file position {}. Downloaded ranges: {}. Pending ranges: {}", offset, download_status.downloaded, download_status.requested.minus(&download_status.downloaded)); - download_message_printed = true; + if let DownloadStrategy::Streaming() = *self.shared.download_strategy.lock().unwrap() { + if !download_message_printed { + debug!("Stream waiting for download of file position {}. Downloaded ranges: {}. Pending ranges: {}", offset, download_status.downloaded, download_status.requested.minus(&download_status.downloaded)); + download_message_printed = true; + } } download_status = self .shared