]> git.sur5r.net Git - minitube/commitdiff
New upstream version 3.4.2
authorJakob Haufe <jakob@haufe.it>
Tue, 29 Sep 2020 08:49:35 +0000 (10:49 +0200)
committerJakob Haufe <jakob@haufe.it>
Tue, 29 Sep 2020 08:49:35 +0000 (10:49 +0200)
34 files changed:
icons/dark/16/search-duration_active.png
icons/dark/16/search-duration_active@2x.png
icons/dark/16/search-duration_disabled.png
icons/dark/16/search-duration_disabled@2x.png
icons/dark/16/search-duration_normal.png
icons/dark/16/search-duration_normal@2x.png
icons/dark/16/search-time_active.png
icons/dark/16/search-time_active@2x.png
icons/dark/16/search-time_disabled.png
icons/dark/16/search-time_disabled@2x.png
icons/dark/16/search-time_normal.png
icons/dark/16/search-time_normal@2x.png
icons/light/16/search-duration_active.png
icons/light/16/search-duration_active@2x.png
icons/light/16/search-duration_disabled.png
icons/light/16/search-duration_disabled@2x.png
icons/light/16/search-duration_normal.png
icons/light/16/search-duration_normal@2x.png
icons/light/16/search-time_active.png
icons/light/16/search-time_active@2x.png
icons/light/16/search-time_disabled.png
icons/light/16/search-time_disabled@2x.png
icons/light/16/search-time_normal.png
icons/light/16/search-time_normal@2x.png
lib/media/src/mpv/mediampv.cpp
lib/media/src/mpv/mediampv.h
minitube.pro
src/aboutview.cpp
src/channelview.cpp
src/iconutils.cpp
src/iconutils.h
src/main.cpp
src/mainwindow.cpp
src/ytvideo.cpp

