mirror of
https://github.com/qbittorrent/qBittorrent
synced 2024-11-03 00:09:23 +01:00
Make sure !.qB extensions are not shown in the Web UI
This commit is contained in:
parent
91af418254
commit
75a65a5f49
@ -330,7 +330,10 @@ QString btjson::getFilesForTorrent(const QString& hash)
|
||||
h.file_progress(fp);
|
||||
for (int i = 0; i < h.num_files(); ++i) {
|
||||
JsonDict file_dict;
|
||||
file_dict.add(KEY_FILE_NAME, h.filename_at(i));
|
||||
QString fileName = h.filename_at(i);
|
||||
if (fileName.endsWith(".!qB", Qt::CaseInsensitive))
|
||||
fileName.chop(4);
|
||||
file_dict.add(KEY_FILE_NAME, fileName);
|
||||
const size_type size = h.filesize_at(i);
|
||||
file_dict.add(KEY_FILE_SIZE, misc::friendlyUnit(size));
|
||||
file_dict.add(KEY_FILE_PROGRESS, (size > 0) ? (fp[i] / (double) size) : 1.);
|
||||
|
Loading…
Reference in New Issue
Block a user