From de286bbf3fb8456ced35bf99730b98c59050f7c4 Mon Sep 17 00:00:00 2001 From: Jakob Haufe Date: Tue, 29 Sep 2020 10:49:42 +0200 Subject: [PATCH] New upstream version 3.5 --- lib/http/.clang-format | 11 + lib/http/.gitignore | 5 +- lib/http/CMakeLists.txt | 25 + lib/http/LICENSE | 21 + lib/http/README.md | 111 +++- lib/http/http.pri | 1 + lib/http/marketplace.json | 50 ++ lib/http/src/cachedhttp.cpp | 30 +- lib/http/src/cachedhttp.h | 4 + lib/http/src/http.cpp | 36 +- lib/http/src/http.h | 2 + lib/media/COPYING | 674 ++++++++++++++++++++++ lib/media/README.md | 10 +- lib/media/media.pri | 4 +- lib/media/src/mpv/mediampv.cpp | 2 +- lib/updater/.clang-format | 11 + lib/updater/.gitignore | 3 + lib/updater/COPYING | 674 ++++++++++++++++++++++ lib/updater/README.md | 126 ++++ lib/updater/src/impl/appcastparser.cpp | 43 ++ lib/updater/src/impl/appcastparser.h | 20 + lib/updater/src/impl/checker.cpp | 88 +++ lib/updater/src/impl/checker.h | 36 ++ lib/updater/src/impl/defaultupdater.cpp | 147 +++++ lib/updater/src/impl/defaultupdater.h | 76 +++ lib/updater/src/impl/dialog.cpp | 153 +++++ lib/updater/src/impl/dialog.h | 44 ++ lib/updater/src/impl/downloader.cpp | 88 +++ lib/updater/src/impl/downloader.h | 29 + lib/updater/src/impl/installer.h | 32 + lib/updater/src/impl/parser.h | 31 + lib/updater/src/impl/runinstaller.cpp | 22 + lib/updater/src/impl/runinstaller.h | 27 + lib/updater/src/impl/simplexmlparser.cpp | 40 ++ lib/updater/src/impl/simplexmlparser.h | 44 ++ lib/updater/src/sparkle/sparkleupdater.h | 27 + lib/updater/src/sparkle/sparkleupdater.mm | 114 ++++ lib/updater/src/updater.cpp | 133 +++++ lib/updater/src/updater.h | 73 +++ lib/updater/updater.pri | 42 ++ lib/updater/updater.pro | 2 + locale/ar.ts | 32 +- locale/ast.ts | 32 +- locale/be.ts | 32 +- locale/bg_BG.ts | 32 +- locale/ca.ts | 32 +- locale/ca_ES.ts | 32 +- locale/cs_CZ.ts | 32 +- locale/da.ts | 32 +- locale/de_DE.ts | 32 +- locale/el.ts | 66 ++- locale/en_GB.ts | 32 +- locale/es.ts | 32 +- locale/es_AR.ts | 32 +- locale/es_ES.ts | 32 +- locale/es_MX.ts | 32 +- locale/fi.ts | 42 +- locale/fi_FI.ts | 36 +- locale/fr.ts | 32 +- locale/gl.ts | 32 +- locale/he_IL.ts | 32 +- locale/hr.ts | 32 +- locale/hu.ts | 32 +- locale/id.ts | 32 +- locale/it.ts | 32 +- locale/ja_JP.ts | 32 +- locale/ko_KR.ts | 32 +- locale/ky.ts | 32 +- locale/ms_MY.ts | 32 +- locale/nb.ts | 32 +- locale/nl.ts | 32 +- locale/nn.ts | 32 +- locale/pl.ts | 32 +- locale/pl_PL.ts | 32 +- locale/pt.ts | 32 +- locale/pt_BR.ts | 32 +- locale/pt_PT.ts | 32 +- locale/ro.ts | 32 +- locale/ru.ts | 32 +- locale/sk.ts | 32 +- locale/sl.ts | 32 +- locale/sq.ts | 32 +- locale/sr.ts | 32 +- locale/sv_SE.ts | 32 +- locale/th.ts | 32 +- locale/tr.ts | 32 +- locale/uk.ts | 32 +- locale/uk_UA.ts | 32 +- locale/vi.ts | 32 +- locale/zh_CN.ts | 66 ++- locale/zh_TW.ts | 32 +- minitube.pro | 20 +- src/aboutview.cpp | 43 ++ src/appwidget.cpp | 9 +- src/channelaggregator.cpp | 24 +- src/channelview.cpp | 15 +- src/httputils.cpp | 7 +- src/invidious/invidious.cpp | 95 +++ src/invidious/invidious.h | 28 + src/invidious/invidious.pri | 19 + src/invidious/ivchannel.cpp | 34 ++ src/invidious/ivchannel.h | 26 + src/invidious/ivchannelsource.cpp | 90 +++ src/invidious/ivchannelsource.h | 29 + src/invidious/ivlistparser.cpp | 68 +++ src/invidious/ivlistparser.h | 19 + src/invidious/ivsearch.cpp | 140 +++++ src/invidious/ivsearch.h | 32 + src/invidious/ivsinglevideosource.cpp | 79 +++ src/invidious/ivsinglevideosource.h | 33 ++ src/invidious/ivvideolist.cpp | 36 ++ src/invidious/ivvideolist.h | 24 + src/main.cpp | 4 + src/mainwindow.cpp | 69 +-- src/mainwindow.h | 2 - src/mediaview.cpp | 82 ++- src/messagebar.cpp | 6 +- src/messagebar.h | 2 + src/playlistmodel.cpp | 39 +- src/playlistmodel.h | 1 - src/searchview.cpp | 29 +- src/standardfeedsview.cpp | 30 +- src/updatechecker.cpp | 97 ---- src/updatechecker.h | 62 -- src/updateutils.cpp | 58 ++ src/updateutils.h | 10 + src/videoapi.h | 15 + src/videosource.h | 1 + src/videosourcewidget.cpp | 3 +- src/waitingspinnerwidget.cpp | 277 +++++++++ src/waitingspinnerwidget.h | 114 ++++ src/yt3.cpp | 5 +- src/ytchannel.cpp | 35 +- src/ytsearch.h | 1 + src/ytvideo.cpp | 2 +- 135 files changed, 5836 insertions(+), 771 deletions(-) create mode 100644 lib/http/.clang-format create mode 100644 lib/http/CMakeLists.txt create mode 100644 lib/http/LICENSE create mode 100644 lib/http/marketplace.json create mode 100644 lib/media/COPYING create mode 100644 lib/updater/.clang-format create mode 100644 lib/updater/.gitignore create mode 100644 lib/updater/COPYING create mode 100644 lib/updater/README.md create mode 100644 lib/updater/src/impl/appcastparser.cpp create mode 100644 lib/updater/src/impl/appcastparser.h create mode 100644 lib/updater/src/impl/checker.cpp create mode 100644 lib/updater/src/impl/checker.h create mode 100644 lib/updater/src/impl/defaultupdater.cpp create mode 100644 lib/updater/src/impl/defaultupdater.h create mode 100644 lib/updater/src/impl/dialog.cpp create mode 100644 lib/updater/src/impl/dialog.h create mode 100644 lib/updater/src/impl/downloader.cpp create mode 100644 lib/updater/src/impl/downloader.h create mode 100644 lib/updater/src/impl/installer.h create mode 100644 lib/updater/src/impl/parser.h create mode 100644 lib/updater/src/impl/runinstaller.cpp create mode 100644 lib/updater/src/impl/runinstaller.h create mode 100644 lib/updater/src/impl/simplexmlparser.cpp create mode 100644 lib/updater/src/impl/simplexmlparser.h create mode 100644 lib/updater/src/sparkle/sparkleupdater.h create mode 100644 lib/updater/src/sparkle/sparkleupdater.mm create mode 100644 lib/updater/src/updater.cpp create mode 100644 lib/updater/src/updater.h create mode 100644 lib/updater/updater.pri create mode 100644 lib/updater/updater.pro create mode 100644 src/invidious/invidious.cpp create mode 100644 src/invidious/invidious.h create mode 100644 src/invidious/invidious.pri create mode 100644 src/invidious/ivchannel.cpp create mode 100644 src/invidious/ivchannel.h create mode 100644 src/invidious/ivchannelsource.cpp create mode 100644 src/invidious/ivchannelsource.h create mode 100644 src/invidious/ivlistparser.cpp create mode 100644 src/invidious/ivlistparser.h create mode 100644 src/invidious/ivsearch.cpp create mode 100644 src/invidious/ivsearch.h create mode 100644 src/invidious/ivsinglevideosource.cpp create mode 100644 src/invidious/ivsinglevideosource.h create mode 100644 src/invidious/ivvideolist.cpp create mode 100644 src/invidious/ivvideolist.h delete mode 100644 src/updatechecker.cpp delete mode 100644 src/updatechecker.h create mode 100644 src/updateutils.cpp create mode 100644 src/updateutils.h create mode 100644 src/videoapi.h create mode 100644 src/waitingspinnerwidget.cpp create mode 100644 src/waitingspinnerwidget.h diff --git a/lib/http/.clang-format b/lib/http/.clang-format new file mode 100644 index 0000000..2409f52 --- /dev/null +++ b/lib/http/.clang-format @@ -0,0 +1,11 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +AccessModifierOffset: -4 +ColumnLimit: 100 +AllowShortIfStatementsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Inline +KeepEmptyLinesAtTheStartOfBlocks: false +ContinuationIndentWidth: 8 +AlignAfterOpenBracket: true +BinPackParameters: false +AllowAllParametersOfDeclarationOnNextLine: false diff --git a/lib/http/.gitignore b/lib/http/.gitignore index e31cfb2..f231897 100644 --- a/lib/http/.gitignore +++ b/lib/http/.gitignore @@ -1,2 +1,5 @@ - +.idea +cmake-build-debug *.user +.DS_Store +build diff --git a/lib/http/CMakeLists.txt b/lib/http/CMakeLists.txt new file mode 100644 index 0000000..7804a22 --- /dev/null +++ b/lib/http/CMakeLists.txt @@ -0,0 +1,25 @@ +cmake_minimum_required(VERSION 3.12) +project(http LANGUAGES CXX) + +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_AUTOMOC ON) + +find_package(Qt5 REQUIRED COMPONENTS Core Network) + +add_library(http + src/cachedhttp.h + src/cachedhttp.cpp + src/http.h + src/http.cpp + src/httpreply.h + src/httprequest.h + src/httpreply.cpp + src/localcache.h + src/localcache.cpp + src/networkhttpreply.h + src/networkhttpreply.cpp + src/throttledhttp.h + src/throttledhttp.cpp +) + +target_link_libraries(http Qt5::Network) diff --git a/lib/http/LICENSE b/lib/http/LICENSE new file mode 100644 index 0000000..e3fd3da --- /dev/null +++ b/lib/http/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Flavio Tordini + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/http/README.md b/lib/http/README.md index a1370ff..efb936d 100644 --- a/lib/http/README.md +++ b/lib/http/README.md @@ -1,35 +1,110 @@ # A wrapper for the Qt Network Access API -This is just a wrapper around Qt's QNetworkAccessManager and friends. I use it in my Qt apps at http://flavio.tordini.org . It allows me to add missing functionality as needed, e.g.: +This is just a wrapper around Qt's QNetworkAccessManager and friends. I use it in my apps at https://flavio.tordini.org . It has a simpler, higher-level API and some functionality not found in Qt: - Throttling (as required by many web APIs nowadays) -- Read timeouts (don't let your requests get stuck forever) - Automatic retries - User agent and request header defaults - Partial requests +- Easier POST requests +- Read timeouts (don't let your requests get stuck forever). (now supported by Qt >= 5.15) - Redirection support (now supported by Qt >= 5.6) -It has a simpler, higher-level API that I find easier to work with. The design emerged naturally in years of practical use. +## Design -A basic example: +This library uses the [Decorator design pattern](https://en.wikipedia.org/wiki/Decorator_pattern) to modularize features and make it easy to add them and use them as needed. The main class is [Http](https://github.com/flaviotordini/http/blob/master/src/http.h), which implements the base features of a HTTP client. More specialized classes are: +- [CachedHttp](https://github.com/flaviotordini/http/blob/master/src/cachedhttp.h), a simple disk-based cache +- [ThrottledHttp](https://github.com/flaviotordini/http/blob/master/src/throttledhttp.h), implements request throttling (aka limiting) + +The constructor of these classes takes another Http instance for which they will act as a proxy. (See examples below). Following this design you can create your own Http subclass. For example, a different caching mechanism, an event dispatcher, custom request logging, etc. + + +## Build Instructions +In order to build this library you can use either `qmake` or `cmake`. + +### qmake +``` +mkdir build +cd build +qmake .. +make ``` -QObject *reply = Http::instance().get("https://google.com/"); -connect(reply, SIGNAL(data(QByteArray)), SLOT(onSuccess(QByteArray))); -connect(reply, SIGNAL(error(QString)), SLOT(onError(QString))); -void MyClass::onSuccess(const QByteArray &bytes) { - qDebug() << "Feel the bytes!" << bytes; -} +### CMake +``` +mkdir build +cd build +cmake .. +make +``` + +## Integration + +You can use this library as a git submodule. For example, add it to your project inside a lib subdirectory: -void MyClass::onError(const QString &message) { - qDebug() << "Something's wrong here" << message; -} +``` +git submodule add -b master https://github.com/flaviotordini/http lib/http +``` + +Then you can update your git submodules like this: + +``` +git submodule update --init --recursive --remote ``` -This is a real-world example of building a Http object suitable to a web service. It throttles requests, uses a custom user agent and caches results: +To integrate the library in your qmake based project just add this to your .pro file: ``` +include(lib/http/http.pri) +``` + +qmake builds all object files in the same directory. In order to avoid filename clashes use: + +``` +CONFIG += object_parallel_to_source +``` + +If you are using CMake you can integrate the library by adding the following lines to your CMakeLists.txt: + +``` +add_subdirectory(lib/http) +... +target_link_library(your_super_cool_project http) +``` +or if you have installed http you can find it via: + +``` +find_library(http REQUIRED) +... +target_link_library(your_super_cool_project http) +``` + + +## Examples + +A basic C++14 example: + +``` +#include "http.h" + +auto reply = Http::instance().get("https://google.com/"); +connect(reply, &HttpReply::finished, this, [](auto &reply) { + if (reply.isSuccessful()) { + qDebug() << "Feel the bytes!" << reply.body(); + } else { + qDebug() << "Something's wrong here" << reply.statusCode() << reply.reasonPhrase(); + } +}); +``` + +This is a real-world example of building a Http object with more complex features. It throttles requests, uses a custom user agent and caches results: + +``` +#include "http.h" +#include "cachedhttp.h" +#include "throttledhttp.h" + Http &myHttp() { static Http *http = [] { Http *http = new Http; @@ -50,14 +125,16 @@ Http &myHttp() { If the full power (and complexity) of QNetworkReply is needed you can always fallback to it: ``` +#include "http.h" + HttpRequest req; req.url = "https://flavio.tordini.org/"; QNetworkReply *reply = Http::instance().networkReply(req); // Use QNetworkReply as needed... ``` -You can use this library under the MIT license and at your own risk. If you do, you're welcome contributing your changes and fixes. +Note that features like redirection, retries and read timeouts won't work in this mode. -Cheers, +## License -Flavio +You can use this library under the MIT license and at your own risk. If you do, you're welcome contributing your changes and fixes. diff --git a/lib/http/http.pri b/lib/http/http.pri index b17f3ba..fa28486 100644 --- a/lib/http/http.pri +++ b/lib/http/http.pri @@ -2,6 +2,7 @@ QT *= network INCLUDEPATH += $$PWD/src DEPENDPATH += $$PWD/src +DEFINES += HTTP HEADERS += \ $$PWD/src/cachedhttp.h \ diff --git a/lib/http/marketplace.json b/lib/http/marketplace.json new file mode 100644 index 0000000..15d9d5d --- /dev/null +++ b/lib/http/marketplace.json @@ -0,0 +1,50 @@ +{ + "$schema": "http://qt.io/schema/extension-schema-v1#", + "title": "Http", + "extensionType": [ + "library" + ], + "version": "1", + "vendor": { + "name": "Flavio Tordini", + "url": "https://flavio.tordini.org" + }, + "contact": "Flavio Tordini ", + "copyright": [ + "Flavio Tordini" + ], + "author": "Flavio Tordini", + "icon": "https://flavio.tordini.org/favicon-196x196.png", + "licenses": [ + { + "licenseType": "MIT", + "licenseUrl": "https://opensource.org/licenses/MIT" + } + ], + "created": "2016-07-02", + "platforms": [ + "Windows", + "Linux", + "macOS", + "Android", + "iOS" + ], + "qtVersions": [ + "5.10.0-or-later" + ], + "tags": [ + "http,web,rest,networking,freeproduct,tools,utility" + ], + "price": { + "listprice": 0 + }, + "support": "flavio.tordini@gmail.com", + "bugUrl": "https://github.com/flaviotordini/http/issues", + "sourceRepoUrl": "https://github.com/flaviotordini/http", + "userManuals": [ + "https://github.com/flaviotordini/http/blob/master/README.md" + ], + "dependencies": [ + "Network" + ] +} \ No newline at end of file diff --git a/lib/http/src/cachedhttp.cpp b/lib/http/src/cachedhttp.cpp index 9762143..e055342 100644 --- a/lib/http/src/cachedhttp.cpp +++ b/lib/http/src/cachedhttp.cpp @@ -1,19 +1,6 @@ #include "cachedhttp.h" #include "localcache.h" -namespace { - -QByteArray requestHash(const HttpRequest &req) { - const char sep = '|'; - QByteArray s = req.url.toEncoded() + sep + req.body + sep + QByteArray::number(req.offset); - if (req.operation == QNetworkAccessManager::PostOperation) { - s.append(sep); - s.append("POST"); - } - return LocalCache::hash(s); -} -} // namespace - CachedHttpReply::CachedHttpReply(const QByteArray &body, const HttpRequest &req) : bytes(body), req(req) { QTimer::singleShot(0, this, SLOT(emitSignals())); @@ -69,3 +56,20 @@ HttpReply *CachedHttp::request(const HttpRequest &req) { qDebug() << "MISS" << key << req.url; return new WrappedHttpReply(cache, key, http.request(req)); } + +QByteArray CachedHttp::requestHash(const HttpRequest &req) { + const char sep = '|'; + + QByteArray s; + if (ignoreHostname) { + s = (req.url.scheme() + sep + req.url.path() + sep + req.url.query()).toUtf8(); + } else { + s = req.url.toEncoded(); + } + s += sep + req.body + sep + QByteArray::number(req.offset); + if (req.operation == QNetworkAccessManager::PostOperation) { + s.append(sep); + s.append("POST"); + } + return LocalCache::hash(s); +} diff --git a/lib/http/src/cachedhttp.h b/lib/http/src/cachedhttp.h index e487a17..01fef13 100644 --- a/lib/http/src/cachedhttp.h +++ b/lib/http/src/cachedhttp.h @@ -11,12 +11,16 @@ public: void setMaxSeconds(uint seconds); void setMaxSize(uint maxSize); void setCachePostRequests(bool value) { cachePostRequests = value; } + void setIgnoreHostname(bool value) { ignoreHostname = value; } HttpReply *request(const HttpRequest &req); private: + QByteArray requestHash(const HttpRequest &req); + Http &http; LocalCache *cache; bool cachePostRequests; + bool ignoreHostname = false; }; class CachedHttpReply : public HttpReply { diff --git a/lib/http/src/http.cpp b/lib/http/src/http.cpp index f724889..5df34a6 100644 --- a/lib/http/src/http.cpp +++ b/lib/http/src/http.cpp @@ -81,6 +81,14 @@ QNetworkReply *Http::networkReply(const HttpRequest &req) { networkReply = manager->post(request, req.body); break; + case QNetworkAccessManager::PutOperation: + networkReply = manager->put(request, req.body); + break; + + case QNetworkAccessManager::DeleteOperation: + networkReply = manager->deleteResource(request); + break; + default: qWarning() << "Unknown operation:" << req.operation; } @@ -140,12 +148,32 @@ HttpReply *Http::post(const QUrl &url, const QByteArray &body, const QByteArray return request(req); } -int Http::getMaxRetries() const -{ + +HttpReply *Http::put(const QUrl &url, const QByteArray &body, const QByteArray &contentType) { + HttpRequest req; + req.url = url; + req.operation = QNetworkAccessManager::PutOperation; + req.body = body; + req.headers = requestHeaders; + QByteArray cType = contentType; + if (cType.isEmpty()) cType = "application/x-www-form-urlencoded"; + req.headers.insert("Content-Type", cType); + return request(req); +} + + +HttpReply *Http::deleteResource(const QUrl &url) { + HttpRequest req; + req.url = url; + req.operation = QNetworkAccessManager::DeleteOperation; + req.headers = requestHeaders; + return request(req); +} + +int Http::getMaxRetries() const { return maxRetries; } -void Http::setMaxRetries(int value) -{ +void Http::setMaxRetries(int value) { maxRetries = value; } diff --git a/lib/http/src/http.h b/lib/http/src/http.h index 8ae56cf..466887c 100644 --- a/lib/http/src/http.h +++ b/lib/http/src/http.h @@ -35,6 +35,8 @@ public: HttpReply *head(const QUrl &url); HttpReply *post(const QUrl &url, const QMap ¶ms); HttpReply *post(const QUrl &url, const QByteArray &body, const QByteArray &contentType); + HttpReply *put(const QUrl &url, const QByteArray &body, const QByteArray &contentType); + HttpReply *deleteResource(const QUrl &url); private: QMap requestHeaders; diff --git a/lib/media/COPYING b/lib/media/COPYING new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/lib/media/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/lib/media/README.md b/lib/media/README.md index 4aeec30..3168299 100644 --- a/lib/media/README.md +++ b/lib/media/README.md @@ -1,9 +1,15 @@ # Qt Media Library Abstraction -This is a simple wrapper around a multimedia playback library. +This is a simple wrapper around a multimedia playback library. I use it in my apps at https://flavio.tordini.org + +The most interesting and maintained backend is MPV. It works great on macOS, Windows and Linux. + +I wrote this high level wrapper because I was not happy with Qt Multimedia and its lack of a common backend and guaranteed media format support across desktop platforms. Define `MEDIA_QTAV` to link to QtAV or `MEDIA_MPV` to link to libmpv (>=0.29.0). `MEDIA_AUDIOONLY` can be defined if the application does not need video. -You can use this library under the MIT license and at your own risk. If you do, you're welcome contributing your changes and fixes. +You can use this library under the GPLv3 license. If you do, you're welcome contributing your changes and fixes. + +If you would like to use this library in a commercial project, contact me at flavio.tordini@gmail.com \ No newline at end of file diff --git a/lib/media/media.pri b/lib/media/media.pri index f6b64fa..a20f396 100644 --- a/lib/media/media.pri +++ b/lib/media/media.pri @@ -7,8 +7,8 @@ contains(DEFINES, MEDIA_QTAV) { QT += avwidgets INCLUDEPATH += $$PWD/src/qtav DEPENDPATH += $$PWD/src/qtav - HEADERS += $$PWD/src/mediaqtav.h - SOURCES += $$PWD/src/mediaqtav.cpp + HEADERS += $$PWD/src/qtav/mediaqtav.h + SOURCES += $$PWD/src/qtav/mediaqtav.cpp } contains(DEFINES, MEDIA_MPV) { diff --git a/lib/media/src/mpv/mediampv.cpp b/lib/media/src/mpv/mediampv.cpp index 3276f4b..6291511 100644 --- a/lib/media/src/mpv/mediampv.cpp +++ b/lib/media/src/mpv/mediampv.cpp @@ -158,7 +158,7 @@ void MediaMPV::handleMpvEvent(mpv_event *event) { case MPV_EVENT_PROPERTY_CHANGE: { mpv_event_property *prop = (mpv_event_property *)event->data; - qDebug() << prop->name << prop->data; + // qDebug() << prop->name << prop->data; if (strcmp(prop->name, "time-pos") == 0) { if (prop->format == MPV_FORMAT_DOUBLE) { diff --git a/lib/updater/.clang-format b/lib/updater/.clang-format new file mode 100644 index 0000000..2409f52 --- /dev/null +++ b/lib/updater/.clang-format @@ -0,0 +1,11 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +AccessModifierOffset: -4 +ColumnLimit: 100 +AllowShortIfStatementsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Inline +KeepEmptyLinesAtTheStartOfBlocks: false +ContinuationIndentWidth: 8 +AlignAfterOpenBracket: true +BinPackParameters: false +AllowAllParametersOfDeclarationOnNextLine: false diff --git a/lib/updater/.gitignore b/lib/updater/.gitignore new file mode 100644 index 0000000..09e07f4 --- /dev/null +++ b/lib/updater/.gitignore @@ -0,0 +1,3 @@ + +.DS_Store +.vscode diff --git a/lib/updater/COPYING b/lib/updater/COPYING new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/lib/updater/COPYING @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/lib/updater/README.md b/lib/updater/README.md new file mode 100644 index 0000000..76f3b7d --- /dev/null +++ b/lib/updater/README.md @@ -0,0 +1,126 @@ +# An updater for Qt apps + +This is an extensible updater for Qt apps. It can wrap Sparkle on macOS and use its own implementation on Windows and Linux. I use it in my apps at https://flavio.tordini.org . + +## Design + +The main interface is [Updater](https://github.com/flaviotordini/updater/blob/master/src/updater.h). A shared Updater subclass instance should be set on startup using `Updater::setInstance()`. Available implementations are: + +- [`updater::DefaultUpdater`](https://github.com/flaviotordini/updater/blob/master/src/impl/defaultupdater.h), the default Qt-based implementation. + +- [`updater::SparkleUpdater`](https://github.com/flaviotordini/updater/blob/master/src/sparkle/sparkleupdater.h), a Sparkle-based implementation for macOS + +## User Interface + +### Built-in Widgets + +Updater provides ready-to-use widgets: + +- `Updater::getAction()` returns a QAction suitable to be inserted in a QMenu. +- `Updater::getLabel()` returns a QLabel that automatically changes its message. Typically used in the about box. +- `Updater::getButton()` returns a QPushButton that autohides or automatically changes its function depending on the Updater status. + +When the user triggers the action or pushes the button a dialog will show which is dependent on the Updater implementation. + +## Entension Points + +[updater::DefaultUpdater](https://github.com/flaviotordini/updater/blob/master/src/impl/defaultupdater.h) has a number of extension points so it can be adapted to different release manifest formats and update mechanisms. + +### Parser + +Implement [updater::Parser](https://github.com/flaviotordini/updater/blob/master/src/impl/parser.h) to parse your own manifest format. There are two ready-to-use parsers: + +- [updater::AppcastParser](https://github.com/flaviotordini/updater/blob/master/src/impl/appcastparser.h). This the appcast format also used by Sparkle. It's a RSS feed with Sparkle extensions. +- [updater::SimpleXmlParser](https://github.com/flaviotordini/updater/blob/master/src/impl/simplexmlparser.h). This is a very simple XML format + +Set the desired Parser implementation using `updater::DefaultUpdater::setParser`. The default is [updater::AppcastParser]. + +### Installer + +[updater::Installer](https://github.com/flaviotordini/updater/blob/master/src/impl/installer.h) is the abstraction responsible for preparing and running the update process. Currently the only available Installer implementation is [updater::RunInstaller](https://github.com/flaviotordini/updater/blob/master/src/impl/runinstaller.h). It just runs an executable update payload, optionally with arguments. + +Installer can be implemented in other ways, for example an Installer that unzips a payload and moves files. Or one that invokes an update helper. Another idea is signature validation. + +Set the desired Installer implementation using `updater::DefaultUpdater::setInstaller`. The default is [updater::RunInstaller]. + +## Build Instructions + +### qmake +``` +mkdir build +cd build +qmake .. +make +``` + +## Integration + +You can use this library as a git submodule. For example, add it to your project inside a lib subdirectory: + +``` +git submodule add -b master https://github.com/flaviotordini/updater lib/updater +``` + +Then you can update your git submodules like this: + +``` +git submodule update --init --recursive --remote +``` + +To integrate the library in your qmake based project just add this to your .pro file: + +``` +include(lib/updater/updater.pri) +``` + +qmake builds all object files in the same directory. In order to avoid filename clashes use: + +``` +CONFIG += object_parallel_to_source +``` + +## Examples + +Example setup of the shared Updater instance: + +``` +#include "updater.h" +#ifdef UPDATER_SPARKLE +#include "sparkleupdater.h" +#else +#include "defaultupdater.h" +#endif + +void setupUpdater() { + #ifdef UPDATER_SPARKLE + Updater::setInstance(new updater::SparkleUpdater()); + #else + auto updater = new updater::DefaultUpdater(); + updater->setManifestUrl(myAppcastUrl); + Updater::setInstance(updater); + #endif +} +``` + +Updater provides a QAction instance ready to be used in a menu. + +``` +myMenu->addAction(Updater::instance().getAction()); +``` + +In the About box you can use the standard widgets provided by Updater. A QLabel and a QPushButton. + +``` +myLayout->addWidget(Updater::instance().getLabel()); +myLayout->addWidget(Updater::instance().getButton()); +``` + +## Security + +Always serve your manifest files and binary updates via HTTPS. + +## License + +You can use this library under the GPLv3 license terms. If you do, you're welcome contributing your changes and fixes. Donations are welcome at https://flavio.tordini.org/donate + +For commercial projects I ask for a one-time license fee, contact me at flavio.tordini@gmail.com diff --git a/lib/updater/src/impl/appcastparser.cpp b/lib/updater/src/impl/appcastparser.cpp new file mode 100644 index 0000000..2cf841e --- /dev/null +++ b/lib/updater/src/impl/appcastparser.cpp @@ -0,0 +1,43 @@ +#include "appcastparser.h" + +#include "defaultupdater.h" + +namespace updater { + +AppcastParser::AppcastParser() {} + +void AppcastParser::parse(const QByteArray &bytes) { + error = false; + errorMessage.clear(); + + const QLatin1String sparkleNS("http://www.andymatuschak.org/xml-namespaces/sparkle"); + + QXmlStreamReader reader(bytes); + while (!reader.atEnd()) { + reader.readNext(); + if (reader.name() == QLatin1String("item")) { + while (reader.readNextStartElement()) { + if (reader.name() == QLatin1String("enclosure")) { + auto attrs = reader.attributes(); + QString url = attrs.value(QLatin1String("url")).toString(); + updater->setDownloadUrl(url); + + QString version = attrs.value(sparkleNS, QLatin1String("version")).toString(); + updater->setVersion(version); + + QString shortVersionString = + attrs.value(sparkleNS, QLatin1String("shortVersionString")).toString(); + updater->setDisplayVersion(shortVersionString); + } + reader.skipCurrentElement(); + } + } + } + + if (reader.hasError()) { + error = true; + errorMessage = reader.errorString(); + } +} + +} // namespace updater diff --git a/lib/updater/src/impl/appcastparser.h b/lib/updater/src/impl/appcastparser.h new file mode 100644 index 0000000..b38ef0d --- /dev/null +++ b/lib/updater/src/impl/appcastparser.h @@ -0,0 +1,20 @@ +#ifndef APPCASTPARSER_H +#define APPCASTPARSER_H + +#include + +#include "parser.h" + +namespace updater { + +class DefaultUpdater; + +class AppcastParser : public Parser { +public: + AppcastParser(); + void parse(const QByteArray &bytes); +}; + +} // namespace updater + +#endif // APPCASTPARSER_H diff --git a/lib/updater/src/impl/checker.cpp b/lib/updater/src/impl/checker.cpp new file mode 100644 index 0000000..91428d3 --- /dev/null +++ b/lib/updater/src/impl/checker.cpp @@ -0,0 +1,88 @@ +#include "checker.h" + +#include "appcastparser.h" +#include "defaultupdater.h" +#include "parser.h" + +#ifdef HTTP +#include "http.h" +#endif + +namespace { +const QString updateCheckKey = "updateCheck"; +} + +namespace updater { + +Checker::Checker(DefaultUpdater *updater, QObject *parent) : QObject(parent), updater(updater) {} + +void Checker::check() { + error = false; + errorMessage.clear(); + +#ifdef HTTP + HttpReply *reply = Http::instance().get(updater->getManifestUrl()); + connect(reply, &HttpReply::finished, this, [this](const HttpReply &reply) { + if (reply.isSuccessful()) { + invokeParser(reply.body()); + } else { + qWarning() << "Update check failed" << reply.statusCode() << reply.reasonPhrase(); + error = true; + errorMessage = reply.reasonPhrase(); + emit done(); + } + }); +#else + QNetworkAccessManager *manager = new QNetworkAccessManager(this); + QNetworkRequest request; + request.setUrl(updater->getManifestUrl()); + request.setRawHeader("User-Agent", + (updater->getAppName() + ' ' + updater->getLocalVersion()).toUtf8()); + connect(manager, &QNetworkAccessManager::finished, this, [this](QNetworkReply *reply) { + int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + if (status >= 200 && status < 300) { + invokeParser(reply->readAll()); + } else { + QString msg = reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString(); + qWarning() << "Update check failed" << status << msg; + error = true; + errorMessage = msg; + emit done(); + } + reply->deleteLater(); + }); + manager->get(request); +#endif +} // namespace updater + +qint64 Checker::getLastCheck() { + QSettings settings; + return settings.value(updateCheckKey).toInt(); +} + +void Checker::invokeParser(const QByteArray &bytes) { + auto parser = updater->getParser(); + if (!parser) { + AppcastParser defaultParser; + defaultParser.setUpdater(updater); + defaultParser.parse(bytes); + } else { + parser->parse(bytes); + } + + bool versionsDontMatch = + !updater->getVersion().isEmpty() && updater->getVersion() != updater->getLocalVersion(); + if (versionsDontMatch && updater->getStatus() != Updater::Status::UpdateDownloaded) { + if (updater->getAutomaticDownload()) { + updater->downloadUpdate(); + } else { + updater->setStatus(Updater::Status::UpdateAvailable); + } + } + + QSettings settings; + settings.setValue(updateCheckKey, QDateTime::currentSecsSinceEpoch()); + emit done(); +} + +} // namespace updater diff --git a/lib/updater/src/impl/checker.h b/lib/updater/src/impl/checker.h new file mode 100644 index 0000000..c16ffa9 --- /dev/null +++ b/lib/updater/src/impl/checker.h @@ -0,0 +1,36 @@ +#ifndef UPDATER_IMPL_CHECKER_H +#define UPDATER_IMPL_CHECKER_H + +#include + +namespace updater { + +class DefaultUpdater; + +class Checker : public QObject { + Q_OBJECT + +public: + explicit Checker(DefaultUpdater *updater, QObject *parent = nullptr); + + void check(); + bool hasError() const { return error; }; + QString getErrorMessage() const { return errorMessage; }; + + static qint64 getLastCheck(); + +signals: + void done(); + +private: + void invokeParser(const QByteArray &bytes); + + DefaultUpdater *updater; + + bool error = false; + QString errorMessage; +}; + +} // namespace updater + +#endif // UPDATER_IMPL_CHECKER_H diff --git a/lib/updater/src/impl/defaultupdater.cpp b/lib/updater/src/impl/defaultupdater.cpp new file mode 100644 index 0000000..5c0e9aa --- /dev/null +++ b/lib/updater/src/impl/defaultupdater.cpp @@ -0,0 +1,147 @@ +#include "defaultupdater.h" + +#include "checker.h" +#include "dialog.h" +#include "downloader.h" +#include "installer.h" +#include "parser.h" +#include "runinstaller.h" + +namespace updater { + +DefaultUpdater::DefaultUpdater() { + checkTimer = new QTimer(this); + checkTimer->setInterval(checkInterval); + checkTimer->setTimerType(Qt::VeryCoarseTimer); + auto autoCheck = [this] { + // auto check after interval + qint64 lastCheck = Checker::getLastCheck(); + int secondsSinceLastCheck = QDateTime::currentSecsSinceEpoch() - lastCheck; + if (secondsSinceLastCheck >= checkInterval) { + auto checker = new Checker(this); + connect(checker, &Checker::done, this, [this, checker] { + if (!getAutomaticDownload() && getStatus() != Updater::Status::UpToDate) { + showDialog(); + } + checker->deleteLater(); + }); + checker->check(); + } + }; + connect(checkTimer, &QTimer::timeout, this, autoCheck); + QTimer::singleShot(5000, autoCheck); + checkTimer->start(); +} + +void DefaultUpdater::setCheckInterval(const qint64 &value) { + checkInterval = value; + checkTimer->setInterval(checkInterval); +} + +void DefaultUpdater::setInstaller(Installer *value) { + installer = value; + installer->setUpdater(this); +} + +void DefaultUpdater::setParser(Parser *value) { + parser = value; + parser->setUpdater(this); +} + +void DefaultUpdater::checkAndShowUI() { + auto checker = new Checker(this); + connect(checker, &Checker::done, this, [this, checker] { + if (getStatus() == Updater::Status::UpToDate) { + QMessageBox msgBox(qApp->activeWindow()); + msgBox.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + msgBox.setWindowModality(Qt::WindowModal); + msgBox.setIconPixmap(getIcon().pixmap(64, 64)); + msgBox.setText(tr("There are currently no updates available.")); + msgBox.exec(); + } else { + if (getStatus() != Updater::Status::UpdateAvailable) { + downloadUpdate(); + } + showDialog(); + } + + checker->deleteLater(); + }); + checker->check(); +} + +void DefaultUpdater::checkAndMaybeShowUI() { + auto checker = new Checker(this); + connect(checker, &Checker::done, this, [this, checker] { + if (getStatus() != Updater::Status::UpToDate) { + showDialog(); + } + checker->deleteLater(); + }); + checker->check(); +} + +void DefaultUpdater::checkWithoutUI() { + auto checker = new Checker(this); + connect(checker, &Checker::done, this, [checker] { checker->deleteLater(); }); + checker->check(); +} + +void DefaultUpdater::update() { + if (!installer) { + installer = new RunInstaller(); + installer->setUpdater(this); + } + connect(installer, &Installer::error, this, [](auto message) { qWarning() << message; }); + installer->start(downloadedFilename); +} + +Downloader *DefaultUpdater::downloadUpdate() { + if (downloader) return downloader; + if (!downloadedFilename.isEmpty()) { + qDebug() << "Update already downloded"; + } + + setStatus(Updater::Status::DownloadingUpdate); + + downloader = new Downloader(); + connect(downloader, &Downloader::fileReady, [this](auto filename) { + downloader->deleteLater(); + downloader = nullptr; + downloadedFilename = filename; + + if (getImmediateInstallAndRelaunch()) { + update(); + qApp->quit(); + } else { + connect(qApp, &QCoreApplication::aboutToQuit, this, [this] { update(); }); + } + + setStatus(Updater::Status::UpdateDownloaded); + }); + + connect(downloader, &Downloader::error, [this](auto message) { + qWarning() << message; + downloader->deleteLater(); + downloader = nullptr; + downloadedFilename.clear(); + setStatus(Updater::Status::UpdateDownloadFailed); + }); + + connect(downloader, &Downloader::progress, + [](int percent) { qDebug() << QString("Downloading update %1%").arg(percent); }); + + downloader->download(downloadUrl); + + return downloader; +} + +void DefaultUpdater::showDialog() { + if (!dialog) { + dialog = new Dialog(this, qApp->activeWindow()); + connect(dialog, &QWidget::destroyed, this, [this] { dialog = nullptr; }); + } + dialog->show(); +} + +} // namespace updater diff --git a/lib/updater/src/impl/defaultupdater.h b/lib/updater/src/impl/defaultupdater.h new file mode 100644 index 0000000..03314ea --- /dev/null +++ b/lib/updater/src/impl/defaultupdater.h @@ -0,0 +1,76 @@ +#ifndef UPDATER_IMPL_UPDATER_H +#define UPDATER_IMPL_UPDATER_H + +#include "updater.h" + +namespace updater { + +class Downloader; +class Dialog; +class Installer; +class Parser; + +class DefaultUpdater : public ::Updater { + Q_OBJECT + +public: + DefaultUpdater(); + + QString getAppName() const { return appName; } + void setAppName(const QString &value) { appName = value; } + + QIcon getIcon() const { return icon; } + void setIcon(const QIcon &value) { icon = value; } + + QString getLocalVersion() const { return localVersion; } + void setLocalVersion(const QString &value) { localVersion = value; } + + QUrl getManifestUrl() const { return manifestUrl; } + void setManifestUrl(const QUrl &value) { manifestUrl = value; } + + void setCheckInterval(const qint64 &value); + + /// A fixed download url. In alternative, the Parser impl can set the download url from the + /// manifest + void setDownloadUrl(const QUrl &value) { downloadUrl = value; } + + void setInstaller(Installer *value); + + Parser *getParser() const { return parser; } + void setParser(Parser *value); + + Downloader *downloadUpdate(); + Downloader *getDownloader() const { return downloader; } + + void checkAndShowUI(); + void checkAndMaybeShowUI(); + void checkWithoutUI(); + +protected slots: + void update(); + +private: + void showDialog(); + + QString appName = QGuiApplication::applicationDisplayName(); + QIcon icon = QGuiApplication::windowIcon(); + QString localVersion = QCoreApplication::applicationVersion(); + + QUrl manifestUrl; + qint64 checkInterval = 86400; + + Downloader *downloader = nullptr; + QUrl downloadUrl; + QString downloadedFilename; + + Installer *installer = nullptr; + Parser *parser = nullptr; + + Dialog *dialog = nullptr; + + QTimer *checkTimer; +}; + +} // namespace updater + +#endif // UPDATER_IMPL_UPDATER_H diff --git a/lib/updater/src/impl/dialog.cpp b/lib/updater/src/impl/dialog.cpp new file mode 100644 index 0000000..b860373 --- /dev/null +++ b/lib/updater/src/impl/dialog.cpp @@ -0,0 +1,153 @@ +#include "dialog.h" + +#include "downloader.h" + +namespace { +static const int padding = 15; +} // namespace + +namespace updater { + +DownloadWidget::DownloadWidget(const QString &message, QDialog *parent) + : QWidget(parent) { + QBoxLayout *layout = new QVBoxLayout(this); + layout->setMargin(0); + layout->setSpacing(padding); + + QLabel *msgLabel = new QLabel(message); + QFont boldFont = msgLabel->font(); + boldFont.setBold(true); + msgLabel->setFont(boldFont); + layout->addWidget(msgLabel); + + progressBar = new QProgressBar(); + layout->addWidget(progressBar); + + QDialogButtonBox *buttonBox = new QDialogButtonBox(this); + + QPushButton *cancelButton = buttonBox->addButton(QDialogButtonBox::Cancel); + connect(cancelButton, &QPushButton::clicked, this, [parent] { parent->reject(); }); + + QPushButton *closeButton = buttonBox->addButton(QDialogButtonBox::Ok); + closeButton->setDefault(true); + closeButton->setFocus(); + closeButton->connect(closeButton, &QPushButton::clicked, this, [parent] { parent->accept(); }); + + layout->addWidget(buttonBox); + + errorLabel = new QLabel(); + errorLabel->hide(); + layout->addWidget(errorLabel); +} + +void DownloadWidget::setErrorMessage(const QString &message) { + errorLabel->setText(message); + errorLabel->show(); +} + +Dialog::Dialog(DefaultUpdater *updater, QWidget *parent) + : QDialog(parent), updater(updater), downloadWidget(nullptr) { + setWindowModality(Qt::WindowModal); + setAttribute(Qt::WA_DeleteOnClose); + setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + + QBoxLayout *hLayout = new QHBoxLayout(this); + hLayout->setSizeConstraint(QLayout::SetFixedSize); + hLayout->setMargin(padding * 2); + hLayout->setSpacing(padding); + + if (!updater->getIcon().isNull()) { + QLabel *logo = new QLabel(); + logo->setPixmap(updater->getIcon().pixmap(64, 64)); + hLayout->addWidget(logo, 0, Qt::AlignTop); + } + + stackedLayout = new QStackedLayout(); + hLayout->addLayout(stackedLayout, 1); + + auto onStatusChange = [this](Updater::Status status) { + QWidget *w = nullptr; + switch (status) { + case Updater::Status::UpToDate: + w = new QLabel(tr("You already have the latest version")); + break; + case Updater::Status::UpdateAvailable: + w = messageWidget(); + break; + + case Updater::Status::DownloadingUpdate: + case Updater::Status::UpdateDownloaded: + case Updater::Status::UpdateDownloadFailed: + w = setupDownloadWidget(); + break; + } + if (w) showWidget(w); + }; + connect(updater, &Updater::statusChanged, this, onStatusChange); + onStatusChange(updater->getStatus()); +} + +QWidget *Dialog::setupDownloadWidget() { + if (!downloadWidget) { + QString message = + tr("Downloading %1 %2...").arg(updater->getAppName(), updater->getVersion()); + downloadWidget = new DownloadWidget(message, this); + } + + Downloader *downloader = updater->getDownloader(); + if (downloader) { + connect(downloader, &Downloader::progress, downloadWidget, &DownloadWidget::setProgress); + connect(downloader, &Downloader::error, downloadWidget, &DownloadWidget::setErrorMessage); + connect(this, &QDialog::rejected, downloader, &Downloader::stop); + } + + return downloadWidget; +} + +void Dialog::showWidget(QWidget *widget) { + QWidget *currentWidget = stackedLayout->currentWidget(); + if (currentWidget) { + stackedLayout->removeWidget(currentWidget); + currentWidget->deleteLater(); + } + stackedLayout->addWidget(widget); +} + +QWidget *Dialog::messageWidget() { + QWidget *w = new QWidget(); + + QFormLayout *layout = new QFormLayout(w); + layout->setMargin(0); + layout->setSpacing(padding); + + QLabel *titleLabel = + new QLabel(tr("A new version of %1 is available!").arg(updater->getAppName())); + QFont boldFont = titleLabel->font(); + boldFont.setBold(true); + titleLabel->setFont(boldFont); + layout->addWidget(titleLabel); + + QLabel *label = new QLabel( + tr("%1 %2 is now available. You have %3.") + .arg(updater->getAppName(), updater->getVersion(), updater->getLocalVersion())); + layout->addWidget(label); + + label = new QLabel(tr("Would you like to download it now?")); + layout->addWidget(label); + + QDialogButtonBox *buttonBox = new QDialogButtonBox(); + + QPushButton *laterButton = + buttonBox->addButton(tr("Remind Me Later"), QDialogButtonBox::RejectRole); + connect(laterButton, &QPushButton::clicked, this, &QDialog::close); + + QPushButton *updateButton = + buttonBox->addButton(tr("Download Update"), QDialogButtonBox::AcceptRole); + connect(updateButton, &QPushButton::clicked, updater, &DefaultUpdater::downloadUpdate); + + layout->addWidget(buttonBox); + + return w; +} + +} // namespace updater diff --git a/lib/updater/src/impl/dialog.h b/lib/updater/src/impl/dialog.h new file mode 100644 index 0000000..4652e3c --- /dev/null +++ b/lib/updater/src/impl/dialog.h @@ -0,0 +1,44 @@ +#ifndef UPDATER_IMPL_DIALOG_H +#define UPDATER_IMPL_DIALOG_H + +#include +#include + +#include "defaultupdater.h" + +namespace updater { + +class DownloadWidget : public QWidget { + Q_OBJECT + +public: + DownloadWidget(const QString &message, QDialog *parent = 0); + +public slots: + void setProgress(int percent) { progressBar->setValue(percent); } + void setErrorMessage(const QString &message); + +private: + QProgressBar *progressBar; + QLabel *errorLabel; +}; + +class Dialog : public QDialog { + Q_OBJECT + +public: + Dialog(DefaultUpdater *updater, QWidget *parent); + +private: + void showWidget(QWidget *widget); + QWidget *setupDownloadWidget(); + QWidget *messageWidget(); + + DefaultUpdater *updater; + QStackedLayout *stackedLayout; + DownloadWidget *downloadWidget; +}; + +} // namespace updater + +#endif // UPDATER_IMPL_DIALOG_H diff --git a/lib/updater/src/impl/downloader.cpp b/lib/updater/src/impl/downloader.cpp new file mode 100644 index 0000000..808ec10 --- /dev/null +++ b/lib/updater/src/impl/downloader.cpp @@ -0,0 +1,88 @@ +#include "downloader.h" + +#include + +namespace updater { + +void Downloader::download(const QUrl &url) { + const QString tempDir = QStandardPaths::writableLocation(QStandardPaths::TempLocation); + QString filename = tempDir + "/" + + QByteArray::number(QRandomGenerator::global()->generate()).toHex() + + url.fileName(); + file.setFileName(filename); + + qDebug() << "Downloading" << url << "to" << filename; + HttpRequest req; + req.url = url; + reply = Http::instance().networkReply(req); + + connect(reply, &QNetworkReply::readyRead, this, [this] { + if (!reply) return; + + if (!file.isOpen()) { + if (!file.open(QIODevice::ReadWrite)) { + emit error(QString("Error opening file: %1").arg(file.errorString())); + reply->disconnect(); + reply->abort(); + reply->deleteLater(); + reply = nullptr; + return; + } + } + if (-1 == file.write(reply->readAll())) { + emit error(file.errorString()); + reply->disconnect(); + reply->abort(); + reply->deleteLater(); + reply = nullptr; + } + }); + + connect(reply, + static_cast( + &QNetworkReply::error), + this, [this] { + emit error(reply->errorString()); + reply->disconnect(); + reply->abort(); + reply->deleteLater(); + reply = nullptr; + }); + + connect(reply, &QNetworkReply::downloadProgress, this, + [this](qint64 bytesReceived, qint64 bytesTotal) { + if (bytesTotal <= 0) return; + int percent = bytesReceived * 100 / bytesTotal; + emit progress(percent); + }); + + connect(reply, &QNetworkReply::finished, this, [this] { + if (!reply) return; + int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + if (status != 200) { + QString message = + reply->attribute(QNetworkRequest::HttpReasonPhraseAttribute).toString(); + if (message.isEmpty()) message = reply->errorString(); + emit error(message); + return; + } + + file.close(); + + reply->deleteLater(); + reply = nullptr; + + emit fileReady(file.fileName()); + }); +} + +void Downloader::stop() { + if (!reply) return; + reply->disconnect(); + reply->abort(); + reply->deleteLater(); + reply = nullptr; + emit error("Canceled"); +} + +} // namespace updater diff --git a/lib/updater/src/impl/downloader.h b/lib/updater/src/impl/downloader.h new file mode 100644 index 0000000..70602d1 --- /dev/null +++ b/lib/updater/src/impl/downloader.h @@ -0,0 +1,29 @@ +#ifndef UPDATER_IMPL_DOWNLOADER_H +#define UPDATER_IMPL_DOWNLOADER_H + +#include + +#include "http.h" + +namespace updater { + +class Downloader : public QObject { + Q_OBJECT + +public: + void download(const QUrl &url); + void stop(); + +signals: + void progress(int percent); + void error(const QString &message); + void fileReady(const QString &filename); + +private: + QNetworkReply *reply = nullptr; + QFile file; +}; + +} // namespace updater + +#endif // UPDATER_IMPL_DOWNLOADER_H diff --git a/lib/updater/src/impl/installer.h b/lib/updater/src/impl/installer.h new file mode 100644 index 0000000..27c9e35 --- /dev/null +++ b/lib/updater/src/impl/installer.h @@ -0,0 +1,32 @@ +#ifndef UPDATER_IMPL_INSTALLER_H +#define UPDATER_IMPL_INSTALLER_H + +#include + +namespace updater { + +class DefaultUpdater; + +/** + * Implement this interface to create your own installer mechanism + * E.g. Unzip and copy files, payload integrity checking, validation, etc. + */ +class Installer : public QObject { + Q_OBJECT + +public: + Installer(){}; + void setUpdater(DefaultUpdater *value) { updater = value; } + + virtual void start(const QString &filename) = 0; + +signals: + void error(const QString &message); + +protected: + DefaultUpdater *updater = nullptr; +}; + +} // namespace updater + +#endif // UPDATER_IMPL_INSTALLER_H diff --git a/lib/updater/src/impl/parser.h b/lib/updater/src/impl/parser.h new file mode 100644 index 0000000..21d6797 --- /dev/null +++ b/lib/updater/src/impl/parser.h @@ -0,0 +1,31 @@ +#ifndef UPDATER_IMPL_PARSER_H +#define UPDATER_IMPL_PARSER_H + +#include + +namespace updater { + +class DefaultUpdater; + +/** + * Implement this interface to parse your custom manifest format + */ +class Parser { +public: + /// Parse your manifest and set relevant Updater properties + virtual void parse(const QByteArray &bytes) = 0; + + void setUpdater(DefaultUpdater *value) { updater = value; } + bool hasError() const { return error; }; + QString getErrorMessage() const { return errorMessage; }; + +protected: + Parser(){}; + DefaultUpdater *updater = nullptr; + bool error = false; + QString errorMessage; +}; + +} // namespace updater + +#endif // UPDATER_IMPL_PARSER_H diff --git a/lib/updater/src/impl/runinstaller.cpp b/lib/updater/src/impl/runinstaller.cpp new file mode 100644 index 0000000..67aa7f2 --- /dev/null +++ b/lib/updater/src/impl/runinstaller.cpp @@ -0,0 +1,22 @@ +#include "runinstaller.h" + +#include + +namespace updater { + +RunInstaller::RunInstaller() : Installer() {} + +void RunInstaller::start(const QString &filename) { + if (arguments.isEmpty()) { + if (!QDesktopServices::openUrl(QUrl("file:///" + filename))) + emit error("Cannot start update"); + } else { + QProcess *process = new QProcess(this); + QObject::connect(process, &QProcess::errorOccurred, this, [this](auto error) { + this->emit error("Update error: " + QVariant::fromValue(error).toString()); + }); + process->startDetached(filename, arguments); + } +} + +} // namespace updater diff --git a/lib/updater/src/impl/runinstaller.h b/lib/updater/src/impl/runinstaller.h new file mode 100644 index 0000000..fbcc7ac --- /dev/null +++ b/lib/updater/src/impl/runinstaller.h @@ -0,0 +1,27 @@ +#ifndef UPDATER_IMPL_RUNINSTALLER_H +#define UPDATER_IMPL_RUNINSTALLER_H + +#include + +#include "installer.h" + +namespace updater { + +/** + * Installer implementation that simply runs the downloaded update + */ +class RunInstaller : public Installer { + Q_OBJECT + +public: + RunInstaller(); + void setArguments(const QStringList &value) { arguments = value; }; + void start(const QString &filename); + +private: + QStringList arguments; +}; + +} // namespace updater + +#endif // UPDATER_IMPL_RUNINSTALLER_H diff --git a/lib/updater/src/impl/simplexmlparser.cpp b/lib/updater/src/impl/simplexmlparser.cpp new file mode 100644 index 0000000..39d073a --- /dev/null +++ b/lib/updater/src/impl/simplexmlparser.cpp @@ -0,0 +1,40 @@ +#include "simplexmlparser.h" + +#include "defaultupdater.h" + +namespace updater { + +SimpleXmlParser::SimpleXmlParser() {} + +void SimpleXmlParser::parse(const QByteArray &bytes) { + error = false; + errorMessage.clear(); + + QXmlStreamReader reader; + reader.addData(bytes); + while (!reader.atEnd()) { + reader.readNext(); + if (reader.isStartElement()) { + if (reader.name() == rootElementName) { + while (!reader.atEnd()) { + reader.readNext(); + if (reader.isStartElement() && reader.name() == versionElementName) { + updater->setVersion(reader.readElementText()); + } else if (reader.isStartElement() && reader.name() == urlElementName) { + QString url = reader.readElementText(); + for (const auto &arg : qAsConst(urlArguments)) { + url = url.arg(arg); + } + updater->setDownloadUrl(url); + } + } + } + } + } + if (reader.hasError()) { + error = true; + errorMessage = reader.errorString(); + } +} + +} // namespace updater diff --git a/lib/updater/src/impl/simplexmlparser.h b/lib/updater/src/impl/simplexmlparser.h new file mode 100644 index 0000000..09df3d4 --- /dev/null +++ b/lib/updater/src/impl/simplexmlparser.h @@ -0,0 +1,44 @@ +#ifndef SIMPLEXMLPARSER_H +#define SIMPLEXMLPARSER_H + +#include + +#include "parser.h" + +namespace updater { + +class DefaultUpdater; + +/** + * Format example: + * + * 3.4.2 + * + * Or + * + * + * 3.4.2 + * https://mydomain/mypayload.%1 + * + */ +class SimpleXmlParser : public Parser { + +public: + explicit SimpleXmlParser(); + void parse(const QByteArray &bytes); + + void setRootElementName(const QString &value) { rootElementName = value; } + void setVersionElementName(const QString &value) { versionElementName = value; } + void setUrlElementName(const QString &value) { urlElementName = value; } + void setUrlArguments(const QStringList &value) { urlArguments = value; } + +private: + QString rootElementName = "release"; + QString versionElementName = "version"; + QString urlElementName = "url"; + QStringList urlArguments; +}; + +} // namespace updater + +#endif // SIMPLEXMLPARSER_H diff --git a/lib/updater/src/sparkle/sparkleupdater.h b/lib/updater/src/sparkle/sparkleupdater.h new file mode 100644 index 0000000..0f416a9 --- /dev/null +++ b/lib/updater/src/sparkle/sparkleupdater.h @@ -0,0 +1,27 @@ +#ifndef SPARKLE_UPDATER_H +#define SPARKLE_UPDATER_H + +#include "updater.h" + +namespace updater { + +class SparkleUpdater : public ::Updater { + Q_OBJECT + +public: + SparkleUpdater(); + + bool getAutomaticDownload() const; + void setAutomaticDownload(bool value); + + void checkAndShowUI(); + void checkAndMaybeShowUI(); + void checkWithoutUI(); + +protected slots: + void update(); +}; + +} // namespace updater + +#endif // SPARKLE_UPDATER_H diff --git a/lib/updater/src/sparkle/sparkleupdater.mm b/lib/updater/src/sparkle/sparkleupdater.mm new file mode 100644 index 0000000..61fc81c --- /dev/null +++ b/lib/updater/src/sparkle/sparkleupdater.mm @@ -0,0 +1,114 @@ +#include "sparkleupdater.h" + +#import +#import +#import + +@interface SparkleDelegate : NSObject { +} +@end + +@implementation SparkleDelegate { + Updater *u; +} + +- (void)setUpdater:(Updater *)v { + u = v; +} + +- (void)updater:(SUUpdater *)updater didFindValidUpdate:(SUAppcastItem *)item { + qDebug() << item.versionString; + Q_UNUSED(updater) + u->setVersion(QString::fromNSString(item.displayVersionString)); + u->setStatus(Updater::Status::UpdateAvailable); + // [updater installUpdatesIfAvailable]; +} + +- (void)updaterDidNotFindUpdate:(SUUpdater *)updater { + Q_UNUSED(updater) + u->setStatus(Updater::Status::UpToDate); +} + +- (void)updater:(SUUpdater *)updater + willDownloadUpdate:(SUAppcastItem *)item + withRequest:(NSMutableURLRequest *)request { + qDebug() << item.versionString << request; + Q_UNUSED(updater) + u->setStatus(Updater::Status::DownloadingUpdate); +} + +- (void)updater:(SUUpdater *)updater didDownloadUpdate:(SUAppcastItem *)item { + qDebug() << item.versionString; + Q_UNUSED(updater) + u->setStatus(Updater::Status::UpdateDownloaded); +} + +- (void)userDidCancelDownload:(SUUpdater *)updater { + Q_UNUSED(updater) + u->setStatus(Updater::Status::UpdateAvailable); +} + +- (void)updater:(SUUpdater *)updater + failedToDownloadUpdate:(SUAppcastItem *)item + error:(NSError *)error { + qDebug() << error; + u->setStatus(Updater::Status::UpdateDownloadFailed); +} + +- (void)updater:(SUUpdater *)updater + willInstallUpdateOnQuit:(SUAppcastItem *)item + immediateInstallationInvocation:(NSInvocation *)invocation { + Q_UNUSED(updater) + qDebug() << u->getImmediateInstallAndRelaunch(); + if (u->getImmediateInstallAndRelaunch()) [invocation invoke]; +} + +- (void)updater:(SUUpdater *)updater willInstallUpdate:(SUAppcastItem *)item { + qDebug() << item.versionString; +} + +- (void)updaterWillRelaunchApplication:(SUUpdater *)updater { + qDebug() << updater; +} + +- (void)updater:(SUUpdater *)updater didAbortWithError:(NSError *)error { + qDebug() << error; +} + +@end + +namespace updater { + +SparkleUpdater::SparkleUpdater() { + SparkleDelegate *delegate = [[SparkleDelegate alloc] init]; + [delegate setUpdater:this]; + [[SUUpdater sharedUpdater] setDelegate:delegate]; + [SUUpdater sharedUpdater].automaticallyChecksForUpdates = YES; + [SUUpdater sharedUpdater].automaticallyDownloadsUpdates = YES; +} + +bool SparkleUpdater::getAutomaticDownload() const { + return [SUUpdater sharedUpdater].automaticallyDownloadsUpdates; +} + +void SparkleUpdater::setAutomaticDownload(bool value) { + [SUUpdater sharedUpdater].automaticallyDownloadsUpdates = value; +} + +void SparkleUpdater::checkAndShowUI() { + [[SUUpdater sharedUpdater] checkForUpdates:nil]; +} + +void SparkleUpdater::checkAndMaybeShowUI() { + [[SUUpdater sharedUpdater] checkForUpdatesInBackground]; +} + +void SparkleUpdater::checkWithoutUI() { + [[SUUpdater sharedUpdater] checkForUpdateInformation]; +} + +void SparkleUpdater::update() { + [[SUUpdater sharedUpdater] installUpdatesIfAvailable]; +} + +} // namespace updater diff --git a/lib/updater/src/updater.cpp b/lib/updater/src/updater.cpp new file mode 100644 index 0000000..0f63bf5 --- /dev/null +++ b/lib/updater/src/updater.cpp @@ -0,0 +1,133 @@ +#include "updater.h" + +namespace { +Updater *sharedInstance = nullptr; +} + +void Updater::setInstance(Updater *value) { + sharedInstance = value; +} + +Updater &Updater::instance() { + return *sharedInstance; +} + +Updater::Updater(QObject *parent) : QObject(parent) {} + +QAction *Updater::getAction() { + if (!action) { + action = new QAction(this); + connect(action, &QWidget::destroyed, this, [this] { action = nullptr; }); + action->setMenuRole(QAction::ApplicationSpecificRole); + connect(action, &QAction::triggered, this, &Updater::onUserAction); + auto onStatusChange = [this](Updater::Status status) { + QString v = displayVersion.isEmpty() ? version : displayVersion; + QString t; + switch (status) { + case Updater::Status::UpToDate: + t = tr("Check for Updates..."); + break; + case Updater::Status::UpdateAvailable: + t = tr("Version %1 is available...").arg(v); + break; + case Updater::Status::DownloadingUpdate: + t = tr("Downloading version %1...").arg(v); + break; + case Updater::Status::UpdateDownloaded: + t = tr("Restart to Update"); + break; + case Updater::Status::UpdateDownloadFailed: + t = tr("Version %1 download failed").arg(v); + break; + } + action->setText(t); + }; + connect(this, &Updater::statusChanged, this, onStatusChange); + onStatusChange(status); + } + return action; +} + +QPushButton *Updater::getButton() { + if (!button) { + button = new QPushButton(); + connect(button, &QWidget::destroyed, this, [this] { button = nullptr; }); + connect(button, &QPushButton::clicked, this, &Updater::onUserAction); + auto onStatusChange = [this](Updater::Status status) { + QString t; + bool visible = true; + switch (status) { + case Updater::Status::UpToDate: + t = tr("Check for Updates"); + break; + case Updater::Status::UpdateAvailable: + t = tr("Download Update"); + break; + case Updater::Status::DownloadingUpdate: + t = tr("Downloading update..."); + visible = false; + break; + case Updater::Status::UpdateDownloaded: + t = tr("Restart to Update"); + break; + case Updater::Status::UpdateDownloadFailed: + t = tr("Retry Update Download"); + break; + } + button->setText(t); + button->setVisible(visible); + }; + connect(this, &Updater::statusChanged, this, onStatusChange); + onStatusChange(status); + } + return button; +} + +QLabel *Updater::getLabel() { + if (!label) { + label = new QLabel(); + connect(label, &QWidget::destroyed, this, [this] { label = nullptr; }); + auto onStatusChange = [this](Updater::Status status) { + QString v = displayVersion.isEmpty() ? version : displayVersion; + QString t; + switch (status) { + case Updater::Status::UpToDate: + t = tr("You have the latest version."); + break; + case Updater::Status::UpdateAvailable: + t = tr("Version %1 is available.").arg(v); + break; + case Updater::Status::DownloadingUpdate: + t = tr("Downloading update..."); + break; + case Updater::Status::UpdateDownloaded: + t = tr("An update has been downloaded and is ready to be installed."); + break; + case Updater::Status::UpdateDownloadFailed: + t = tr("Version %1 download failed").arg(v); + break; + } + label->setText(t); + }; + connect(this, &Updater::statusChanged, this, onStatusChange); + onStatusChange(status); + } + return label; +} + +void Updater::setStatus(Status v) { + if (status != v) { + status = v; + emit statusChanged(status); + } +} + +void Updater::onUserAction() { + if (status == Updater::Status::UpdateDownloaded) { + // update will be installed on quit + qApp->quit(); + return; + } else { + checkAndShowUI(); + } +} diff --git a/lib/updater/src/updater.h b/lib/updater/src/updater.h new file mode 100644 index 0000000..457b1cc --- /dev/null +++ b/lib/updater/src/updater.h @@ -0,0 +1,73 @@ +#ifndef UPDATER_H +#define UPDATER_H + +#include + + +class Updater : public QObject { + Q_OBJECT + +public: + /// Set a shared Updater instance + static void setInstance(Updater *value); + + /// Get a shared updater instance, null by default + static Updater &instance(); + + Updater(QObject *parent = nullptr); + + QAction *getAction(); + QPushButton *getButton(); + QLabel *getLabel(); + + enum class Status { + UpToDate, + UpdateAvailable, + DownloadingUpdate, + UpdateDownloaded, + UpdateDownloadFailed + }; + Q_ENUM(Status) + Status getStatus() const { return status; } + // This should be protected + void setStatus(Status v); + + QString getVersion() const { return version; } + // This should be protected + void setVersion(const QString &value) { version = value; } + + QString getDisplayVersion() const { return displayVersion; } + // This should be protected + void setDisplayVersion(const QString &value) { displayVersion = value; } + + virtual bool getImmediateInstallAndRelaunch() const { return immediateInstallAndRelaunch; } + virtual void setImmediateInstallAndRelaunch(bool value) { immediateInstallAndRelaunch = value; } + + virtual bool getAutomaticDownload() const { return automaticDownload; } + virtual void setAutomaticDownload(bool value) { automaticDownload = value; } + + virtual void checkAndShowUI() = 0; + virtual void checkAndMaybeShowUI() = 0; + virtual void checkWithoutUI() = 0; + +protected slots: + virtual void update() = 0; + virtual void onUserAction(); + +signals: + void statusChanged(Status status); + void actionTextChanged(const QString &actionText); + +private: + QAction *action = nullptr; + QPushButton *button = nullptr; + QLabel *label = nullptr; + + bool automaticDownload = true; + bool immediateInstallAndRelaunch = false; + Status status = Status::UpToDate; + QString version; + QString displayVersion; +}; + +#endif // UPDATER_H diff --git a/lib/updater/updater.pri b/lib/updater/updater.pri new file mode 100644 index 0000000..5bd82b0 --- /dev/null +++ b/lib/updater/updater.pri @@ -0,0 +1,42 @@ +DEFINES *= UPDATER + +INCLUDEPATH += $$PWD/src +DEPENDPATH += $$PWD/src + +HEADERS += $$PWD/src/updater.h +SOURCES += $$PWD/src/updater.cpp + +macx:!contains(DEFINES, UPDATER_NO_SPARKLE) { + DEFINES += UPDATER_SPARKLE + INCLUDEPATH += $$PWD/src/sparkle + DEPENDPATH += $$PWD/src/sparkle + LIBS += -F/Library/Frameworks -framework Sparkle + INCLUDEPATH += /Library/Frameworks/Sparkle.framework/Headers + HEADERS += $$PWD/src/sparkle/sparkleupdater.h + OBJECTIVE_SOURCES += $$PWD/src/sparkle/sparkleupdater.mm +} else { + DEFINES += UPDATER_DEFAULT + QT *= network + INCLUDEPATH += $$PWD/src/impl + DEPENDPATH += $$PWD/src/impl + + HEADERS += \ + $$PWD/src/impl/checker.h \ + $$PWD/src/impl/defaultupdater.h \ + $$PWD/src/impl/dialog.h \ + $$PWD/src/impl/downloader.h \ + $$PWD/src/impl/installer.h \ + $$PWD/src/impl/parser.h \ + $$PWD/src/impl/runinstaller.h \ + $$PWD/src/impl/simplexmlparser.h \ + $$PWD/src/impl/appcastparser.h + + SOURCES += \ + $$PWD/src/impl/checker.cpp \ + $$PWD/src/impl/defaultupdater.cpp \ + $$PWD/src/impl/dialog.cpp \ + $$PWD/src/impl/downloader.cpp \ + $$PWD/src/impl/runinstaller.cpp \ + $$PWD/src/impl/simplexmlparser.cpp \ + $$PWD/src/impl/appcastparser.cpp +} diff --git a/lib/updater/updater.pro b/lib/updater/updater.pro new file mode 100644 index 0000000..b33e016 --- /dev/null +++ b/lib/updater/updater.pro @@ -0,0 +1,2 @@ +TEMPLATE = lib +include(updater.pri) diff --git a/locale/ar.ts b/locale/ar.ts index fc2a950..033e961 100644 --- a/locale/ar.ts +++ b/locale/ar.ts @@ -71,18 +71,10 @@ Please license %1 الرجاء قم بترخيص %1 - - This demo has expired. - أنتهت مدة النسخة التجريبية. - The full version allows you to watch videos without interruptions. تسمح لك النسخة الكاملة بمشاهدة مقاطع الفيديو دون مقاطعة. - - Without a license, the application will expire in %1 days. - بدون رخصة, سوف تنتهي النسخة التجريبية من هذا البرنامج خلال 20 يوما - By purchasing the full version, you will also support the hard work I put into creating %1. بشرائك النسخة الكاملة، سوف تقوم أيضا بدعم العمل الشاق الذي قمت به في إنشاء %1. @@ -866,6 +858,18 @@ Subscribed to %1 تمت اضافة متابعة ل %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version الحصول على النسخة الكاملة + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/ast.ts b/locale/ast.ts index bf7f858..aa95dcd 100644 --- a/locale/ast.ts +++ b/locale/ast.ts @@ -71,18 +71,10 @@ Please license %1 Obtén una llicencia de %1 - - This demo has expired. - Esta demo caducó - The full version allows you to watch videos without interruptions. - - Without a license, the application will expire in %1 days. - Ensin una llicencia, l'aplicación va caducar en %1 díes. - By purchasing the full version, you will also support the hard work I put into creating %1. Al mercar la versión completa, tamién sofites el trabayu fechu na creación de %1. @@ -866,6 +858,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Consigui la versión completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/be.ts b/locale/be.ts index a887a34..8e87e6d 100644 --- a/locale/be.ts +++ b/locale/be.ts @@ -71,18 +71,10 @@ Please license %1 Набывайце ліцэнзію %1 - - This demo has expired. - Тэрмін дэманстрацыі кончыўся. - The full version allows you to watch videos without interruptions. Поўная версія дазволіць глядзець відэа бесперапынна. - - Without a license, the application will expire in %1 days. - Без ліцэнзіі праграма стане нядзейснай цераз %1 дзён. - By purchasing the full version, you will also support the hard work I put into creating %1. Купляючы поўную версію, вы падтрымліваеце маю цяжкую працу па стварэнні %1. @@ -866,6 +858,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Атрымаць поўную версію + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/bg_BG.ts b/locale/bg_BG.ts index 1a9264f..5a644e5 100644 --- a/locale/bg_BG.ts +++ b/locale/bg_BG.ts @@ -71,18 +71,10 @@ Please license %1 Моля, закупете лиценз %1 - - This demo has expired. - Това демо изтече - The full version allows you to watch videos without interruptions. - - Without a license, the application will expire in %1 days. - Без лиценз срока за ползване ще изтече за &1 ден/дни. - By purchasing the full version, you will also support the hard work I put into creating %1. Закупувайки пълната версия, също така подкрепяте труда, който съм вложил в създаването &1. @@ -866,6 +858,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Пълна версия + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/ca.ts b/locale/ca.ts index 64c3ecf..7b93839 100644 --- a/locale/ca.ts +++ b/locale/ca.ts @@ -71,18 +71,10 @@ Please license %1 Si us plau, llicencia el %1 - - This demo has expired. - Aquesta demo ha expirat. - The full version allows you to watch videos without interruptions. La versió completa permet visualitzar videos sense interrupcions. - - Without a license, the application will expire in %1 days. - Sense llicència, l'aplicació caducarà en %1 dies - By purchasing the full version, you will also support the hard work I put into creating %1. Comprant la versió completa, també donarà suport al dur treball que he posat en la creació del %1. @@ -866,6 +858,18 @@ Subscribed to %1 Subscrit a %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Aconsegueix la versió completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/ca_ES.ts b/locale/ca_ES.ts index 300c0f8..f7f6315 100644 --- a/locale/ca_ES.ts +++ b/locale/ca_ES.ts @@ -71,18 +71,10 @@ Please license %1 Si us plau, llicencia el %1 - - This demo has expired. - Aquesta demo ha expirat. - The full version allows you to watch videos without interruptions. - - Without a license, the application will expire in %1 days. - Sense llicència, l'aplicació caducarà en %1 dies - By purchasing the full version, you will also support the hard work I put into creating %1. Comprant la versió completa, també donarà suport al dur treball que he posat en la creació del %1. @@ -866,6 +858,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Aconsegueix la versió completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/cs_CZ.ts b/locale/cs_CZ.ts index 816e0d2..0978140 100644 --- a/locale/cs_CZ.ts +++ b/locale/cs_CZ.ts @@ -71,18 +71,10 @@ Please license %1 Sežeňte si, prosím, licenci %1 - - This demo has expired. - Platnost demoverze vyprÅ¡ela. - The full version allows you to watch videos without interruptions. Plná verze umožní sledovat videa bez přeruÅ¡ení. - - Without a license, the application will expire in %1 days. - Bez licence žádost vyprší za %1 dnů - By purchasing the full version, you will also support the hard work I put into creating %1. Zakoupením plné verze také podpoříte práci, která byla vložená do tvorby %1. @@ -866,6 +858,18 @@ Subscribed to %1 Přihlášen k odběru %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Získat plnou verzi + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/da.ts b/locale/da.ts index db5efdc..784eb39 100644 --- a/locale/da.ts +++ b/locale/da.ts @@ -71,18 +71,10 @@ Please license %1 Venligst licensér %1 - - This demo has expired. - Denne prøveversion er udløbet. - The full version allows you to watch videos without interruptions. Den fulde version giver dig mulighed for, at se videoer uden afbrydelser. - - Without a license, the application will expire in %1 days. - Dette program vil udløbe om %1 dage uden en licens. - By purchasing the full version, you will also support the hard work I put into creating %1. Ved at købe den fulde version, støtter du ogsÃ¥ støtte det hÃ¥rde arbejde jeg lagt i at udvikle %1. @@ -867,6 +859,18 @@ Kopiér &URL'en til videostrømmen Subscribed to %1 Abonnerer nu pÃ¥ %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1094,6 +1098,18 @@ Kopiér &URL'en til videostrømmen Get the full version Hent den fulde version + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/de_DE.ts b/locale/de_DE.ts index 1430c29..f0d494e 100644 --- a/locale/de_DE.ts +++ b/locale/de_DE.ts @@ -71,18 +71,10 @@ Please license %1 Bitte lizenzieren Sie %1 - - This demo has expired. - Diese Demo ist abgelaufen. - The full version allows you to watch videos without interruptions. Die Vollversion erlaubt es Ihnen, Videos ohne Unterbrechung anzuschauen. - - Without a license, the application will expire in %1 days. - Ohne Lizenz läuft das Programm nur noch %1 Tage. - By purchasing the full version, you will also support the hard work I put into creating %1. Mit dem Kauf der Vollversion unterstützen Sie auch die harte Arbeit, die ich in die Erstellung von %1 gesteckt habe. @@ -866,6 +858,18 @@ Subscribed to %1 %1 abonniert + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Die Vollversion kaufen + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/el.ts b/locale/el.ts index 330b6c0..5ee3822 100644 --- a/locale/el.ts +++ b/locale/el.ts @@ -27,11 +27,11 @@ Powered by %1 - + Τροφοδοτούμενο από %1 Open-source software - + Λογισμικό ανοιχτού κώδικα Icon designed by %1. @@ -54,7 +54,7 @@ ActivationDialog Enter your License Details - Εισάγετε τις λεπτομέρειες της άδειας χρήσης + Εισαγάγετε τις λεπτομέρειες της άδειας χρήσης &Email: @@ -71,18 +71,10 @@ Please license %1 Παρακαλώ αποκτήστε την άδεια χρήσης του %1 - - This demo has expired. - Αυτή η δοκιμαστική έκδοση έληξε. - The full version allows you to watch videos without interruptions. Η πλήρης έκδοση σας επιτρέπει να παρακολουθήσετε βίντεο χωρίς διακοπές. - - Without a license, the application will expire in %1 days. - Χωρίς την άδεια χρήσης, η εφαρμογή θα λήξη σε %1 ημέρες. - By purchasing the full version, you will also support the hard work I put into creating %1. Αγοράζοντας την πλήρη έκδοση, υποστηρίζετε επίσης την σκληρή δουλειά που έχω κάνει για τη δημιουργία του %1. @@ -115,7 +107,7 @@ You have %n new video(s) - + Έχετε %n νέο βίντεοΈχετε %n νέα βίντεο @@ -196,30 +188,30 @@ %n hour(s) ago - + πριν %n ώραπριν %n ώρες %n day(s) ago - + πριν %n ημέραπριν %n ημέρες %n month(s) ago - + πριν %n μήναπριν %n μήνες K K as in Kilo, i.e. thousands - + Χ M M stands for Millions - + Ε B B stands for Billions - + Δ %1 views @@ -227,7 +219,7 @@ %n week(s) ago - + πριν %n εβδομάδαπριν %n εβδομάδες @@ -281,7 +273,7 @@ %n Download(s) - + %n Λήψη%n Λήψεις @@ -666,19 +658,19 @@ Restricted Mode - + Περιορισμένη λειτουργία Hide videos that may contain inappropriate content - + Απόκρυψη των βίντεο που μπορεί να περιέχουν ακατάλληλο περιεχόμενο Toggle &Menu Bar - + Ε&ναλλαγή γραμμής μενού Menu - + Μενού &Love %1? Rate it! @@ -806,7 +798,7 @@ You can still access the menu bar by pressing the ALT key - + Μπορείτε να εμφανίσετε τη γραμμή μενού με το πλήκτρο ALT @@ -866,6 +858,18 @@ Subscribed to %1 Εγγραφή στο %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + κανάλι + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Αποκτήστε την πλήρη έκδοση + + Remove + Αφαίρεση + + + Need a remote control for %1? Try %2! + Χρειάζεστε ένα τηλεχειριστήριο για το %1; Δοκιμάστε το %2! + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/en_GB.ts b/locale/en_GB.ts index f029b05..869b254 100644 --- a/locale/en_GB.ts +++ b/locale/en_GB.ts @@ -71,18 +71,10 @@ Please license %1 Please license %1 - - This demo has expired. - This demo has expired. - The full version allows you to watch videos without interruptions. The full version allows you to watch videos without interruptions. - - Without a license, the application will expire in %1 days. - Without a licence, the application will expire in %1 days. - By purchasing the full version, you will also support the hard work I put into creating %1. By purchasing the full version, you will also support the hard work I put into creating %1. @@ -866,6 +858,18 @@ Subscribed to %1 Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Get the full version + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/es.ts b/locale/es.ts index 0018053..f42e849 100644 --- a/locale/es.ts +++ b/locale/es.ts @@ -71,18 +71,10 @@ Please license %1 Obtenga una licencia de %1 - - This demo has expired. - Esta versión de demostración ha caducado. - The full version allows you to watch videos without interruptions. La versión completa le permite ver vídeos sin interrupciones. - - Without a license, the application will expire in %1 days. - Sin una licencia, la aplicación caducará en %1 días. - By purchasing the full version, you will also support the hard work I put into creating %1. Al comprar la versión completa, también apoya el trabajo realizado en la creación de %1. @@ -867,6 +859,18 @@ Subscribed to %1 Suscrito a %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1094,6 +1098,18 @@ Get the full version Obtener la versión completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/es_AR.ts b/locale/es_AR.ts index 5f9e59c..8f37a26 100644 --- a/locale/es_AR.ts +++ b/locale/es_AR.ts @@ -71,18 +71,10 @@ Please license %1 Por favor autorice %1 - - This demo has expired. - Esta prueba ha vencido. - The full version allows you to watch videos without interruptions. La versión completa le permite ver videos sin interrupciones. - - Without a license, the application will expire in %1 days. - Sin una licencia, la aplicación caducará en %1 días. - By purchasing the full version, you will also support the hard work I put into creating %1. Al comprar la versión completa, también apoyas el duro trabajo que he puesto creado %1 @@ -866,6 +858,18 @@ Subscribed to %1 Subscripto a %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Conseguir la versión completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/es_ES.ts b/locale/es_ES.ts index 5dea213..1cb756e 100644 --- a/locale/es_ES.ts +++ b/locale/es_ES.ts @@ -71,18 +71,10 @@ Please license %1 Introduzca la licencia de %1 - - This demo has expired. - La versión de prueba ha caducado. - The full version allows you to watch videos without interruptions. La versión completa le permite mirar videos sin interrupciones. - - Without a license, the application will expire in %1 days. - La aplicación caducará en %1 días si no tiene una licencia. - By purchasing the full version, you will also support the hard work I put into creating %1. Al comprar la versión completa, estará apoyando el gran trabajo empleado en la creación de %1. @@ -866,6 +858,18 @@ Subscribed to %1 Subscripto a %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Obtener la versión completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/es_MX.ts b/locale/es_MX.ts index 80e6566..506786a 100644 --- a/locale/es_MX.ts +++ b/locale/es_MX.ts @@ -71,18 +71,10 @@ Please license %1 Por favor licencia %1 - - This demo has expired. - Esta demostración ha expirado - The full version allows you to watch videos without interruptions. La versión completa te permite ver vídeos sin interrupciones - - Without a license, the application will expire in %1 days. - Sin una licencia, la aplicación expirará en %1 dias. - By purchasing the full version, you will also support the hard work I put into creating %1. Comprando la versión completa, permitirás el desarrollo y el trabajo duro que he puesto creando %1 @@ -866,6 +858,18 @@ Subscribed to %1 Suscrito a %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Obtener la versión completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/fi.ts b/locale/fi.ts index 37b42f9..79a5340 100644 --- a/locale/fi.ts +++ b/locale/fi.ts @@ -27,7 +27,7 @@ Powered by %1 - + %1 voimistama Open-source software @@ -71,18 +71,10 @@ Please license %1 Lisensioi %1. - - This demo has expired. - Tämä demon kokeiluaika on päättynyt. - The full version allows you to watch videos without interruptions. Täysversio mahdollistaa videoiden katselun ilman keskeytyksiä. - - Without a license, the application will expire in %1 days. - Ilman lisenssiä tämä sovellus vanhenee %1 päivässä. - By purchasing the full version, you will also support the hard work I put into creating %1. Ostamalla täyden version tuet kovaa työtäni sovelluksen %1 parissa. @@ -209,17 +201,17 @@ K K as in Kilo, i.e. thousands - + K M M stands for Millions - + M B B stands for Billions - + B %1 views @@ -856,7 +848,7 @@ Switched to %1 - + Vaihdettiin tähän %1 Unsubscribed from %1 @@ -866,6 +858,18 @@ Subscribed to %1 Tilattu %1 + + Rewind %1 seconds + Kelaa taaksepäin %1 sekuntia + + + Fast forward %1 seconds + Pikakelaa eteenpäin %1 sekuntia + + + channel + kanava + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Hanki täysversio + + Remove + Poista + + + Need a remote control for %1? Try %2! + Tarvitsetko kaukosäätimen %1 :lle? Kokeile %2! + + + I keep improving %1 to make it the best I can. Support this work! + Jatkan %1 :n parantamista tehdäkseni siitä niin hyvän kuin kykenen. Tue tätä työtä! + SidebarHeader diff --git a/locale/fi_FI.ts b/locale/fi_FI.ts index 7dd0a99..d41f8b3 100644 --- a/locale/fi_FI.ts +++ b/locale/fi_FI.ts @@ -27,11 +27,11 @@ Powered by %1 - + %1 :n voimistama Open-source software - + Avoimen lähdekoodin ohjelma Icon designed by %1. @@ -71,18 +71,10 @@ Please license %1 Lisensioi %1. - - This demo has expired. - Tämä demon kokeiluaika on päättynyt. - The full version allows you to watch videos without interruptions. Täysversio mahdollistaa videoiden katselun ilman keskeytyksiä. - - Without a license, the application will expire in %1 days. - Ilman lisenssiä tämä sovellus vanhenee %1 päivässä. - By purchasing the full version, you will also support the hard work I put into creating %1. Ostamalla täyden version tuet kovaa työtäni sovelluksen %1 parissa. @@ -866,6 +858,18 @@ Subscribed to %1 Tilaa %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Hanki täysversio + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/fr.ts b/locale/fr.ts index 46ff0f3..49aa1c0 100644 --- a/locale/fr.ts +++ b/locale/fr.ts @@ -71,18 +71,10 @@ Please license %1 Veuillez obtenir une licence pour %1 - - This demo has expired. - Cette version de démonstration a expiré. - The full version allows you to watch videos without interruptions. La version complète vous permet de voir des vidéos sans interruption. - - Without a license, the application will expire in %1 days. - En l'absence de licence, l'application expirera dans %1 jours. - By purchasing the full version, you will also support the hard work I put into creating %1. En achetant la version complète,vous supporterez aussi le grand travail que j'ai investi dans la création de %1. @@ -866,6 +858,18 @@ Subscribed to %1 S'abonner à %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Obtenir la version complète + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/gl.ts b/locale/gl.ts index 9bd8a11..399a69a 100644 --- a/locale/gl.ts +++ b/locale/gl.ts @@ -71,18 +71,10 @@ Please license %1 Licenza %1 - - This demo has expired. - Esta demo caducou. - The full version allows you to watch videos without interruptions. A versión completa permite ver os vídeos sen interrupcións. - - Without a license, the application will expire in %1 days. - Sen licenza o aplicativo expira en %1 días. - By purchasing the full version, you will also support the hard work I put into creating %1. Ao comprar a versión completa, tamén vai apoiar o traballo arreo que puxen en crear %1. @@ -866,6 +858,18 @@ Subscribed to %1 Subscrito a %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Obter a versión completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/he_IL.ts b/locale/he_IL.ts index fffa966..0a25261 100644 --- a/locale/he_IL.ts +++ b/locale/he_IL.ts @@ -71,18 +71,10 @@ Please license %1 נא לרכוש את %1 - - This demo has expired. - גרסת הדגמה זו פגה. - The full version allows you to watch videos without interruptions. הגירסה המלאה מאפשרת לך לצפות בסרטון ללא הפרעות. - - Without a license, the application will expire in %1 days. - ללא רישיון היישום יפוג בעוד %1 ימים. - By purchasing the full version, you will also support the hard work I put into creating %1. רכישת הגרסה המלאה מהווה תמיכה בעבודה הקשה שאני משקיע ביצירת %1. @@ -866,6 +858,18 @@ Subscribed to %1 בוצע רישום ל%1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version קבלת הגרסה המלאה + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/hr.ts b/locale/hr.ts index ce41669..59f7225 100644 --- a/locale/hr.ts +++ b/locale/hr.ts @@ -71,18 +71,10 @@ Please license %1 Molimo registrirajte %1 - - This demo has expired. - VaÅ¡a probna verzija je istekla. - The full version allows you to watch videos without interruptions. - - Without a license, the application will expire in %1 days. - Bez licence, ovaj će program isteći za %1 dana - By purchasing the full version, you will also support the hard work I put into creating %1. Kupnjom pune verzije podržati ćete i naporan rad uložen u izradu %1. @@ -866,6 +858,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Preuzmi punu verziju + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/hu.ts b/locale/hu.ts index fa4c83f..a49a4a3 100644 --- a/locale/hu.ts +++ b/locale/hu.ts @@ -71,18 +71,10 @@ Please license %1 Szerezzen licencet a %1 programhoz - - This demo has expired. - A demó változat lejárt. - The full version allows you to watch videos without interruptions. A teljes verzió lehetőséget nyújt a videók megszakítás nélküli lejátszására. - - Without a license, the application will expire in %1 days. - Licenc nélkül, a program %1 nap múlva lejár. - By purchasing the full version, you will also support the hard work I put into creating %1. A teljes verzió megvásárlásával a %1 programba fektetett munkámat is támogatja. @@ -866,6 +858,18 @@ Subscribed to %1 Feliratkozva %1-ra + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Teljes verzió beszerzése + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/id.ts b/locale/id.ts index 2672b63..c988bb5 100644 --- a/locale/id.ts +++ b/locale/id.ts @@ -71,18 +71,10 @@ Please license %1 Silahkan lisensi %1 - - This demo has expired. - Demo ini telah Habis. - The full version allows you to watch videos without interruptions. Anda dapat melihat video tanpa gangguan dengan menggunakan versi penuh - - Without a license, the application will expire in %1 days. - Tanpa lisensi, aplikasi akan kadaluarsa dalam %1 hari. - By purchasing the full version, you will also support the hard work I put into creating %1. Dengan membeli versi penuh, Anda akan mendapatkan dukungan kerjakeras Saya letakkan kedalam keasi %1. @@ -866,6 +858,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Get the full version + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/it.ts b/locale/it.ts index 3445da6..8539f94 100644 --- a/locale/it.ts +++ b/locale/it.ts @@ -71,18 +71,10 @@ Please license %1 Compra %1 - - This demo has expired. - Questa demo è scaduta. - The full version allows you to watch videos without interruptions. La versione completa ti permette di guardare i video senza interruzioni. - - Without a license, the application will expire in %1 days. - Senza una licenza, l'applicazione scadrà in %1 giorni. - By purchasing the full version, you will also support the hard work I put into creating %1. Acquistando la versione completa, supporterai anche il lavoro che ho fatto per creare %1. @@ -866,6 +858,18 @@ Subscribed to %1 Iscritto a %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Compra la versione completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/ja_JP.ts b/locale/ja_JP.ts index d20caed..32e3234 100644 --- a/locale/ja_JP.ts +++ b/locale/ja_JP.ts @@ -71,18 +71,10 @@ Please license %1 %1のライセンスを取得してください - - This demo has expired. - 試用版の期限が切れました。 - The full version allows you to watch videos without interruptions. 製品版では、快適に動画を視聴することができます。 - - Without a license, the application will expire in %1 days. - 現在は、ライセンスがないため、このアプリケーションは%1日に期限切れとなります。 - By purchasing the full version, you will also support the hard work I put into creating %1. あなたが製品版を購入することによって、%1の開発を支援することができます。 @@ -866,6 +858,18 @@ Subscribed to %1 %1を購読しました + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version 製品版を入手する + + Remove + 削除 + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/ko_KR.ts b/locale/ko_KR.ts index 503df0e..1bfb777 100644 --- a/locale/ko_KR.ts +++ b/locale/ko_KR.ts @@ -71,18 +71,10 @@ Please license %1 %1을(를) 구입하세요 - - This demo has expired. - 데모버전이 만료되었습니다! - The full version allows you to watch videos without interruptions. 구입 버전은 방해받지 않고 비디오를 감상 할수 있습니다. - - Without a license, the application will expire in %1 days. - 라이센스를 구입하지 않으면, %1일후 만료 됩니다. - By purchasing the full version, you will also support the hard work I put into creating %1. 구입하면, 개발자가 %1를 만드는데 드는 소중한 노력을 지원 합니다. @@ -866,6 +858,18 @@ Subscribed to %1 %1 구독됨 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version 풀 버전 구입 + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/ky.ts b/locale/ky.ts index be95ecc..7a31971 100644 --- a/locale/ky.ts +++ b/locale/ky.ts @@ -71,18 +71,10 @@ Please license %1 %1 лицензиялап алыңыз - - This demo has expired. - Демострациялоо мөөнөтү бүттү. - The full version allows you to watch videos without interruptions. - - Without a license, the application will expire in %1 days. - Лицензиясыз болгондуктан, тиркеменин мөөнөтү %1 күндөн кийин бүтөт. - By purchasing the full version, you will also support the hard work I put into creating %1. Толук версиясын алсаңыз, %1 үчүн оор жумуш кылып жатканымды да колдоп бере аласыз. @@ -866,6 +858,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Толук версиясын сатып алуу + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/ms_MY.ts b/locale/ms_MY.ts index 9d6756b..02f626c 100644 --- a/locale/ms_MY.ts +++ b/locale/ms_MY.ts @@ -71,18 +71,10 @@ Please license %1 Sila lesenkan %1 - - This demo has expired. - Demo ini telah tamat tempoh. - The full version allows you to watch videos without interruptions. Versi penuh membolehkan anda tonton video tanpa gangguan. - - Without a license, the application will expire in %1 days. - Tanpa lesen, aplikasi akan luput dalam tempoh %1 hari. - By purchasing the full version, you will also support the hard work I put into creating %1. Dengan pembelian versi penuh, anda akan menyokong hasil kerja yang saya lakukan ketika menghasilkan %1. @@ -866,6 +858,18 @@ Subscribed to %1 Langgan kepada %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Dapatkan versi penuh + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/nb.ts b/locale/nb.ts index c0ebc30..7081fe5 100644 --- a/locale/nb.ts +++ b/locale/nb.ts @@ -71,18 +71,10 @@ Please license %1 Vennligst lisensier %1 - - This demo has expired. - Demoen er utløpt. - The full version allows you to watch videos without interruptions. Den fulle versjonen tillater deg Ã¥ se videoer uten avbrudd. - - Without a license, the application will expire in %1 days. - Uten lisens, vil programmet utløpe om %1 dager. - By purchasing the full version, you will also support the hard work I put into creating %1. Ved Ã¥ kjøpe fullversjonen, støtter du det harde arbeidet som ble lagt inn i Ã¥ skape %1. @@ -866,6 +858,18 @@ Subscribed to %1 Abonnert pÃ¥ %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Kjøp fullversjon + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/nl.ts b/locale/nl.ts index 3f2cbeb..4ccee44 100644 --- a/locale/nl.ts +++ b/locale/nl.ts @@ -71,18 +71,10 @@ Please license %1 Alstublieft, Licenceer %1 - - This demo has expired. - Deze demo is verlopen. - The full version allows you to watch videos without interruptions. De volledige versie stelt u in staat om video's te bekijken zonder onderbrekingen. - - Without a license, the application will expire in %1 days. - Zonder een licentie zal deze applicatie vervallen in %1 dagen. - By purchasing the full version, you will also support the hard work I put into creating %1. Door dit produkt te kopen beloon je mij voor het harde werk dat ik geïnvesteerd heb in het maken van %1. @@ -866,6 +858,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Verkrijg de volledige versie + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/nn.ts b/locale/nn.ts index 40af51a..ac1f51d 100644 --- a/locale/nn.ts +++ b/locale/nn.ts @@ -71,18 +71,10 @@ Please license %1 Ver venleg og lisensier %1 - - This demo has expired. - Demoen har laupt ut. - The full version allows you to watch videos without interruptions. - - Without a license, the application will expire in %1 days. - Utan ein lisens vil programmet gÃ¥ ut pÃ¥ dato om %1 dagar. - By purchasing the full version, you will also support the hard work I put into creating %1. Ved Ã¥ kjøpa den fullstendige utgÃ¥va, støttar du arbeidet lagt inn i Ã¥ skapa %1. @@ -866,6 +858,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Kjøpfullversjonen + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/pl.ts b/locale/pl.ts index 760f2d1..68434c6 100644 --- a/locale/pl.ts +++ b/locale/pl.ts @@ -71,18 +71,10 @@ Please license %1 Proszę kupić licencję %1 - - This demo has expired. - Okres wersji demo został zakończony. - The full version allows you to watch videos without interruptions. Pełna wersja pozwoli Ci oglądać filmy bez przerw. - - Without a license, the application will expire in %1 days. - Bez licencji ta aplikacja wygaśnie za %1 dni. - By purchasing the full version, you will also support the hard work I put into creating %1. Przez zakup pełnej wersji wesprzesz również ciężką pracę, którą włożyłem w stworzenie %1. @@ -866,6 +858,18 @@ Subscribed to %1 Rozpoczęto subskrypcję %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Uzyskaj pełną wersję + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/pl_PL.ts b/locale/pl_PL.ts index 826dfb7..94a243e 100644 --- a/locale/pl_PL.ts +++ b/locale/pl_PL.ts @@ -71,18 +71,10 @@ Please license %1 Proszę kup licencję %1 - - This demo has expired. - To demo wygasło. - The full version allows you to watch videos without interruptions. Pełna wersja pozwala na oglądanie filmów bez przeszkód. - - Without a license, the application will expire in %1 days. - Bez licencji, program wygaśnie za %1 dni. - By purchasing the full version, you will also support the hard work I put into creating %1. Kupując pełną wersję, wspieraż także ciężką pracę, jaką włożyłem w stworzenie %1. @@ -866,6 +858,18 @@ Subscribed to %1 Zaczęto subskrypcję %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Pobierz pełną wersję + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/pt.ts b/locale/pt.ts index eb05ba1..a431276 100644 --- a/locale/pt.ts +++ b/locale/pt.ts @@ -71,18 +71,10 @@ Please license %1 Por favor licencie o %1 - - This demo has expired. - Esta demo expirou. - The full version allows you to watch videos without interruptions. A versão compreta permite-lhe ver vídeos sem interrupções. - - Without a license, the application will expire in %1 days. - Sem uma licença, esta apliacação expirará em %1 dias. - By purchasing the full version, you will also support the hard work I put into creating %1. Ao comprar a versão completa, estará a ajudar no desenvolvimento do %1. @@ -866,6 +858,18 @@ Subscribed to %1 Subscrito %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Obter a versão completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/pt_BR.ts b/locale/pt_BR.ts index 2330982..fe5d0a0 100644 --- a/locale/pt_BR.ts +++ b/locale/pt_BR.ts @@ -71,18 +71,10 @@ Please license %1 Por favor, licencie %1 - - This demo has expired. - Esta demonstração expirou. - The full version allows you to watch videos without interruptions. A versão completa permite que você assista vídeos sem interrupções. - - Without a license, the application will expire in %1 days. - Sem licença, a aplicação irá expirar em %1 dias. - By purchasing the full version, you will also support the hard work I put into creating %1. Ao comprar a versão completa, você também apoiará o trabalho duro que eu dediquei ao criar %1. @@ -866,6 +858,18 @@ Subscribed to %1 Inscrito em %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Obter a versão completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/pt_PT.ts b/locale/pt_PT.ts index 6f0737e..548010b 100644 --- a/locale/pt_PT.ts +++ b/locale/pt_PT.ts @@ -71,18 +71,10 @@ Please license %1 Por favor licencie %1 - - This demo has expired. - Esta demonstração expirou. - The full version allows you to watch videos without interruptions. A versão completa permite-lhe ver vídeos sem interrupções. - - Without a license, the application will expire in %1 days. - Sem uma licença, a aplicação irá expirar em %1 dias. - By purchasing the full version, you will also support the hard work I put into creating %1. Ao comprar a versão completa, também irá apoiar o trabalho árduo que pus %1. @@ -866,6 +858,18 @@ Subscribed to %1 Subscrito a %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Obter a versão completa + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/ro.ts b/locale/ro.ts index 6f62bb5..6c5bdac 100644 --- a/locale/ro.ts +++ b/locale/ro.ts @@ -71,18 +71,10 @@ Please license %1 Licențiați %1 - - This demo has expired. - Această versiune demo a expirat. - The full version allows you to watch videos without interruptions. Versiunea nerestricționată vă permite să urmăriți clipurile video fără întreruperi. - - Without a license, the application will expire in %1 days. - Fără licență, aplicația va expira în %1 zile. - By purchasing the full version, you will also support the hard work I put into creating %1. Cumpărând versiunea integrală îmi sprijini efortul depus pentru crearea %1. @@ -866,6 +858,18 @@ Subscribed to %1 Abonează-te la %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Obține versiunea integrală + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/ru.ts b/locale/ru.ts index 1de2897..1803b88 100644 --- a/locale/ru.ts +++ b/locale/ru.ts @@ -72,18 +72,10 @@ Лицензия %1 - - This demo has expired. - Демонстрационный период истек. - The full version allows you to watch videos without interruptions. Полная версия позволит смотреть видео без пауз. - - Without a license, the application will expire in %1 days. - Срок работы, этого приложения, без лицензии истекает через %1 дн. - By purchasing the full version, you will also support the hard work I put into creating %1. При покупке полной версии, вы также оказываете поддержку тяжелой работы в создании %1. @@ -867,6 +859,18 @@ Subscribed to %1 Подписаны на %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1094,6 +1098,18 @@ Get the full version Купить полную версию + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/sk.ts b/locale/sk.ts index 61d4fd2..5a82304 100644 --- a/locale/sk.ts +++ b/locale/sk.ts @@ -71,18 +71,10 @@ Please license %1 Prosím licencujte %1 - - This demo has expired. - Demoverzia expirovala. - The full version allows you to watch videos without interruptions. Plná verzia vám umožňuje pozeraÅ¥ videá bez preruÅ¡ení. - - Without a license, the application will expire in %1 days. - Aplikácia bez licencie expiruje za %1 dní. - By purchasing the full version, you will also support the hard work I put into creating %1. Zakúpením plnej verzie tiež podporíš vynaložené úsilie pri tvorbe %1. @@ -866,6 +858,18 @@ Subscribed to %1 Odoberáte kanál %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version ZískaÅ¥ plnú verziu + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/sl.ts b/locale/sl.ts index 3f5ea59..b9e6221 100644 --- a/locale/sl.ts +++ b/locale/sl.ts @@ -71,18 +71,10 @@ Please license %1 Kupite prosim licenco %1 - - This demo has expired. - Različica demo je potekla. - The full version allows you to watch videos without interruptions. Polna verzija vam omogoča ogled posnetkov brez prekinitev. - - Without a license, the application will expire in %1 days. - Brez licence bo uporabnost aplikacije potekla čez %1 dni. - By purchasing the full version, you will also support the hard work I put into creating %1. Z nakupom polne različice, boste podprli veliko truda, ki sem ga vložil v %1. @@ -866,6 +858,18 @@ Subscribed to %1 Prijavljeni ste na %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Pridobi celotno različico + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/sq.ts b/locale/sq.ts index bebe518..1750165 100644 --- a/locale/sq.ts +++ b/locale/sq.ts @@ -72,18 +72,10 @@ Please license %1 Ju lutem licenconi %1 - - This demo has expired. - Versioni demostrues ka perfunduar - The full version allows you to watch videos without interruptions. - - Without a license, the application will expire in %1 days. - Pa licenc programmit do ti mbaron afati ne %1 ditë - By purchasing the full version, you will also support the hard work I put into creating %1. Duke bler versionin e plot , ju gjithashtu do te perkrahni punen e mundimshme qe kam ber per krijimin %1. @@ -867,6 +859,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1094,6 +1098,18 @@ Get the full version Merrni versionin e plote + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/sr.ts b/locale/sr.ts index 15e77de..9505ceb 100644 --- a/locale/sr.ts +++ b/locale/sr.ts @@ -71,18 +71,10 @@ Please license %1 Молимо да купите %1 - - This demo has expired. - Показна верзија је истекла. - The full version allows you to watch videos without interruptions. Пуна верзија Вам дозвољава да гледате видео снимке без прекидања. - - Without a license, the application will expire in %1 days. - Без лиценце програм ће истећи за %1 дан(а). - By purchasing the full version, you will also support the hard work I put into creating %1. Куповином пуне верзије ћете уједно и подржати мој рад на програму %1. @@ -866,6 +858,18 @@ Subscribed to %1 Претплаћен на %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Преузмите пуну верзију + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/sv_SE.ts b/locale/sv_SE.ts index 88d809e..69975d1 100644 --- a/locale/sv_SE.ts +++ b/locale/sv_SE.ts @@ -71,18 +71,10 @@ Please license %1 Vänligen licensiera %1 - - This demo has expired. - Denna demo har utgÃ¥tt. - The full version allows you to watch videos without interruptions. Den fulla versionen tillÃ¥ter dig att kolla pÃ¥ videoklipp utan avbrott. - - Without a license, the application will expire in %1 days. - Utan en licens kommer programmet att upphöra inom %1 dagar. - By purchasing the full version, you will also support the hard work I put into creating %1. Genom att köpa fullversionen kommer du ocksÃ¥ att stödja mitt hÃ¥rda arbete jag gör med %1. @@ -866,6 +858,18 @@ Subscribed to %1 Prenumererad pÃ¥ %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Skaffa den kompletta versionen + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/th.ts b/locale/th.ts index 0992c98..00b0ddd 100644 --- a/locale/th.ts +++ b/locale/th.ts @@ -71,18 +71,10 @@ Please license %1 โปรดซื้อใบอนุญาต %1 - - This demo has expired. - ชุดทดลองใช้หมดอายุแล้ว - The full version allows you to watch videos without interruptions. เวอร์ชั่นเต็มจะอนุญาตให้คุณรับชมวิดีโอโดยไม่ถูกขัดจังหวะ - - Without a license, the application will expire in %1 days. - ปราศจากใบอนุญาต แอปพลิเคชั่นจะหมดอายุใน %1 วัน - By purchasing the full version, you will also support the hard work I put into creating %1. ด้วยการซื้อเวอร์ชั่นเต็ม คุณยังได้สนับสนุนการทำงานหนักที่ฉันใช้ในการสร้าง %1 @@ -866,6 +858,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version ซื้อเวอร์ชั่นเต็ม + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/tr.ts b/locale/tr.ts index 73a4a73..a96c9ad 100644 --- a/locale/tr.ts +++ b/locale/tr.ts @@ -71,18 +71,10 @@ Please license %1 Lütfen lisans %1 - - This demo has expired. - Deneme süresi bitti. - The full version allows you to watch videos without interruptions. Tam sürüm, videoları duraklamadan izlemenizi sağlar. - - Without a license, the application will expire in %1 days. - Lisans olmazsa, uygulama süresi %1 gün içinde dolacaktır. - By purchasing the full version, you will also support the hard work I put into creating %1. Tam sürümü alarak, aynı zamanda %1 yaratmamdaki üstün çabamı destekleyebilirsiniz. @@ -866,6 +858,18 @@ Subscribed to %1 %1 Abone Ol + + Rewind %1 seconds + %1 saniye geri sar + + + Fast forward %1 seconds + %1 saniye hızlı ileri sar + + + channel + kanal + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Tam sürüme geç + + Remove + Kaldır + + + Need a remote control for %1? Try %2! + %1 için uzaktan kumanda mı lazım? %2'yi dene! + + + I keep improving %1 to make it the best I can. Support this work! + %1 iyileştirmek için sürekli devam ediyorum. Bu çalışmayı destekleyin! + SidebarHeader diff --git a/locale/uk.ts b/locale/uk.ts index fccc370..36b9cd4 100644 --- a/locale/uk.ts +++ b/locale/uk.ts @@ -72,18 +72,10 @@ Ліцензуйте %1 - - This demo has expired. - Пробний період вичерпано. - The full version allows you to watch videos without interruptions. Повна версія дозволяє дивитися видиво без перерв. - - Without a license, the application will expire in %1 days. - Проґраму буде заблоковано через %1 днів, якщо Ви не придбаєте ліцензію. - By purchasing the full version, you will also support the hard work I put into creating %1. При купівлі повної версії, Ви, також, надаєте підтримку важкій роботі, яка була задіяна під час створення %1. @@ -867,6 +859,18 @@ Subscribed to %1 Підписані на %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1094,6 +1098,18 @@ Get the full version Отримати повну версію + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/uk_UA.ts b/locale/uk_UA.ts index 9c41c38..0eba359 100644 --- a/locale/uk_UA.ts +++ b/locale/uk_UA.ts @@ -72,18 +72,10 @@ Ліцензуйте %1 - - This demo has expired. - Пробний період вичерпано. - The full version allows you to watch videos without interruptions. Повна версія дозволяє дивитися видиво без перерв. - - Without a license, the application will expire in %1 days. - Проґраму буде заблоковано через %1 днів, якщо Ви не придбаєте ліцензію. - By purchasing the full version, you will also support the hard work I put into creating %1. При купівлі повної версії, Ви, також, надаєте підтримку важкій роботі, яка була задіяна під час створення %1. @@ -867,6 +859,18 @@ Subscribed to %1 Підписані на %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1094,6 +1098,18 @@ Get the full version Отримати повну версію + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/vi.ts b/locale/vi.ts index dce52fb..c29e039 100644 --- a/locale/vi.ts +++ b/locale/vi.ts @@ -71,18 +71,10 @@ Please license %1 Xin giấy phép %1 - - This demo has expired. - Phần thá»­ nghiệm này đã hết hạn. - The full version allows you to watch videos without interruptions. - - Without a license, the application will expire in %1 days. - Nếu không có giấy phép, các ứng dụng sẽ hết hạn trong %1 ngày. - By purchasing the full version, you will also support the hard work I put into creating %1. Bằng cách mua phiên bản đầy đủ, bạn cÅ©ng sẽ hỗ trợ vào quá trình phát triển của phần mềm %1. @@ -866,6 +858,18 @@ Subscribed to %1 + + Rewind %1 seconds + + + + Fast forward %1 seconds + + + + channel + + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version Nhận phiên bản đầy đủ + + Remove + + + + Need a remote control for %1? Try %2! + + + + I keep improving %1 to make it the best I can. Support this work! + + SidebarHeader diff --git a/locale/zh_CN.ts b/locale/zh_CN.ts index 27a7517..ff7cabb 100644 --- a/locale/zh_CN.ts +++ b/locale/zh_CN.ts @@ -27,11 +27,11 @@ Powered by %1 - + 由 %1 强力驱动 Open-source software - + 开源软件 Icon designed by %1. @@ -71,18 +71,10 @@ Please license %1 请购买 %1 授权 - - This demo has expired. - 该演示版已经过期。 - The full version allows you to watch videos without interruptions. 完整版本允许你不被中断观看视频 - - Without a license, the application will expire in %1 days. - 若无授权,该软件将会在 %1 天后过期。 - By purchasing the full version, you will also support the hard work I put into creating %1. 通过购买完整版本,您也将支持我在创建 %1 时的辛苦工作。 @@ -115,7 +107,7 @@ You have %n new video(s) - + 你有 %n 个新视频 @@ -196,30 +188,30 @@ %n hour(s) ago - + %n 小时前 %n day(s) ago - + %n 天前 %n month(s) ago - + %n 月前 K K as in Kilo, i.e. thousands - + K M M stands for Millions - + M B B stands for Billions - + B %1 views @@ -227,7 +219,7 @@ %n week(s) ago - + %n 周前 @@ -281,7 +273,7 @@ %n Download(s) - + %n 个下载 @@ -674,11 +666,11 @@ Toggle &Menu Bar - + 切换菜单栏(&M) Menu - + 菜单 &Love %1? Rate it! @@ -806,7 +798,7 @@ You can still access the menu bar by pressing the ALT key - + 按住 ALT 键以访问菜单栏 @@ -856,7 +848,7 @@ Switched to %1 - + 切换到 %1 Unsubscribed from %1 @@ -866,6 +858,18 @@ Subscribed to %1 订阅 %1 + + Rewind %1 seconds + 回退 %1 秒 + + + Fast forward %1 seconds + 快进 %1 秒 + + + channel + 频道 + MessageWidget @@ -905,7 +909,7 @@ PickMessage Pick a video - + 选择一个视频 @@ -1093,6 +1097,18 @@ Get the full version 获取完整版 + + Remove + 移除 + + + Need a remote control for %1? Try %2! + 想要远程控制 %1?试试 %2! + + + I keep improving %1 to make it the best I can. Support this work! + 我一直在尽力改进 %1。请支持这个作品! + SidebarHeader @@ -1102,7 +1118,7 @@ &Forward - + 前进(&F) Forward to %1 diff --git a/locale/zh_TW.ts b/locale/zh_TW.ts index 854e248..94154ae 100644 --- a/locale/zh_TW.ts +++ b/locale/zh_TW.ts @@ -71,18 +71,10 @@ Please license %1 請取得 %1 授權 - - This demo has expired. - 這個展示版已過期。 - The full version allows you to watch videos without interruptions. 完整的版本允許您不被中斷地觀看影片。 - - Without a license, the application will expire in %1 days. - 沒有取得授權,本程式將於 %1 天過期。 - By purchasing the full version, you will also support the hard work I put into creating %1. 透過購買完整版,您還可以支持我投入更多心力於打造 %1。 @@ -866,6 +858,18 @@ Subscribed to %1 已訂閱 %1 + + Rewind %1 seconds + 倒帶 %1 秒 + + + Fast forward %1 seconds + 快轉 %1 秒 + + + channel + 頻道 + MessageWidget @@ -1093,6 +1097,18 @@ Get the full version 取得完整版 + + Remove + 移除 + + + Need a remote control for %1? Try %2! + 需要遙控 %1?試試看 %2! + + + I keep improving %1 to make it the best I can. Support this work! + 我會不斷改善 %1,讓它變得更好。請支持我的努力! + SidebarHeader diff --git a/minitube.pro b/minitube.pro index 652392f..187db44 100644 --- a/minitube.pro +++ b/minitube.pro @@ -1,7 +1,7 @@ -CONFIG += c++14 exceptions_off rtti_off optimize_full +CONFIG += c++17 exceptions_off rtti_off optimize_full object_parallel_to_source TEMPLATE = app -VERSION = 3.4.2 +VERSION = 3.5 DEFINES += APP_VERSION="$$VERSION" APP_NAME = Minitube @@ -10,6 +10,9 @@ DEFINES += APP_NAME="$$APP_NAME" APP_UNIX_NAME = minitube DEFINES += APP_UNIX_NAME="$$APP_UNIX_NAME" +message(Building $${APP_NAME} $${VERSION}) +message(Qt $$[QT_VERSION] in $$[QT_INSTALL_PREFIX]) + DEFINES += APP_SNAPSHOT CONFIG -= debug_and_release @@ -38,14 +41,16 @@ DEFINES += MEDIA_MPV include(lib/media/media.pri) include(src/qtsingleapplication/qtsingleapplication.pri) +include(src/invidious/invidious.pri) HEADERS += src/video.h \ src/messagebar.h \ src/spacer.h \ src/constants.h \ src/playlistitemdelegate.h \ + src/updateutils.h \ + src/videoapi.h \ src/videomimedata.h \ - src/updatechecker.h \ src/searchparams.h \ src/minisplitter.h \ src/loadingwidget.h \ @@ -76,6 +81,7 @@ HEADERS += src/video.h \ src/view.h \ src/playlistmodel.h \ src/videosource.h \ + src/waitingspinnerwidget.h \ src/ytsearch.h \ src/ytstandardfeed.h \ src/standardfeedsview.h \ @@ -118,9 +124,9 @@ HEADERS += src/video.h \ SOURCES += src/main.cpp \ src/messagebar.cpp \ src/spacer.cpp \ + src/updateutils.cpp \ src/video.cpp \ src/videomimedata.cpp \ - src/updatechecker.cpp \ src/searchparams.cpp \ src/minisplitter.cpp \ src/loadingwidget.cpp \ @@ -151,6 +157,7 @@ SOURCES += src/main.cpp \ src/playlistitemdelegate.cpp \ src/playlistmodel.cpp \ src/videosource.cpp \ + src/waitingspinnerwidget.cpp \ src/ytsearch.cpp \ src/ytstandardfeed.cpp \ src/standardfeedsview.cpp \ @@ -266,6 +273,11 @@ unix:!mac { mac|win32|contains(DEFINES, APP_UBUNTU):include(local/local.pri) +!contains(DEFINES, APP_MAC_STORE) { + # DEFINES += UPDATER_NO_SPARKLE + include(lib/updater/updater.pri) +} + message(CONFIG: $$CONFIG) message(DEFINES: $$DEFINES) message(QMAKE_CXXFLAGS: $$QMAKE_CXXFLAGS) diff --git a/src/aboutview.cpp b/src/aboutview.cpp index 8820f2d..48b7dff 100644 --- a/src/aboutview.cpp +++ b/src/aboutview.cpp @@ -36,6 +36,11 @@ $END_LICENSE */ #include "iconutils.h" #include "mainwindow.h" +#ifdef UPDATER +#include "updater.h" +#include "waitingspinnerwidget.h" +#endif + AboutView::AboutView(QWidget *parent) : View(parent) { const int padding = 30; const char *buildYear = __DATE__ + 7; @@ -67,6 +72,7 @@ AboutView::AboutView(QWidget *parent) : View(parent) { QBoxLayout *layout = new QVBoxLayout(); layout->setAlignment(Qt::AlignCenter); layout->setSpacing(padding); + layout->setMargin(padding / 2); aboutlayout->addLayout(layout); QColor lightTextColor = palette().text().color(); @@ -146,8 +152,42 @@ AboutView::AboutView(QWidget *parent) : View(parent) { infoLabel->setWordWrap(true); layout->addWidget(infoLabel); +#ifdef UPDATER + int capHeight = fontMetrics().capHeight(); + + QBoxLayout *updateLayout = new QHBoxLayout(); + updateLayout->setMargin(0); + updateLayout->setSpacing(capHeight); + updateLayout->setAlignment(Qt::AlignLeft); + + auto spinner = new WaitingSpinnerWidget(this, false, false); + spinner->setColor(palette().foreground().color()); + spinner->setLineLength(capHeight / 2); + spinner->setNumberOfLines(spinner->lineLength() * 2); + spinner->setInnerRadius(spinner->lineLength()); + auto spinnerStartStop = [spinner](auto status) { + if (status == Updater::Status::DownloadingUpdate) + spinner->start(); + else + spinner->stop(); + }; + connect(&Updater::instance(), &Updater::statusChanged, this, spinnerStartStop); + updateLayout->addWidget(spinner); + spinnerStartStop(Updater::instance().getStatus()); + + updateLayout->addWidget(Updater::instance().getLabel()); + + layout->addLayout(updateLayout); +#endif + QLayout *buttonLayout = new QHBoxLayout(); + buttonLayout->setMargin(0); buttonLayout->setAlignment(Qt::AlignLeft); + +#ifdef UPDATER + buttonLayout->addWidget(Updater::instance().getButton()); +#endif + closeButton = new QPushButton(tr("&Close"), this); closeButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum); closeButton->setDefault(true); @@ -163,4 +203,7 @@ AboutView::AboutView(QWidget *parent) : View(parent) { void AboutView::appear() { closeButton->setFocus(); +#ifdef UPDATER + Updater::instance().checkWithoutUI(); +#endif } diff --git a/src/appwidget.cpp b/src/appwidget.cpp index 8b9996a..3c67e28 100644 --- a/src/appwidget.cpp +++ b/src/appwidget.cpp @@ -42,7 +42,8 @@ void AppsWidget::paintEvent(QPaintEvent *e) { style()->drawPrimitive(QStyle::PE_Widget, &o, &p, this); } -AppWidget::AppWidget(const QString &name, const QString &code, QWidget *parent) : QWidget(parent), icon(0), name(name), downloadButton(0) { +AppWidget::AppWidget(const QString &name, const QString &code, QWidget *parent) + : QWidget(parent), name(name), downloadButton(nullptr) { const QString unixName = code.left(code.lastIndexOf('.')); const QString baseUrl = QLatin1String("https://") + Constants::ORG_DOMAIN; const QString filesUrl = baseUrl + QLatin1String("/files/"); @@ -56,7 +57,11 @@ AppWidget::AppWidget(const QString &name, const QString &code, QWidget *parent) icon = new QLabel(); icon->setMinimumHeight(128); layout->addWidget(icon); - const QString iconUrl = filesUrl + QLatin1String("products/") + unixName + QLatin1String(".png"); + QString pixelRatioString; + if (devicePixelRatioF() > 1.0) + pixelRatioString = '@' + QString::number(devicePixelRatio()) + 'x'; + const QString iconUrl = filesUrl + QLatin1String("products/") + unixName + pixelRatioString + + QLatin1String(".png"); QObject *reply = Http::instance().get(iconUrl); connect(reply, SIGNAL(data(QByteArray)), SLOT(iconDownloaded(QByteArray))); diff --git a/src/channelaggregator.cpp b/src/channelaggregator.cpp index a4cd7d2..5848fa9 100644 --- a/src/channelaggregator.cpp +++ b/src/channelaggregator.cpp @@ -30,9 +30,12 @@ $END_LICENSE */ #include "http.h" #include "httputils.h" +#include "videoapi.h" +#include "ivchannelsource.h" + ChannelAggregator::ChannelAggregator(QObject *parent) : QObject(parent), unwatchedCount(-1), running(false), stopped(false), currentChannel(0) { - checkInterval = 1800; + checkInterval = 3600; timer = new QTimer(this); timer->setInterval(60000 * 5); @@ -47,7 +50,7 @@ ChannelAggregator *ChannelAggregator::instance() { void ChannelAggregator::start() { stopped = false; updateUnwatchedCount(); - QTimer::singleShot(0, this, SLOT(run())); + QTimer::singleShot(10000, this, SLOT(run())); if (!timer->isActive()) timer->start(); } @@ -112,6 +115,8 @@ void ChannelAggregator::parseWebPage(const QByteArray &bytes) { QString latestVideoId = currentChannel->latestVideoId(); qDebug() << "Comparing" << videoId << latestVideoId; hasNewVideos = videoId != latestVideoId; + } else { + qDebug() << "Cannot capture latest video id"; } if (hasNewVideos) { if (currentChannel) { @@ -137,9 +142,18 @@ void ChannelAggregator::reallyProcessChannel(YTChannel *channel) { params->setSortBy(SearchParams::SortByNewest); params->setTransient(true); params->setPublishedAfter(channel->getChecked()); - YTSearch *videoSource = new YTSearch(params); - connect(videoSource, SIGNAL(gotVideos(QVector