index a1d937283f7857fdf6d1b7e01f282e08a187277d..9f4c7516a3503751e1f5f5437a4e4e7d250ee7e0 100644 (file)
Binary files a/icons/dark/16/search-duration_active.png and b/icons/dark/16/search-duration_active.png differ
index 4a38e7ecb539ef308089a7668f2266fdb538ac52..1b5d46af1590f3b1fd3f1f47523a9f6ebd24e42c 100644 (file)
Binary files a/icons/dark/16/search-duration_active@2x.png and b/icons/dark/16/search-duration_active@2x.png differ
index a1d937283f7857fdf6d1b7e01f282e08a187277d..4f83f8da39512bff9bf29940cccad5529d060f7a 100644 (file)
Binary files a/icons/dark/16/search-duration_disabled.png and b/icons/dark/16/search-duration_disabled.png differ
index 4a38e7ecb539ef308089a7668f2266fdb538ac52..101333a9f1cf4a3dcc3259408daf5c46b2154177 100644 (file)
Binary files a/icons/dark/16/search-duration_disabled@2x.png and b/icons/dark/16/search-duration_disabled@2x.png differ
index a1d937283f7857fdf6d1b7e01f282e08a187277d..b68ef5f6b5d1d7bce869cce9463065548e8b6b6c 100644 (file)
Binary files a/icons/dark/16/search-duration_normal.png and b/icons/dark/16/search-duration_normal.png differ
index 4a38e7ecb539ef308089a7668f2266fdb538ac52..e6c4ad3608e89ed762aa5ec1f5ee535723c4ba75 100644 (file)
Binary files a/icons/dark/16/search-duration_normal@2x.png and b/icons/dark/16/search-duration_normal@2x.png differ
index 4196de9b4c3af95a03ce7622ed641cc222d24b8f..9696953b4350c70671d21fb796b5ed273cde5405 100644 (file)
Binary files a/icons/dark/16/search-time_active.png and b/icons/dark/16/search-time_active.png differ
index 417dd9ba6ce2bdb711a08174ce61f4ebf74e6ac5..0c92bb8813ab7ef34034a60d49c5cff87240cde2 100644 (file)
Binary files a/icons/dark/16/search-time_active@2x.png and b/icons/dark/16/search-time_active@2x.png differ
index 59f9bc97a16a2deab1e62e1c97f43bb62b4f1abc..82972a22244478fee5c52b6f238cb3124488e222 100644 (file)
Binary files a/icons/dark/16/search-time_disabled.png and b/icons/dark/16/search-time_disabled.png differ
index 7b388eff629ca2c07b7c1ff850aca8b897a735af..4b22ab733f0b899030ac394ca696b269542a11f4 100644 (file)
Binary files a/icons/dark/16/search-time_disabled@2x.png and b/icons/dark/16/search-time_disabled@2x.png differ
index e98b7d5b72ce4bdabd61c3d1c857f26ea3d364b4..204833ed0ba10902b14aaf0b941c30ec200c6f7f 100644 (file)
Binary files a/icons/dark/16/search-time_normal.png and b/icons/dark/16/search-time_normal.png differ
index 0a1b0c63a2a52a297ddf51bbe4623010441509f5..2e59fd4bc4e9c388f5900da64d6dcbeada6ad110 100644 (file)
Binary files a/icons/dark/16/search-time_normal@2x.png and b/icons/dark/16/search-time_normal@2x.png differ
index a1d937283f7857fdf6d1b7e01f282e08a187277d..2780ba93fb932dcc5d442def875b22501b920b4e 100644 (file)
Binary files a/icons/light/16/search-duration_active.png and b/icons/light/16/search-duration_active.png differ
index 4a38e7ecb539ef308089a7668f2266fdb538ac52..cdb735d93c5d3f3db83d0f13507c967959c43c16 100644 (file)
Binary files a/icons/light/16/search-duration_active@2x.png and b/icons/light/16/search-duration_active@2x.png differ
index a1d937283f7857fdf6d1b7e01f282e08a187277d..be987a5b1dcc4f37c3354914d8f9e971423f1ba5 100644 (file)
Binary files a/icons/light/16/search-duration_disabled.png and b/icons/light/16/search-duration_disabled.png differ
index 4a38e7ecb539ef308089a7668f2266fdb538ac52..8c985753123e6441568ed8f104aaf7fcce4c0e94 100644 (file)
Binary files a/icons/light/16/search-duration_disabled@2x.png and b/icons/light/16/search-duration_disabled@2x.png differ
index a1d937283f7857fdf6d1b7e01f282e08a187277d..4f83f8da39512bff9bf29940cccad5529d060f7a 100644 (file)
Binary files a/icons/light/16/search-duration_normal.png and b/icons/light/16/search-duration_normal.png differ
index 4a38e7ecb539ef308089a7668f2266fdb538ac52..101333a9f1cf4a3dcc3259408daf5c46b2154177 100644 (file)
Binary files a/icons/light/16/search-duration_normal@2x.png and b/icons/light/16/search-duration_normal@2x.png differ
index 2d0c8f7d6661053dffc0c874706ef075262f38b1..29a57b51f05446a86f3b63326d03f0eb9a13fd32 100644 (file)
Binary files a/icons/light/16/search-time_active.png and b/icons/light/16/search-time_active.png differ
index 6caccae07370e5a38bcc0ec1cb5c8201ffe54dda..6322fac7a7262f1fcaac7f33bf1f35bb14eb5175 100644 (file)
Binary files a/icons/light/16/search-time_active@2x.png and b/icons/light/16/search-time_active@2x.png differ
index 4d93df3c755389edf1ff85f2dbbf28473d81f18b..7cdb3b6352796c0f4b4ac8050df750e561f40c59 100644 (file)
Binary files a/icons/light/16/search-time_disabled.png and b/icons/light/16/search-time_disabled.png differ
index 992f29bf871e3bf0d032b24a568cd1f5be376cd7..1472701a19376088fdb2868b00c97c8fc29e81b6 100644 (file)
Binary files a/icons/light/16/search-time_disabled@2x.png and b/icons/light/16/search-time_disabled@2x.png differ
index 59f9bc97a16a2deab1e62e1c97f43bb62b4f1abc..82972a22244478fee5c52b6f238cb3124488e222 100644 (file)
Binary files a/icons/light/16/search-time_normal.png and b/icons/light/16/search-time_normal.png differ
index 7b388eff629ca2c07b7c1ff850aca8b897a735af..4b22ab733f0b899030ac394ca696b269542a11f4 100644 (file)
Binary files a/icons/light/16/search-time_normal@2x.png and b/icons/light/16/search-time_normal@2x.png differ
index 54b50104f6be29731fe221821aba36429a029aef..3276f4b72aa153767641b849ac04ccb87f87c38d 100644 (file)
@@ -134,6 +134,14 @@ void MediaMPV::handleMpvEvent(mpv_event *event) {
     }
 
     case MPV_EVENT_FILE_LOADED:
