mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
commit
7394944dcc
@ -4,6 +4,13 @@ Version counting is based on semantic versioning (Major.Feature.Patch)
|
||||
|
||||
## WIP
|
||||
|
||||
## 9.8.2
|
||||
### YACReaderLibrary
|
||||
* Fix opening comics from the continue reading banner.
|
||||
* Make available next/prev comic covers in the iOS app while reading. (ios app 3.16.1 needed)
|
||||
### Server
|
||||
* Make available next/prev comic covers in the iOS app while reading. (ios app 3.16.1 needed)
|
||||
|
||||
## 9.8.1
|
||||
### YACReaderLibrary
|
||||
* Fix "reading lists" reading order on YACReader. Now YACReader is able to open the right comics in the right order.
|
||||
|
@ -38,7 +38,7 @@ public slots:
|
||||
|
||||
signals:
|
||||
void selected(unsigned int);
|
||||
void openComic(const ComicDB &comic);
|
||||
void openComic(const ComicDB &comic, const ComicModel::Mode mode);
|
||||
void comicRated(int, QModelIndex);
|
||||
|
||||
//Context menus
|
||||
|
@ -398,7 +398,11 @@ void GridComicsView::selectIndex(int index)
|
||||
|
||||
void GridComicsView::triggerOpenCurrentComic()
|
||||
{
|
||||
emit openComic(currentComic);
|
||||
if (model == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
emit openComic(currentComic, model->getMode());
|
||||
}
|
||||
|
||||
void GridComicsView::rate(int index, int rating)
|
||||
|
@ -94,6 +94,20 @@
|
||||
#include <shellapi.h>
|
||||
#endif
|
||||
|
||||
namespace {
|
||||
template<class Remover>
|
||||
void moveAndConnectRemoverToThread(Remover *remover, QThread *thread)
|
||||
{
|
||||
Q_ASSERT(remover);
|
||||
Q_ASSERT(thread);
|
||||
remover->moveToThread(thread);
|
||||
QObject::connect(thread, &QThread::started, remover, &Remover::process);
|
||||
QObject::connect(remover, &Remover::finished, remover, &QObject::deleteLater);
|
||||
QObject::connect(remover, &Remover::finished, thread, &QThread::quit);
|
||||
QObject::connect(thread, &QThread::finished, thread, &QObject::deleteLater);
|
||||
}
|
||||
}
|
||||
|
||||
using namespace YACReader;
|
||||
|
||||
LibraryWindow::LibraryWindow()
|
||||
@ -1576,22 +1590,14 @@ void LibraryWindow::deleteSelectedFolder()
|
||||
paths << folderPath;
|
||||
|
||||
auto remover = new FoldersRemover(indexList, paths);
|
||||
const auto thread = new QThread(this);
|
||||
moveAndConnectRemoverToThread(remover, thread);
|
||||
|
||||
QThread *thread = NULL;
|
||||
|
||||
thread = new QThread(this);
|
||||
|
||||
remover->moveToThread(thread);
|
||||
|
||||
connect(thread, SIGNAL(started()), remover, SLOT(process()));
|
||||
connect(remover, SIGNAL(remove(QModelIndex)), foldersModel, SLOT(deleteFolder(QModelIndex)));
|
||||
connect(remover, SIGNAL(removeError()), this, SLOT(errorDeletingFolder()));
|
||||
connect(remover, SIGNAL(finished()), navigationController, SLOT(reselectCurrentFolder()));
|
||||
connect(remover, SIGNAL(finished()), remover, SLOT(deleteLater()));
|
||||
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
|
||||
|
||||
if (thread != NULL)
|
||||
thread->start();
|
||||
thread->start();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1840,31 +1846,37 @@ void LibraryWindow::checkEmptyFolder()
|
||||
void LibraryWindow::openComic()
|
||||
{
|
||||
if (!importedCovers) {
|
||||
auto libraryId = libraries.getId(selectedLibrary->currentText());
|
||||
|
||||
auto comic = comicsModel->getComic(comicsViewsManager->comicsView->currentIndex());
|
||||
auto mode = comicsModel->getMode();
|
||||
|
||||
OpenComicSource::Source source;
|
||||
openComic(comic, mode);
|
||||
}
|
||||
}
|
||||
|
||||
if (mode == ComicModel::ReadingList) {
|
||||
source = OpenComicSource::Source::ReadingList;
|
||||
} else if (mode == ComicModel::Reading) {
|
||||
//TODO check where the comic was opened from the last time it was read
|
||||
source = OpenComicSource::Source::Folder;
|
||||
} else {
|
||||
source = OpenComicSource::Source::Folder;
|
||||
}
|
||||
void LibraryWindow::openComic(const ComicDB &comic, const ComicModel::Mode mode)
|
||||
{
|
||||
auto libraryId = libraries.getId(selectedLibrary->currentText());
|
||||
|
||||
auto yacreaderFound = YACReader::openComic(comic, libraryId, currentPath(), OpenComicSource { source, comicsModel->getSourceId() });
|
||||
OpenComicSource::Source source;
|
||||
|
||||
if (!yacreaderFound) {
|
||||
if (mode == ComicModel::ReadingList) {
|
||||
source = OpenComicSource::Source::ReadingList;
|
||||
} else if (mode == ComicModel::Reading) {
|
||||
//TODO check where the comic was opened from the last time it was read
|
||||
source = OpenComicSource::Source::Folder;
|
||||
} else {
|
||||
source = OpenComicSource::Source::Folder;
|
||||
}
|
||||
|
||||
auto yacreaderFound = YACReader::openComic(comic, libraryId, currentPath(), OpenComicSource { source, comicsModel->getSourceId() });
|
||||
|
||||
if (!yacreaderFound) {
|
||||
#ifdef Q_OS_WIN
|
||||
QMessageBox::critical(this, tr("YACReader not found"), tr("YACReader not found. YACReader should be installed in the same folder as YACReaderLibrary."));
|
||||
QMessageBox::critical(this, tr("YACReader not found"), tr("YACReader not found. YACReader should be installed in the same folder as YACReaderLibrary."));
|
||||
#else
|
||||
QMessageBox::critical(this, tr("YACReader not found"), tr("YACReader not found. There might be a problem with your YACReader installation."));
|
||||
QMessageBox::critical(this, tr("YACReader not found"), tr("YACReader not found. There might be a problem with your YACReader installation."));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2556,28 +2568,20 @@ void LibraryWindow::deleteComicsFromDisk()
|
||||
}
|
||||
|
||||
auto remover = new ComicsRemover(indexList, paths, comics.at(0).parentId);
|
||||
QThread *thread = NULL;
|
||||
|
||||
thread = new QThread(this);
|
||||
|
||||
remover->moveToThread(thread);
|
||||
const auto thread = new QThread(this);
|
||||
moveAndConnectRemoverToThread(remover, thread);
|
||||
|
||||
comicsModel->startTransaction();
|
||||
|
||||
connect(thread, SIGNAL(started()), remover, SLOT(process()));
|
||||
connect(remover, SIGNAL(remove(int)), comicsModel, SLOT(remove(int)));
|
||||
connect(remover, SIGNAL(removeError()), this, SLOT(setRemoveError()));
|
||||
connect(remover, SIGNAL(finished()), comicsModel, SLOT(finishTransaction()));
|
||||
connect(remover, SIGNAL(finished()), comicsModel, SLOT(finishTransaction()));
|
||||
connect(remover, SIGNAL(removedItemsFromFolder(qulonglong)), foldersModel, SLOT(updateFolderChildrenInfo(qulonglong)));
|
||||
|
||||
connect(remover, SIGNAL(finished()), this, SLOT(checkEmptyFolder()));
|
||||
connect(remover, SIGNAL(finished()), this, SLOT(checkRemoveError()));
|
||||
connect(remover, SIGNAL(finished()), remover, SLOT(deleteLater()));
|
||||
connect(thread, SIGNAL(finished()), thread, SLOT(deleteLater()));
|
||||
|
||||
if (thread != NULL)
|
||||
thread->start();
|
||||
thread->start();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,8 @@
|
||||
#include "comic_query_result_processor.h"
|
||||
#include "folder_query_result_processor.h"
|
||||
|
||||
#include "comic_model.h"
|
||||
|
||||
#include <future>
|
||||
#include <memory>
|
||||
|
||||
@ -77,7 +79,6 @@ class YACReaderHistoryController;
|
||||
class EmptyLabelWidget;
|
||||
class EmptySpecialListWidget;
|
||||
class EmptyReadingListWidget;
|
||||
class YACReaderComicsViewsManager;
|
||||
|
||||
namespace YACReader {
|
||||
class TrayIconController;
|
||||
@ -315,6 +316,7 @@ public slots:
|
||||
void selectSubfolder(const QModelIndex &mi, int child);
|
||||
void checkEmptyFolder();
|
||||
void openComic();
|
||||
void openComic(const ComicDB &comic, const ComicModel::Mode mode);
|
||||
void createLibrary();
|
||||
void create(QString source, QString dest, QString name);
|
||||
void showAddLibrary();
|
||||
|
@ -105,10 +105,16 @@ void ComicControllerV2::service(HttpRequest &request, HttpResponse &response)
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
if (i > 0)
|
||||
response.write(QString("previousComic:%1\r\n").arg(siblings.at(i - 1)->id).toUtf8());
|
||||
if (i < siblings.length() - 1)
|
||||
response.write(QString("nextComic:%1\r\n").arg(siblings.at(i + 1)->id).toUtf8());
|
||||
if (i > 0) {
|
||||
ComicDB *previousComic = static_cast<ComicDB *>(siblings.at(i - 1));
|
||||
response.write(QString("previousComic:%1\r\n").arg(previousComic->id).toUtf8());
|
||||
response.write(QString("previousComicHash:%1\r\n").arg(previousComic->info.hash).toUtf8());
|
||||
}
|
||||
if (i < siblings.length() - 1) {
|
||||
ComicDB *nextComic = static_cast<ComicDB *>(siblings.at(i + 1));
|
||||
response.write(QString("nextComic:%1\r\n").arg(nextComic->id).toUtf8());
|
||||
response.write(QString("nextComicHash:%1\r\n").arg(nextComic->info.hash).toUtf8());
|
||||
}
|
||||
} else {
|
||||
//ERROR
|
||||
}
|
||||
|
@ -83,10 +83,16 @@ void ComicControllerInReadingListV2::service(HttpRequest &request, HttpResponse
|
||||
}
|
||||
}
|
||||
if (found) {
|
||||
if (i > 0)
|
||||
response.write(QString("previousComic:%1\r\n").arg(siblings.at(i - 1).id).toUtf8());
|
||||
if (i < siblings.length() - 1)
|
||||
response.write(QString("nextComic:%1\r\n").arg(siblings.at(i + 1).id).toUtf8());
|
||||
if (i > 0) {
|
||||
ComicDB previousComic = siblings.at(i - 1);
|
||||
response.write(QString("previousComic:%1\r\n").arg(previousComic.id).toUtf8());
|
||||
response.write(QString("previousComicHash:%1\r\n").arg(previousComic.info.hash).toUtf8());
|
||||
}
|
||||
if (i < siblings.length() - 1) {
|
||||
ComicDB nextComic = siblings.at(i + 1);
|
||||
response.write(QString("nextComic:%1\r\n").arg(nextComic.id).toUtf8());
|
||||
response.write(QString("nextComicHash:%1\r\n").arg(nextComic.info.hash).toUtf8());
|
||||
}
|
||||
} else {
|
||||
//ERROR
|
||||
}
|
||||
|
@ -146,7 +146,7 @@ void YACReaderComicsViewsManager::doComicsViewConnections()
|
||||
connect(comicsView, SIGNAL(comicRated(int, QModelIndex)), libraryWindow->comicsModel, SLOT(updateRating(int, QModelIndex)));
|
||||
connect(libraryWindow->showHideMarksAction, SIGNAL(toggled(bool)), comicsView, SLOT(setShowMarks(bool)));
|
||||
connect(comicsView, SIGNAL(selected(unsigned int)), libraryWindow, SLOT(openComic()));
|
||||
connect(comicsView, SIGNAL(openComic(ComicDB)), libraryWindow, SLOT(openComic(ComicDB)));
|
||||
connect(comicsView, SIGNAL(openComic(const ComicDB &, const ComicModel::Mode)), libraryWindow, SLOT(openComic(const ComicDB &, const ComicModel::Mode)));
|
||||
|
||||
connect(libraryWindow->selectAllComicsAction, SIGNAL(triggered()), comicsView, SLOT(selectAll()));
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <QStandardPaths>
|
||||
#include <QDataStream>
|
||||
|
||||
#define VERSION "9.8.1"
|
||||
#define VERSION "9.8.2"
|
||||
|
||||
#define REMOTE_BROWSE_PERFORMANCE_WORKAROUND "REMOTE_BROWSE_PERFORMANCE_WORKAROUND"
|
||||
|
||||
|
@ -59,10 +59,13 @@ YACReader::WhatsNewDialog::WhatsNewDialog(QWidget *parent)
|
||||
" • Support for HTML in comic synopsis, this fixes the synopsis when it comes from Comic Vine with HTML tags.<br/>"
|
||||
" • Improve keyboard navigation in Comic Vine dialog. Enter will trigger next or search and Backspace will go back to the previous section.<br/>"
|
||||
" • Fixed opening comics from readings lists, now YACReader will follow the right order and it will open the right comics in the list. (new in 9.8.1)<br/>"
|
||||
" • Fixed opening comics from the continue reading banner. (new in 9.8.2)<br/>"
|
||||
" • Make available next/prev comic covers in the iOS app while reading. (new in 9.8.2)<br/>"
|
||||
"<br/>"
|
||||
"<span style=\"font-weight:600\">Server</span><br/>"
|
||||
" • New `manga` field is sent to YACReader for iOS, so comics tagged as manga will be recognized as such when reading remotely or importing comics.<br/>"
|
||||
" • Fixed opening comics from readings lists, now YACReader for iOS will follow the right order and it will open the right comics in the list, it needs YACReader for iOS 3.15.0 or newer. (new in 9.8.1).<br/>"
|
||||
" • Make available next/prev comic covers in the iOS app while reading. (new in 9.8.2)<br/>"
|
||||
"<br/>"
|
||||
"I hope you enjoy the new update. Please, if you like YACReader consider to become a patron in <a href=\"https://www.patreon.com/yacreader\" style=\"color:#E8B800;\">Patreon</a> or donate some money using <a href=\"https://www.paypal.com/donate?business=5TAMNQCDDMVP8&item_name=Support+YACReader\" style=\"color:#E8B800;\">Pay-Pal</a> and help keeping the project alive. Remember that there is an iOS version available in the <a href=\"https://apps.apple.com/app/id635717885\" style=\"color:#E8B800;\">Apple App Store</a>.");
|
||||
QFont textLabelFont("Arial", 15, QFont::Light);
|
||||
|
Loading…
x
Reference in New Issue
Block a user