From ba31f688765e3661b3950de6707e08c4082d5fb9 Mon Sep 17 00:00:00 2001 From: Norm Date: Sat, 26 Nov 2022 13:18:04 -0600 Subject: [PATCH] update readme, fix host not resolving correctly without a trailing forward slash, fix update progress bar. --- README.md | 47 ++++++++++++++++++++++++++++++------- src/models/UpdatesModel.cpp | 12 +++++----- src/networkmanager.cpp | 3 ++- 3 files changed, 47 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 413d44e..944beb9 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,46 @@ +![image](resources/1024.png) + # Tachidesk-qtui a c++/qt client app for use with Tachidesk server +A free and open source manga reader to read manga from a [Tachidesk-Server][tachidesk-server] instance. + +Tachidesk-qtui needs to connect to an already hosted server. + +You can run it on Android and any desktop platform. Android and iOS has provided binaries, the AUR has a package for arch linux, but if you want it on another platform you'll have to build it. + + +### Arch based Linux +Download the latest release from [the aur](https://aur.archlinux.org/packages/tachidesk-qtui/). + +If you use yay, you can run `yay -S tachidesk-qtui` inside a terminal window. + +### Android +Download the latest apk from [the releases section][release] -## what works: -- selecting manga and viewing and selecting chapters -- installing/uninstalling/updaing extensions -- viewing latest library from sources -- adding/removing manga -- basic settings +### iOS +Download the latest ipa from [the releases section][release] +You will need a jailbroken iOS to install it. -## what doesn't work: -- no backup/restore +## General troubleshooting +### Nothing is loaded +Make sure you have set the server address in the server settings + +## Support and help +Join Tachidesk's [discord server](https://discord.gg/DDZdqZWaHA) to hang out with the community and receive support and help. ## Building/Contributing Check [CONTRIBUTING.md](./CONTRIBUTING.md) for build instructions + +## Translation +# TODO + +## Credit +The `Tachidesk-Server` project is developed by [@AriaMoradi](https://github.com/AriaMoradi) and contributors, a link for [Tachidesk-Server is provided here][tachidesk-server] and is licensed under `Mozilla Public License v2.0`. + +Parts of [Tachiyomi-1.x](https://github.com/tachiyomiorg/tachiyomi-1.x) is adopted into this codebase, also licensed under `Mozilla Public License v2.0`. + +You can obtain a copy of `Mozilla Public License v2.0` from https://mozilla.org/MPL/2.0/ + +[release]: https://github.com/Suwayomi/Tachidesk-QtUI/releases +[tachidesk-server]: https://github.com/Suwayomi/Tachidesk-Server +[tachidesk-server-preview]: https://github.com/Suwayomi/Tachidesk-Server-preview/releases diff --git a/src/models/UpdatesModel.cpp b/src/models/UpdatesModel.cpp index fcc7260..a5cb356 100644 --- a/src/models/UpdatesModel.cpp +++ b/src/models/UpdatesModel.cpp @@ -48,13 +48,13 @@ void UpdatesModel::onTextMessageReceived(const QString &message) { _running = doc["running"].toBool(); auto statusMap = doc["statusMap"].toObject(); - _complete = statusMap["COMPLETE"].toInt(); - _complete += statusMap["FAILED"].toInt(); + _complete = statusMap["COMPLETE"].toArray().count(); + _complete += statusMap["FAILED"].toArray().count(); - _total = statusMap["FAILED"].toInt(); - _total += statusMap["COMPLETE"].toInt(); - _total += statusMap["RUNNING"].toInt(); - _total += statusMap["PENDING"].toInt(); + _total = statusMap["FAILED"].toArray().count(); + _total += statusMap["COMPLETE"].toArray().count(); + _total += statusMap["RUNNING"].toArray().count(); + _total += statusMap["PENDING"].toArray().count(); emit totalChanged(); emit completeChanged(); diff --git a/src/networkmanager.cpp b/src/networkmanager.cpp index 53b443a..2fc31df 100644 --- a/src/networkmanager.cpp +++ b/src/networkmanager.cpp @@ -30,7 +30,8 @@ NetworkManager::NetworkManager( _password = _settings->password(); connect(_settings.get(), &Settings::hostnameChanged, [&]() { - _host = _settings->hostname(); + const auto& h = _settings->hostname(); + _host = h.endsWith('/') ? h : h + '/'; }); connect(_settings.get(), &Settings::usernameChanged, [&]() {