Send correct total file size if files were transcoded.

This commit is contained in:
Andreas 2014-11-14 17:53:25 +01:00
parent 3fb6e0d2b5
commit 86a375f952
1 changed files with 7 additions and 1 deletions

View File

@ -149,7 +149,13 @@ void SongSender::SendTotalFileSize() {
int total = 0;
for (DownloadItem item : download_queue_) {
total += item.song_.filesize();
QString local_file = item.song_.url().toLocalFile();
bool is_transcoded = transcoder_map_.contains(local_file);
if (is_transcoded) {
local_file = transcoder_map_.value(local_file);
}
total += QFileInfo(local_file).size();
}
response->set_total_size(total);