+        // Add separate audiofile if there is any
+        if (!audioFileToAdd.isEmpty())
+        {
+            const QByteArray audioUtf8 = audioFileToAdd.toUtf8();
+            const char *args2[] = {"audio-add", audioUtf8.constData(), nullptr};
+            sendCommand(args2);
+            audioFileToAdd.clear();
+        }
         setState(Media::PlayingState);
         break;
 
@@ -258,12 +266,11 @@ void MediaMPV::playSeparateAudioAndVideo(const QString &video, const QString &au
     const char *args[] = {"loadfile", fileUtf8.constData(), nullptr};
     sendCommand(args);
 
-    qApp->processEvents();
-
-    const QByteArray audioUtf8 = audio.toUtf8();
-    const char *args2[] = {"audio-add", audioUtf8.constData(), nullptr};
-    sendCommand(args2);
+    // We are playing audio as separate file. The add audio command must executed when the main file is loaded
+    // Otherwise the audio file doesn't gets played
+    audioFileToAdd = audio;
 
+    qApp->processEvents();
     clearTrackState();
 }
 
@@ -320,6 +327,8 @@ Media::State MediaMPV::state() const {
 }
 
 void MediaMPV::play(const QString &file) {
+    audioFileToAdd.clear();
+
     const QByteArray fileUtf8 = file.toUtf8();
     const char *args[] = {"loadfile", fileUtf8.constData(), nullptr};
     sendCommand(args);
@@ -366,6 +375,7 @@ void MediaMPV::setUserAgent(const QString &value) {
 }
 
 void MediaMPV::enqueue(const QString &file) {
+    audioFileToAdd.clear();
     const QByteArray fileUtf8 = file.toUtf8();
     const char *args[] = {"loadfile", fileUtf8.constData(), "append", nullptr};
     sendCommand(args);
index 16211488a2468b8b8fdcb02a7de3156af9f0df83..9f8e0c47c6045bc7ad26501cbb42a285132277a1 100644 (file)
@@ -59,6 +59,8 @@ private:
     Media::State currentState = Media::StoppedState;
     bool aboutToFinishEmitted = false;
     QString lastErrorString;
+
+    QString audioFileToAdd;
 };
 
 #endif // MEDIAMPV_H
index d4f247f05688afb0dec00674a68896e21e72883f..652392ff32be7287469a29f3a7a1032ccb9ab5f9 100644 (file)
@@ -1,7 +1,7 @@
 CONFIG += c++14 exceptions_off rtti_off optimize_full
 
 TEMPLATE = app
-VERSION = 3.4.1
+VERSION = 3.4.2
 DEFINES += APP_VERSION="$$VERSION"
 
 APP_NAME = Minitube
index 2c5b456ae356a3ea2f5bcf75c165a139bc57d014..8820f2df0a26dc262ccf43f90d67d364567dd467 100644 (file)
@@ -150,8 +150,8 @@ AboutView::AboutView(QWidget *parent) : View(parent) {
     buttonLayout->setAlignment(Qt::AlignLeft);
     closeButton = new QPushButton(tr("&Close"), this);
     closeButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
-
     closeButton->setDefault(true);
+    closeButton->setShortcut(Qt::Key_Escape);
     closeButton->setFocus();
     connect(closeButton, SIGNAL(clicked()), MainWindow::instance(), SLOT(goBack()));
     buttonLayout->addWidget(closeButton);
index eb6ccf902f876040ae6f8324e2bf57e2a1582814..0ce9a2c313cf64137119be10248f14c2e3fadcd4 100644 (file)
@@ -150,7 +150,7 @@ QString ChannelView::noSubscriptionsMessage() {
 }
 
 void ChannelView::appear() {
-    updateQuery();
+    updateQuery(true);
     MainWindow::instance()->showActionsInStatusBar(statusActions, true);
     setFocus();
     ChannelAggregator::instance()->start();
index b58368e453bb90ccaa2d80fdd1c04eff5827fd4c..52462721320aa7cb6d8e8a88f8c847458f0309e8 100644 (file)
@@ -33,8 +33,15 @@ void addIconFile(QIcon &icon,
         icon.addFile(filename, QSize(size, size), mode, state);
     }
 }
+
+QVector<int> sizes;
+
 } // namespace
 
+void IconUtils::setSizes(const QVector<int> &value) {
+    sizes = value;
+}
+
 QIcon IconUtils::fromTheme(const QString &name) {
     static const QLatin1String symbolic("-symbolic");
     if (name.endsWith(symbolic)) return QIcon::fromTheme(name);
@@ -62,7 +69,7 @@ QIcon IconUtils::fromResources(const char *name) {
     QIcon icon;
 
     // WARN keep these sizes updated with what we really use
-    for (int size : {16, 24, 32, 88}) {
+    for (int size : qAsConst(sizes)) {
         const QString pathAndName =
                 path + QString::number(size) + QLatin1Char('/') + QLatin1String(name);
         QString iconFilename = pathAndName + normal + ext;
index 00e764eda4d8186dc75ddcdf8a5ee50fce205977..4db2ed31316286eda6be89c62fcb2d82fa0c2968 100644 (file)
@@ -25,6 +25,8 @@ $END_LICENSE */
 
 class IconUtils {
 public:
+    static void setSizes(const QVector<int> &value);
+
     static QIcon fromTheme(const QString &name);
     static QIcon fromResources(const char *name);
 
index e2a0c4450f6b8c145b651f11cd41c7fd455478cd..6332b1a7f407bf35f938145b1394b61d3d735e35 100644 (file)
@@ -138,6 +138,8 @@ int main(int argc, char **argv) {
 
     QNetworkProxyFactory::setUseSystemConfiguration(true);
 
+    IconUtils::setSizes({16, 24, 32, 88});
+
     showWindow(app, pkgDataDir);
 
     return app.exec();
index 1cfe62240845dc50976b8517112972b7c26101c6..abf71e5642f63ffaa0b497ee5222a9fcbb2e53cb 100644 (file)
@@ -157,7 +157,7 @@ MainWindow::MainWindow()
     showHome();
 #endif
 
-    QTimer::singleShot(1000, this, &MainWindow::lazyInit);
+    QTimer::singleShot(100, this, &MainWindow::lazyInit);
 }
 
 void MainWindow::lazyInit() {
index fca388a3e28cedef97df7b15e93cbf04bcab911b..123548148e56320d35c2affde128f276e4e91250 100644 (file)
@@ -245,7 +245,7 @@ void YTVideo::parseFmtUrlMap(const QString &fmtUrlMap) {
 
     qDebug() << "available formats" << urlMap.keys();
     const QVector<VideoDefinition> &definitions = VideoDefinition::getDefinitions();
-    int previousIndex = std::max(definitions.indexOf(definition) - 1, 0);
+    int previousIndex = std::max(definitions.indexOf(definition), 0);
     for (; previousIndex >= 0; previousIndex--) {
         const VideoDefinition &previousDefinition = definitions.at(previousIndex);
         qDebug() << "Testing format" << previousDefinition.getCode();