Add bulk multi-photo upload to the desktop app
Mirror the Android bulk feature in the Qt uploader: choose several photos at once, each a card with its own caption, date, and upload status, and post the batch. - Per-photo cards (PhotoItemWidget) in a scrollable list; retry re-posts only the failures. - One upload per photo with a per-item UUID slug suffix so a batch posted in the same second cannot collide. - Image prep runs off the UI thread via QtConcurrent so the window stays responsive. - A "Simultaneous uploads" setting (1–8, default 3) caps how many photos are prepared/uploaded at once; the rest queue and fill freed slots.
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#include <QEventLoop>
|
||||
#include <QUrl>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <qt6keychain/keychain.h>
|
||||
|
||||
namespace {
|
||||
@@ -35,6 +37,17 @@ void Settings::setUsername(const QString &value)
|
||||
m_settings.setValue(QStringLiteral("username"), value.trimmed());
|
||||
}
|
||||
|
||||
int Settings::concurrency() const
|
||||
{
|
||||
const int v = m_settings.value(QStringLiteral("concurrency"), kDefaultConcurrency).toInt();
|
||||
return std::clamp(v, 1, kMaxConcurrency);
|
||||
}
|
||||
|
||||
void Settings::setConcurrency(int value)
|
||||
{
|
||||
m_settings.setValue(QStringLiteral("concurrency"), std::clamp(value, 1, kMaxConcurrency));
|
||||
}
|
||||
|
||||
QString Settings::readPassword() const
|
||||
{
|
||||
QKeychain::ReadPasswordJob job(kService);
|
||||
|
||||
Reference in New Issue
Block a user