Skip to content

Commit

Permalink
Version 7.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Bionus committed Aug 1, 2020
2 parents 1d26cd8 + 11f77c0 commit 3100895
Show file tree
Hide file tree
Showing 86 changed files with 5,145 additions and 961 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Expand Up @@ -120,6 +120,15 @@
"contributions": [
"bug"
]
},
{
"login": "ccppoo",
"name": "ccppoo",
"avatar_url": "https://avatars0.githubusercontent.com/u/46418312?s=122",
"profile": "https://github.com/ccppoo",
"contributions": [
"translation"
]
}
]
}
15 changes: 13 additions & 2 deletions .gitattributes
@@ -1,3 +1,14 @@
# Ensure shell scripts use Linux file endings
*.sh eol=lf
languages/* linguist-documentation
tests/resources/** linguist-documentation

# Ignore vendor files
src/cmake/*
scripts/windows-setup/scripts/*

# Docs and translations should be ignored
docs/* linguist-documentation
src/languages/* linguist-documentation

# Test resource files should be ignored
src/sites/*/resources/* linguist-vendored
src/tests/resources/* linguist-vendored
1 change: 1 addition & 0 deletions .github/FUNDING.yml
@@ -1,2 +1,3 @@
github: Bionus
patreon: bionus
custom: https://www.paypal.me/jvasti
4 changes: 2 additions & 2 deletions .github/workflows/linux.yml
Expand Up @@ -3,7 +3,7 @@ on: [push]

jobs:
Linux:
timeout-minutes: 15
timeout-minutes: 20
runs-on: ubuntu-18.04

steps:
Expand All @@ -22,7 +22,7 @@ jobs:
run: sudo apt-get install libpulse-dev

- name: Install Qt
uses: jurplel/install-qt-action@v2.1.0
uses: jurplel/install-qt-action@v2.7.2
with:
version: 5.12.6

Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/macos.yml
Expand Up @@ -19,14 +19,10 @@ jobs:
echo ::set-env name=PLATFORM_NAME::x64
echo ::set-env name=OPENSSL_ROOT_DIR::/usr/local/opt/openssl/
- name: Install packages
run: pip3 install opencv-python opencv-python-headless

- name: Install Qt
uses: jurplel/install-qt-action@v2.6.2
uses: jurplel/install-qt-action@v2.7.2
with:
version: 5.12.6
aqtversion: ==0.9

- name: Create build dir
run: mkdir build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Expand Up @@ -39,7 +39,7 @@ jobs:
run: mkdir vendor

- name: Install Qt
uses: jurplel/install-qt-action@v2.1.0
uses: jurplel/install-qt-action@v2.7.2
with:
version: 5.12.6

Expand Down
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -104,10 +104,10 @@ See the [Compilation](https://bionus.github.io/imgbrd-grabber/docs/compilation.h
* macOS: run `./build-mac.sh` at the root of the repository

## Contributors
<!-- ALL-CONTRIBUTORS-LIST:START -->
<!-- prettier-ignore -->
<table><tr><td align="center"><a href="https://github.com/Bionus"><img src="https://avatars2.githubusercontent.com/u/882719?s=122" width="122px;" alt="Jack Vasti"/><br /><sub><b>Jack Vasti</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/commits?author=Bionus" title="Code">💻</a> <a href="https://github.com/Bionus/imgbrd-grabber/commits?author=Bionus" title="Documentation">📖</a> <a href="https://github.com/Bionus/imgbrd-grabber/commits?author=Bionus" title="Tests">⚠️</a></td><td align="center"><a href="https://github.com/Zzzyyzzyxx"><img src="https://avatars0.githubusercontent.com/u/16903308?s=122" width="122px;" alt="YMI"/><br /><sub><b>YMI</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3AYMI" title="Bug reports">🐛</a> <a href="#ideas-YMI" title="Ideas, Planning, & Feedback">🤔</a></td><td align="center"><a href="https://github.com/SultrySamthepennanceman"><img src="https://avatars2.githubusercontent.com/u/12085184?s=122" width="122px;" alt="SultrySamthepenna&hellip;"/><br /><sub><b>SultrySamthepenna&hellip;</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3ASultrySamthepennanceman" title="Bug reports">🐛</a></td><td align="center"><a href="https://github.com/BarryMode"><img src="https://avatars1.githubusercontent.com/u/5648875?s=122" width="122px;" alt="Barry Anders"/><br /><sub><b>Barry Anders</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/commits?author=BarryMode" title="Code">💻</a> <a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3ABarryMode" title="Bug reports">🐛</a></td><td align="center"><a href="https://github.com/Flat"><img src="https://avatars3.githubusercontent.com/u/2048861?s=122" width="122px;" alt="Ken Swenson"/><br /><sub><b>Ken Swenson</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/commits?author=Flat" title="Code">💻</a> <a href="#platform-Flat" title="Packaging/porting to new platform">📦</a></td><td align="center"><a href="https://github.com/larry-he"><img src="https://avatars0.githubusercontent.com/u/18506295?s=122" width="122px;" alt="Larry He"/><br /><sub><b>Larry He</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/commits?author=larry-he" title="Code">💻</a></td></tr><tr><td align="center"><a href="https://github.com/brodycas3"><img src="https://avatars3.githubusercontent.com/u/19770864?s=122" width="122px;" alt="brodycas3"/><br /><sub><b>brodycas3</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3Abrodycas3" title="Bug reports">🐛</a></td><td align="center"><a href="https://github.com/sanddudu"><img src="https://avatars1.githubusercontent.com/u/1650692?s=122" width="122px;" alt="Klion Xu"/><br /><sub><b>Klion Xu</b></sub></a><br /><a href="#translation-sanddudu" title="Translation">🌍</a></td><td align="center"><a href="https://github.com/MasterPetrik"><img src="https://avatars2.githubusercontent.com/u/22294259?s=122" width="122px;" alt="MasterPetrik"/><br /><sub><b>MasterPetrik</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3AMasterPetrik" title="Bug reports">🐛</a> <a href="#translation-MasterPetrik" title="Translation">🌍</a> <a href="#ideas-MasterPetrik" title="Ideas, Planning, & Feedback">🤔</a></td><td align="center"><a href="https://github.com/dyskette"><img src="https://avatars3.githubusercontent.com/u/6687927?s=122" width="122px;" alt="Eddy Castillo"/><br /><sub><b>Eddy Castillo</b></sub></a><br /><a href="#translation-dyskette" title="Translation">🌍</a></td><td align="center"><a href="https://github.com/MrAndre96"><img src="https://avatars0.githubusercontent.com/u/6564956?s=122" width="122px;" alt="MrAndre96"/><br /><sub><b>MrAndre96</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3AMrAndre96" title="Bug reports">🐛</a></td><td align="center"><a href="https://github.com/brazenvoid"><img src="https://avatars1.githubusercontent.com/u/8722533?s=122" width="122px;" alt="Umair Ahmed"/><br /><sub><b>Umair Ahmed</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3Abrazenvoid" title="Bug reports">🐛</a></td></tr></table>

<!-- ALL-CONTRIBUTORS-LIST:START -->
<!-- prettier-ignore -->
<table><tr><td align="center"><a href="https://github.com/Bionus"><img src="https://avatars2.githubusercontent.com/u/882719?s=122" width="122px;" alt="Jack Vasti"/><br /><sub><b>Jack Vasti</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/commits?author=Bionus" title="Code">💻</a> <a href="https://github.com/Bionus/imgbrd-grabber/commits?author=Bionus" title="Documentation">📖</a> <a href="https://github.com/Bionus/imgbrd-grabber/commits?author=Bionus" title="Tests">⚠️</a></td><td align="center"><a href="https://github.com/Zzzyyzzyxx"><img src="https://avatars0.githubusercontent.com/u/16903308?s=122" width="122px;" alt="YMI"/><br /><sub><b>YMI</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3AYMI" title="Bug reports">🐛</a> <a href="#ideas-YMI" title="Ideas, Planning, & Feedback">🤔</a></td><td align="center"><a href="https://github.com/SultrySamthepennanceman"><img src="https://avatars2.githubusercontent.com/u/12085184?s=122" width="122px;" alt="SultrySamthepenna&hellip;"/><br /><sub><b>SultrySamthepenna&hellip;</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3ASultrySamthepennanceman" title="Bug reports">🐛</a></td><td align="center"><a href="https://github.com/BarryMode"><img src="https://avatars1.githubusercontent.com/u/5648875?s=122" width="122px;" alt="Barry Anders"/><br /><sub><b>Barry Anders</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/commits?author=BarryMode" title="Code">💻</a> <a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3ABarryMode" title="Bug reports">🐛</a></td><td align="center"><a href="https://github.com/Flat"><img src="https://avatars3.githubusercontent.com/u/2048861?s=122" width="122px;" alt="Ken Swenson"/><br /><sub><b>Ken Swenson</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/commits?author=Flat" title="Code">💻</a> <a href="#platform-Flat" title="Packaging/porting to new platform">📦</a></td><td align="center"><a href="https://github.com/larry-he"><img src="https://avatars0.githubusercontent.com/u/18506295?s=122" width="122px;" alt="Larry He"/><br /><sub><b>Larry He</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/commits?author=larry-he" title="Code">💻</a></td></tr><tr><td align="center"><a href="https://github.com/brodycas3"><img src="https://avatars3.githubusercontent.com/u/19770864?s=122" width="122px;" alt="brodycas3"/><br /><sub><b>brodycas3</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3Abrodycas3" title="Bug reports">🐛</a></td><td align="center"><a href="https://github.com/sanddudu"><img src="https://avatars1.githubusercontent.com/u/1650692?s=122" width="122px;" alt="Klion Xu"/><br /><sub><b>Klion Xu</b></sub></a><br /><a href="#translation-sanddudu" title="Translation">🌍</a></td><td align="center"><a href="https://github.com/MasterPetrik"><img src="https://avatars2.githubusercontent.com/u/22294259?s=122" width="122px;" alt="MasterPetrik"/><br /><sub><b>MasterPetrik</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3AMasterPetrik" title="Bug reports">🐛</a> <a href="#translation-MasterPetrik" title="Translation">🌍</a> <a href="#ideas-MasterPetrik" title="Ideas, Planning, & Feedback">🤔</a></td><td align="center"><a href="https://github.com/dyskette"><img src="https://avatars3.githubusercontent.com/u/6687927?s=122" width="122px;" alt="Eddy Castillo"/><br /><sub><b>Eddy Castillo</b></sub></a><br /><a href="#translation-dyskette" title="Translation">🌍</a></td><td align="center"><a href="https://github.com/MrAndre96"><img src="https://avatars0.githubusercontent.com/u/6564956?s=122" width="122px;" alt="MrAndre96"/><br /><sub><b>MrAndre96</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3AMrAndre96" title="Bug reports">🐛</a></td><td align="center"><a href="https://github.com/brazenvoid"><img src="https://avatars1.githubusercontent.com/u/8722533?s=122" width="122px;" alt="Umair Ahmed"/><br /><sub><b>Umair Ahmed</b></sub></a><br /><a href="https://github.com/Bionus/imgbrd-grabber/issues?q=author%3Abrazenvoid" title="Bug reports">🐛</a></td></tr><tr><td align="center"><a href="https://github.com/ccppoo"><img src="https://avatars0.githubusercontent.com/u/46418312?s=122" width="122px;" alt="ccppoo"/><br /><sub><b>ccppoo</b></sub></a><br /><a href="#translation-ccppoo" title="Translation">🌍</a></td></tr></table>

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.
Expand Down
8 changes: 4 additions & 4 deletions crowdin.yml
@@ -1,5 +1,5 @@
files:
- source: /languages/YourLanguage.ts
translation: /languages/%language%.ts
- source: /crash-reporter/languages/YourLanguage.ts
translation: /crash-reporter/languages/%language%.ts
- source: /src/languages/YourLanguage.ts
translation: /src/languages/%language%.ts
- source: /src/crash-reporter/languages/YourLanguage.ts
translation: /src/crash-reporter/languages/%language%.ts
8 changes: 8 additions & 0 deletions docs/_docs/filename.md
Expand Up @@ -78,6 +78,14 @@ Note that here, each slash (`/`) corresponds to a different directory:
* `url_page`: the URL of the details page of that file.
* `count`: counts the current image downloaded during a batch download. Useful to have unique counters per batchs.
* `num`: counter that goes up for every file with the same name. Useful to prevent overwriting already existing files.
* `position`: the position of the image in the results list or gallery (starts at 1).

## Gallery tokens

Images can access information on the gallery by using the `gallery.` prefix. Many tokens are present in the gallery object, but the most common are:

* `gallery.id`: the ID of the gallery.
* `gallery.name`: the name/title of the gallery.


# Options
Expand Down
2 changes: 1 addition & 1 deletion scripts/windows-setup/setup.iss
Expand Up @@ -22,7 +22,7 @@
#endif

#ifndef MyAppVersion
# define MyAppVersion "7.3.1"
# define MyAppVersion "7.3.2"
#endif

#ifndef QtApngDll
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Expand Up @@ -29,7 +29,7 @@ endif()

project(Grabber)
if((NOT DEFINED VERSION) OR ((DEFINED NIGHTLY) AND (NIGHTLY MATCHES "1")))
set(VERSION "7.3.1")
set(VERSION "7.3.2")
else()
string(REGEX REPLACE "^v" "" VERSION "${VERSION}")
endif()
Expand Down
1 change: 1 addition & 0 deletions src/cli/src/main.cpp
Expand Up @@ -6,6 +6,7 @@
#include <QSettings>
#include <QStringList>
#include <QUrl>
#include <stdexcept>
#include "downloader/downloader.h"
#include "functions.h"
#include "logger.h"
Expand Down
1 change: 1 addition & 0 deletions src/gui/src/batch/batch-window.cpp
Expand Up @@ -349,6 +349,7 @@ void BatchWindow::loadedImage(const QUrl &url, Downloadable::SaveResult result)

case Downloadable::SaveResult::Moved:
case Downloadable::SaveResult::Copied:
case Downloadable::SaveResult::Shortcut:
case Downloadable::SaveResult::Linked:
case Downloadable::SaveResult::Saved:
ui->tableWidget->item(i, 0)->setIcon(okIcon);
Expand Down
8 changes: 1 addition & 7 deletions src/gui/src/favorite-window.ui
Expand Up @@ -7,15 +7,9 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>293</height>
<height>264</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Edit a favorite</string>
</property>
Expand Down
4 changes: 2 additions & 2 deletions src/gui/src/main-window.cpp
Expand Up @@ -607,7 +607,7 @@ void MainWindow::tabClosed(SearchTab *tab)
// Store closed tab information
QJsonObject obj;
tab->write(obj);
m_closedTabs.append(obj);
m_closedTabs.push(obj);
if (m_closedTabs.count() > CLOSED_TAB_HISTORY_MAX) {
m_closedTabs.removeFirst();
}
Expand All @@ -623,7 +623,7 @@ void MainWindow::restoreLastClosedTab()
return;
}

QJsonObject infos = m_closedTabs.takeLast();
QJsonObject infos = m_closedTabs.pop();
SearchTab *tab = TabsLoader::loadTab(infos, m_profile, m_downloadQueue, this, true);
addSearchTab(tab);

Expand Down
4 changes: 2 additions & 2 deletions src/gui/src/main-window.h
Expand Up @@ -3,8 +3,8 @@

#define CLOSED_TAB_HISTORY_MAX 20

#include <QLinkedList>
#include <QMainWindow>
#include <QStack>
#include <QSystemTrayIcon>
#include <QVariant>
#include "language-loader.h"
Expand Down Expand Up @@ -121,7 +121,7 @@ class MainWindow : public QMainWindow
LogTab *m_logTab;
bool m_restore;
QList<Tag> m_currentTags;
QLinkedList<QJsonObject> m_closedTabs;
QStack<QJsonObject> m_closedTabs;
NetworkManager m_networkManager;
TabSelector *m_tabSelector;
DownloadQueue *m_downloadQueue;
Expand Down
4 changes: 4 additions & 0 deletions src/gui/src/monitor-table-model.cpp
Expand Up @@ -59,6 +59,10 @@ QVariant MonitorTableModel::headerData(int section, Qt::Orientation orientation,

QString timeToString(int secs)
{
if (secs >= 0 && secs < 60) {
return QString("%1 s").arg(secs);
}

const int interval = qFloor(secs / 60.0);
const int days = interval / 1440;
const int mins = interval % 1440;
Expand Down
7 changes: 7 additions & 0 deletions src/gui/src/monitor-window.cpp
Expand Up @@ -33,6 +33,13 @@ MonitorWindow::MonitorWindow(Profile *profile, Monitor monitor, QWidget *parent)
ui->checkGetBlacklisted->setChecked(m_monitor.getBlacklisted());

connect(this, &QDialog::accepted, this, &MonitorWindow::save);

// You can't use notifications without the system tray icon
const bool enableTray = m_profile->getSettings()->value("Monitoring/enableTray", false).toBool();
if (!enableTray) {
ui->checkNotificationEnabled->setEnabled(false);
ui->checkNotificationEnabled->setToolTip(tr("You need to enable the system tray icon to use notifications."));
}
}

MonitorWindow::~MonitorWindow()
Expand Down
27 changes: 20 additions & 7 deletions src/gui/src/monitoring-center.cpp
Expand Up @@ -131,11 +131,25 @@ bool MonitoringCenter::checkMonitor(Monitor &monitor, const SearchQuery &search,
monitor.setCumulated(monitor.cumulated() + newImages, count != 1 && newImages < count);
m_changed = true;

if (!m_waitingForQueue) {
sync();
}

emit statusChanged(monitor, MonitoringStatus::Waiting);

return newImages > 0;
}

void MonitoringCenter::sync()
{
// Save only if there were changes to the monitors
if (m_changed) {
m_profile->syncFavorites();
m_profile->monitorManager()->save();
m_changed = false;
}
}

void MonitoringCenter::tick()
{
if (m_stop) {
Expand All @@ -145,13 +159,6 @@ void MonitoringCenter::tick()
qint64 minNextMonitoring = -1;
log(QStringLiteral("Monitoring tick"), Logger::Info);

// Save if there were changes to the monitors since the last tick
if (m_changed) {
m_profile->syncFavorites();
m_profile->monitorManager()->save();
m_changed = false;
}

// Favorites
QList<Favorite> &favs = m_profile->getFavorites();
for (int j = 0; j < favs.count(); ++j) {
Expand Down Expand Up @@ -207,6 +214,7 @@ void MonitoringCenter::queueEmpty()
{
if (m_waitingForQueue) {
m_waitingForQueue = false;
sync();
tick();
}
}
Expand All @@ -217,3 +225,8 @@ void MonitoringCenter::stop()

log(QStringLiteral("Monitoring stopped"), Logger::Info);
}

bool MonitoringCenter::isRunning() const
{
return !m_stop;
}
2 changes: 2 additions & 0 deletions src/gui/src/monitoring-center.h
Expand Up @@ -26,6 +26,7 @@ class MonitoringCenter : public QObject
};

explicit MonitoringCenter(Profile *profile, DownloadQueue *downloadQueue, QSystemTrayIcon *trayIcon, QObject *parent = nullptr);
bool isRunning() const;

public slots:
void start();
Expand All @@ -38,6 +39,7 @@ class MonitoringCenter : public QObject
protected:
void checkMonitor(Monitor &monitor, const Favorite &favorite);
bool checkMonitor(Monitor &monitor, const SearchQuery &search, const QStringList &postFiltering);
void sync();

signals:
void statusChanged(const Monitor &monitor, MonitoringCenter::MonitoringStatus status);
Expand Down

0 comments on commit 3100895

Please sign in to comment.