mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-15 13:22:04 +08:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f027a2fa7e | |||
| 89c4b968f3 | |||
| ab36e76032 | |||
| f49db42c3a | |||
| 58b31f182a | |||
| fbffe12501 | |||
| a30c26a7f2 | |||
| df7b49dbe2 | |||
| 9d93966124 | |||
| 512d86feac | |||
| 8e1e0cea7a | |||
| d2214114fb | |||
| 4dbd79a1ac | |||
| 1e468ba774 |
8
debian/changelog
vendored
8
debian/changelog
vendored
@@ -1,3 +1,11 @@
|
||||
spark-store (3.5) stable; urgency=medium
|
||||
|
||||
* feat: 搜索转为使用网页,提高加载速度和用户体验
|
||||
* 下载软件时指定DNS,修复移动网络问题
|
||||
* 准备进入LTS阶段
|
||||
|
||||
-- shenmo <shenmo@spark-app.store> Fri, 30 Jan 2022 00:00:00 +0800
|
||||
|
||||
spark-store (3.4~test1) stable; urgency=medium
|
||||
|
||||
* feat: aptss不再尝试安装apt-fast,转而自带
|
||||
|
||||
@@ -109,6 +109,8 @@ void DownloadController::startDownload(const QString &url)
|
||||
QStringList command;
|
||||
QString downloadDir = "/tmp/spark-store/";
|
||||
QString aria2ConnectionPerServer = "--max-connection-per-server=1";
|
||||
QString aria2ConnectionMax = "--max-concurrent-downloads=16";
|
||||
QString aria2DNSCommand = "--async-dns-server=119.29.29.29,223.5.5.5";
|
||||
|
||||
if (useMetalink){
|
||||
command.append(metaUrl.toUtf8());
|
||||
@@ -130,6 +132,8 @@ void DownloadController::startDownload(const QString &url)
|
||||
command.append(aria2NoConfig.toUtf8());
|
||||
command.append(aria2SizePerThreads.toUtf8());
|
||||
command.append(aria2ConnectionPerServer.toUtf8());
|
||||
command.append(aria2ConnectionMax.toUtf8());
|
||||
command.append(aria2DNSCommand.toUtf8());
|
||||
if (useMetalink){
|
||||
command.append(aria2NoSeeds.toUtf8());
|
||||
}
|
||||
@@ -205,7 +209,12 @@ void DownloadController::startDownload(const QString &url)
|
||||
* https://en.wikipedia.org/wiki/HD_70642
|
||||
* HD 70642 is a star with an exoplanetary companion in the southern constellation of Puppis.
|
||||
*/
|
||||
system(SenderdPath.toUtf8() + " " + metaUrl.toUtf8() + " " + "HD70642");
|
||||
QProcess mailProcess;
|
||||
mailProcess.start(SenderdPath.toUtf8() + " " + metaUrl.toUtf8() + " " + "HD70642");
|
||||
mailProcess.waitForStarted();
|
||||
mailProcess.waitForFinished(3);
|
||||
mailProcess.deleteLater();
|
||||
|
||||
|
||||
emit downloadFinished(); });
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ DWIDGET_USE_NAMESPACE
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Get build time
|
||||
static const QString version = "Version 3.4~test1";
|
||||
static const QString version = "Version 3.5";
|
||||
static const QDate buildDate = QLocale( QLocale::English ).toDate( QString(__DATE__).replace(" ", " 0"), "MMM dd yyyy");
|
||||
static const QTime buildTime = QTime::fromString(__TIME__, "hh:mm:ss");
|
||||
|
||||
@@ -49,7 +49,7 @@ int main(int argc, char *argv[])
|
||||
if (readConfig.value("build/version").toString() != version){
|
||||
qDebug() << "Spark Store has been updated!";
|
||||
QSettings *setConfig = new QSettings(QDir::homePath() + "/.config/spark-store/config.ini", QSettings::IniFormat);
|
||||
setConfig->setValue("build/version", "Version 3.3.3");
|
||||
setConfig->setValue("build/version", version);
|
||||
setConfig->setValue("build/time", buildDate.toString("yyyy.MM.dd")+"-"+buildTime.toString());
|
||||
setConfig->deleteLater();
|
||||
}
|
||||
|
||||
@@ -232,12 +232,12 @@ void Widget::initUI()
|
||||
});
|
||||
|
||||
// 载入自定义字体
|
||||
int loadedFontID = QFontDatabase::addApplicationFont(":/fonts/fonts/hksnzt.ttf");
|
||||
QStringList loadedFontFamilies = QFontDatabase::applicationFontFamilies(loadedFontID);
|
||||
if(!loadedFontFamilies.isEmpty())
|
||||
{
|
||||
font = loadedFontFamilies.at(0);
|
||||
}
|
||||
// int loadedFontID = QFontDatabase::addApplicationFont(":/fonts/fonts/hksnzt.ttf");
|
||||
// QStringList loadedFontFamilies = QFontDatabase::applicationFontFamilies(loadedFontID);
|
||||
// if(!loadedFontFamilies.isEmpty())
|
||||
// {
|
||||
// font = loadedFontFamilies.at(0);
|
||||
// }
|
||||
/* 全局字体设置
|
||||
* DApplication::setFont(font);
|
||||
*/
|
||||
@@ -751,38 +751,49 @@ void Widget::searchApp(QString text)
|
||||
}
|
||||
|
||||
//加载动画
|
||||
spinner->show();
|
||||
spinner->start();
|
||||
// spinner->show();
|
||||
// spinner->start();
|
||||
|
||||
// // 关键字搜索处理
|
||||
// httpClient->get("https://search.deepinos.org.cn/appinfo/search")
|
||||
// .header("content-type", "application/json")
|
||||
// .queryParam("keyword", text)
|
||||
// .onResponse([this](QByteArray result)
|
||||
// {
|
||||
// auto json = QJsonDocument::fromJson(result).array();
|
||||
// if (json.empty())
|
||||
// {
|
||||
// qDebug() << "相关应用未找到!";
|
||||
// sendNotification(tr("Relative apps Not Found!"));
|
||||
// mutex.unlock();
|
||||
// clearSearchApp();
|
||||
// spinner->stop();
|
||||
// spinner->hide();
|
||||
// ui->stackedWidget->setCurrentIndex(0);
|
||||
// ui->webEngineView->setUrl(QUrl("https://wayou.github.io/t-rex-runner"));
|
||||
// return;
|
||||
// }
|
||||
// clearSearchApp();
|
||||
// displaySearchApp(json); })
|
||||
// .onError([this](QString errorStr)
|
||||
// {
|
||||
// qDebug() << "请求出错:" << errorStr;
|
||||
// sendNotification(QString(tr("Request Error: %1")).arg(errorStr));
|
||||
// mutex.unlock();
|
||||
// return; })
|
||||
// .timeout(10 * 1000)
|
||||
// .exec();
|
||||
|
||||
if (!themeIsDark){
|
||||
ui->webEngineView->setUrl(serverUrl + "store/#/search?keywords=" + text);
|
||||
}else{
|
||||
ui->webEngineView->setUrl(serverUrl + "store/#/darksearch?keywords=" + text);
|
||||
}
|
||||
// spinner->stop();
|
||||
// spinner->hide();
|
||||
mutex.unlock();
|
||||
|
||||
|
||||
// 关键字搜索处理
|
||||
httpClient->get("https://search.deepinos.org.cn/appinfo/search")
|
||||
.header("content-type", "application/json")
|
||||
.queryParam("keyword", text)
|
||||
.onResponse([this](QByteArray result)
|
||||
{
|
||||
auto json = QJsonDocument::fromJson(result).array();
|
||||
if (json.empty())
|
||||
{
|
||||
qDebug() << "相关应用未找到!";
|
||||
sendNotification(tr("Relative apps Not Found!"));
|
||||
mutex.unlock();
|
||||
clearSearchApp();
|
||||
spinner->stop();
|
||||
spinner->hide();
|
||||
ui->stackedWidget->setCurrentIndex(0);
|
||||
ui->webEngineView->setUrl(QUrl("https://wayou.github.io/t-rex-runner"));
|
||||
return;
|
||||
}
|
||||
clearSearchApp();
|
||||
displaySearchApp(json); })
|
||||
.onError([this](QString errorStr)
|
||||
{
|
||||
qDebug() << "请求出错:" << errorStr;
|
||||
sendNotification(QString(tr("Request Error: %1")).arg(errorStr));
|
||||
mutex.unlock();
|
||||
return; })
|
||||
.timeout(10 * 1000)
|
||||
.exec();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user