Skip to content

Commit

Permalink
src/audio/audioplayer: do not use open() on QNetworkReply
Browse files Browse the repository at this point in the history
For obscure and unknown reasons, calling open() on a QNetworkReply
sometimes resets the buffer in a way that only allows retrieving the
data under conditions out of our control, resulting in an empty file
being written. It doesn't appear to be necessary anyway so omitting it
works just fine.
  • Loading branch information
SpaghettiBorgar committed Jun 17, 2024
1 parent a14c718 commit f0dc13a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/audio/audioplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,6 @@ AudioPlayerReply *AudioPlayer::playAudio(QString url, QString hash)
goto cleanup;
}

if (!reply->open(QIODevice::ReadOnly))
{
qDebug() << "Could not open audio reply";
goto cleanup;
}

/* Put the audio in a new temp file */
file = new QTemporaryFile;
if (!file->open())
Expand Down

0 comments on commit f0dc13a

Please sign in to comment.