Add "Forced metadata downloading" state (#15185)

This commit is contained in:
AbeniMatteo 2021-07-17 20:33:14 +02:00 committed by GitHub
parent e5943b64c1
commit 01d851440b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 2 deletions

View file

@ -75,6 +75,7 @@ namespace
{BitTorrent::TorrentState::Downloading, QLatin1String("TransferList.Downloading")},
{BitTorrent::TorrentState::StalledDownloading, QLatin1String("TransferList.StalledDownloading")},
{BitTorrent::TorrentState::DownloadingMetadata, QLatin1String("TransferList.DownloadingMetadata")},
{BitTorrent::TorrentState::ForcedDownloadingMetadata, QLatin1String("TransferList.ForcedDownloadingMetadata")},
{BitTorrent::TorrentState::ForcedDownloading, QLatin1String("TransferList.ForcedDownloading")},
{BitTorrent::TorrentState::Uploading, QLatin1String("TransferList.Uploading")},
{BitTorrent::TorrentState::StalledUploading, QLatin1String("TransferList.StalledUploading")},
@ -111,6 +112,7 @@ TransferListModel::TransferListModel(QObject *parent)
{BitTorrent::TorrentState::Downloading, tr("Downloading")},
{BitTorrent::TorrentState::StalledDownloading, tr("Stalled", "Torrent is waiting for download to begin")},
{BitTorrent::TorrentState::DownloadingMetadata, tr("Downloading metadata", "Used when loading a magnet link")},
{BitTorrent::TorrentState::ForcedDownloadingMetadata, tr("[F] Downloading metadata", "Used when forced to load a magnet link. You probably shouldn't translate the F.")},
{BitTorrent::TorrentState::ForcedDownloading, tr("[F] Downloading", "Used when the torrent is forced started. You probably shouldn't translate the F.")},
{BitTorrent::TorrentState::Uploading, tr("Seeding", "Torrent is complete and in upload-only mode")},
{BitTorrent::TorrentState::StalledUploading, tr("Seeding", "Torrent is complete and in upload-only mode")},
@ -664,6 +666,7 @@ QIcon getIconByState(const BitTorrent::TorrentState state)
case BitTorrent::TorrentState::Downloading:
case BitTorrent::TorrentState::ForcedDownloading:
case BitTorrent::TorrentState::DownloadingMetadata:
case BitTorrent::TorrentState::ForcedDownloadingMetadata:
return getDownloadingIcon();
case BitTorrent::TorrentState::StalledDownloading:
return getStalledDownloadingIcon();
@ -704,6 +707,7 @@ QColor getDefaultColorByState(const BitTorrent::TorrentState state)
case BitTorrent::TorrentState::Downloading:
case BitTorrent::TorrentState::ForcedDownloading:
case BitTorrent::TorrentState::DownloadingMetadata:
case BitTorrent::TorrentState::ForcedDownloadingMetadata:
if (!dark)
return {34, 139, 34}; // Forest Green
else