From 8399f4189f47edca4cd23b1f490b74c39f0aab23 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 6 Mar 2019 17:33:32 +0400 Subject: [PATCH] Don't show receivedTill for local loaders. --- .../SourceFiles/media/streaming/media_streaming_player.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/media/streaming/media_streaming_player.cpp b/Telegram/SourceFiles/media/streaming/media_streaming_player.cpp index eedff12524..076685563c 100644 --- a/Telegram/SourceFiles/media/streaming/media_streaming_player.cpp +++ b/Telegram/SourceFiles/media/streaming/media_streaming_player.cpp @@ -161,6 +161,9 @@ void Player::trackSendReceivedTill( Expects(state.duration != kTimeUnknown); Expects(state.receivedTill != kTimeUnknown); + if (!_remoteLoader) { + return; + } const auto receivedTill = std::max( state.receivedTill, _previousReceivedTill); @@ -668,7 +671,7 @@ Media::Player::TrackState Player::prepareLegacyState() const { } else if (_options.loop && _totalDuration > 0) { result.position %= _totalDuration; } - result.receivedTill = getCurrentReceivedTill(); + result.receivedTill = _remoteLoader ? getCurrentReceivedTill() : 0; result.length = _totalDuration; if (result.length == kTimeUnknown) { const auto document = _options.audioId.audio();