Hello community,

here is the log from the commit of package minitube for openSUSE:Factory 
checked in at 2020-06-12 21:40:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/minitube (Old)
 and      /work/SRC/openSUSE:Factory/.minitube.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "minitube"

Fri Jun 12 21:40:50 2020 rev:18 rq:813790 version:3.4.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/minitube/minitube.changes        2020-06-06 
23:39:39.220962790 +0200
+++ /work/SRC/openSUSE:Factory/.minitube.new.3606/minitube.changes      
2020-06-12 21:42:54.660259015 +0200
@@ -1,0 +2,11 @@
+Thu Jun 11 16:16:27 UTC 2020 - Carsten Ziepke <kiel...@gmail.com>
+
+- Update to version 3.4.2:
+  * esc closes about view
+- Drop minitube-fix_audio_playback.patch, fixed upstream
+  https://github.com/flaviotordini/minitube/issues/157
+- Drop 
minitube-fix-for-upstream-missing-qthelper.hpp-in-newer-mpv-version.patch,
+  fixed upstream
+  https://github.com/flaviotordini/minitube/issues/155
+
+-------------------------------------------------------------------

Old:
----
  minitube-3.4.tar.xz
  minitube-fix-for-upstream-missing-qthelper.hpp-in-newer-mpv-version.patch
  minitube-fix_audio_playback.patch

New:
----
  minitube-3.4.2.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ minitube.spec ++++++
--- /var/tmp/diff_new_pack.7Qm8ZC/_old  2020-06-12 21:42:58.836269510 +0200
+++ /var/tmp/diff_new_pack.7Qm8ZC/_new  2020-06-12 21:42:58.836269510 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           minitube
-Version:        3.4
+Version:        3.4.2
 Release:        0
 Summary:        Native YouTube Client
 License:        GPL-3.0-or-later
@@ -28,10 +28,6 @@
 Source1:        minitube.1
 # PATCH-FIX-OPENSUSE minitube-no-update-check.patch su...@sur5r.net -- Disable 
update check.
 Patch0:         %{name}-no-update-check.patch
-# PATCH-FIX-UPSTREAM 
minitube-fix-for-upstream-missing-qthelper.hpp-in-newer-mpv-version.patch- 
gh#flaviotordini/minitube/#157
-Patch1:         
%{name}-fix-for-upstream-missing-qthelper.hpp-in-newer-mpv-version.patch
-# PATCH-FIX-UPSTREAM minitube-fix_audio_playback.patch - 
gh#flaviotordini/minitube/#155
-Patch2:  %{name}-fix_audio_playback.patch
 BuildRequires:  fdupes
 BuildRequires:  hicolor-icon-theme
 BuildRequires:  libqt5-linguist
@@ -62,8 +58,6 @@
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
-%patch2 -p1
 
 # Remove build time references so build-compare can do its work
 FAKE_BUILDDATE="$(LC_ALL=C date -u -d "@${SOURCE_DATE_EPOCH}" '+%%b %%e %%Y')"

++++++ _service ++++++
--- /var/tmp/diff_new_pack.7Qm8ZC/_old  2020-06-12 21:42:58.880269621 +0200
+++ /var/tmp/diff_new_pack.7Qm8ZC/_new  2020-06-12 21:42:58.884269630 +0200
@@ -4,7 +4,7 @@
     <param name="url">https://github.com/flaviotordini/minitube.git</param>
     <param name="filename">minitube</param>
     <param name="versionformat">@PARENT_TAG@</param>
-    <param name="revision">3.4</param>
+    <param name="revision">3.4.2</param>
   </service>
   <service mode="disabled" name="recompress">
     <param name="file">*.tar</param>

++++++ minitube-3.4.tar.xz -> minitube-3.4.2.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/create_assets.sh 
new/minitube-3.4.2/create_assets.sh
--- old/minitube-3.4/create_assets.sh   2020-05-29 16:37:47.000000000 +0200
+++ new/minitube-3.4.2/create_assets.sh 2020-06-10 18:50:13.000000000 +0200
@@ -56,7 +56,7 @@
 
 compress_sources() {
   cd "${source_dir}"
-  tar cvfz "${package_name}-${version}.tar.bz2" \
+  tar -cjvf "${package_name}-${version}.tar.bz2" \
     "${package_name}-${version}"
 }
 
Binary files old/minitube-3.4/icons/dark/16/search-duration_active.png and 
new/minitube-3.4.2/icons/dark/16/search-duration_active.png differ
Binary files old/minitube-3.4/icons/dark/16/search-duration_act...@2x.png and 
new/minitube-3.4.2/icons/dark/16/search-duration_act...@2x.png differ
Binary files old/minitube-3.4/icons/dark/16/search-duration_disabled.png and 
new/minitube-3.4.2/icons/dark/16/search-duration_disabled.png differ
Binary files old/minitube-3.4/icons/dark/16/search-duration_disab...@2x.png and 
new/minitube-3.4.2/icons/dark/16/search-duration_disab...@2x.png differ
Binary files old/minitube-3.4/icons/dark/16/search-duration_normal.png and 
new/minitube-3.4.2/icons/dark/16/search-duration_normal.png differ
Binary files old/minitube-3.4/icons/dark/16/search-duration_nor...@2x.png and 
new/minitube-3.4.2/icons/dark/16/search-duration_nor...@2x.png differ
Binary files old/minitube-3.4/icons/dark/16/search-time_active.png and 
new/minitube-3.4.2/icons/dark/16/search-time_active.png differ
Binary files old/minitube-3.4/icons/dark/16/search-time_act...@2x.png and 
new/minitube-3.4.2/icons/dark/16/search-time_act...@2x.png differ
Binary files old/minitube-3.4/icons/dark/16/search-time_disabled.png and 
new/minitube-3.4.2/icons/dark/16/search-time_disabled.png differ
Binary files old/minitube-3.4/icons/dark/16/search-time_disab...@2x.png and 
new/minitube-3.4.2/icons/dark/16/search-time_disab...@2x.png differ
Binary files old/minitube-3.4/icons/dark/16/search-time_normal.png and 
new/minitube-3.4.2/icons/dark/16/search-time_normal.png differ
Binary files old/minitube-3.4/icons/dark/16/search-time_nor...@2x.png and 
new/minitube-3.4.2/icons/dark/16/search-time_nor...@2x.png differ
Binary files old/minitube-3.4/icons/light/16/search-duration_active.png and 
new/minitube-3.4.2/icons/light/16/search-duration_active.png differ
Binary files old/minitube-3.4/icons/light/16/search-duration_act...@2x.png and 
new/minitube-3.4.2/icons/light/16/search-duration_act...@2x.png differ
Binary files old/minitube-3.4/icons/light/16/search-duration_disabled.png and 
new/minitube-3.4.2/icons/light/16/search-duration_disabled.png differ
Binary files old/minitube-3.4/icons/light/16/search-duration_disab...@2x.png 
and new/minitube-3.4.2/icons/light/16/search-duration_disab...@2x.png differ
Binary files old/minitube-3.4/icons/light/16/search-duration_normal.png and 
new/minitube-3.4.2/icons/light/16/search-duration_normal.png differ
Binary files old/minitube-3.4/icons/light/16/search-duration_nor...@2x.png and 
new/minitube-3.4.2/icons/light/16/search-duration_nor...@2x.png differ
Binary files old/minitube-3.4/icons/light/16/search-time_active.png and 
new/minitube-3.4.2/icons/light/16/search-time_active.png differ
Binary files old/minitube-3.4/icons/light/16/search-time_act...@2x.png and 
new/minitube-3.4.2/icons/light/16/search-time_act...@2x.png differ
Binary files old/minitube-3.4/icons/light/16/search-time_disabled.png and 
new/minitube-3.4.2/icons/light/16/search-time_disabled.png differ
Binary files old/minitube-3.4/icons/light/16/search-time_disab...@2x.png and 
new/minitube-3.4.2/icons/light/16/search-time_disab...@2x.png differ
Binary files old/minitube-3.4/icons/light/16/search-time_normal.png and 
new/minitube-3.4.2/icons/light/16/search-time_normal.png differ
Binary files old/minitube-3.4/icons/light/16/search-time_nor...@2x.png and 
new/minitube-3.4.2/icons/light/16/search-time_nor...@2x.png differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/lib/media/src/mpv/mediampv.cpp 
new/minitube-3.4.2/lib/media/src/mpv/mediampv.cpp
--- old/minitube-3.4/lib/media/src/mpv/mediampv.cpp     2020-05-29 
16:37:47.000000000 +0200
+++ new/minitube-3.4.2/lib/media/src/mpv/mediampv.cpp   2020-06-10 
18:50:13.000000000 +0200
@@ -1,5 +1,6 @@
 #include "mediampv.h"
 
+#include "qthelper.hpp"
 #include <clocale>
 
 #ifndef MEDIA_AUDIOONLY
@@ -133,6 +134,14 @@
     }
 
     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;
 
@@ -257,12 +266,11 @@
     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();
 }
 
@@ -319,6 +327,8 @@
 }
 
 void MediaMPV::play(const QString &file) {
+    audioFileToAdd.clear();
+
     const QByteArray fileUtf8 = file.toUtf8();
     const char *args[] = {"loadfile", fileUtf8.constData(), nullptr};
     sendCommand(args);
@@ -365,6 +375,7 @@
 }
 
 void MediaMPV::enqueue(const QString &file) {
+    audioFileToAdd.clear();
     const QByteArray fileUtf8 = file.toUtf8();
     const char *args[] = {"loadfile", fileUtf8.constData(), "append", nullptr};
     sendCommand(args);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/lib/media/src/mpv/mediampv.h 
new/minitube-3.4.2/lib/media/src/mpv/mediampv.h
--- old/minitube-3.4/lib/media/src/mpv/mediampv.h       2020-05-29 
16:37:47.000000000 +0200
+++ new/minitube-3.4.2/lib/media/src/mpv/mediampv.h     2020-06-10 
18:50:13.000000000 +0200
@@ -59,6 +59,8 @@
     Media::State currentState = Media::StoppedState;
     bool aboutToFinishEmitted = false;
     QString lastErrorString;
+
+    QString audioFileToAdd;
 };
 
 #endif // MEDIAMPV_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/lib/media/src/mpv/mpvwidget.h 
new/minitube-3.4.2/lib/media/src/mpv/mpvwidget.h
--- old/minitube-3.4/lib/media/src/mpv/mpvwidget.h      2020-05-29 
16:37:47.000000000 +0200
+++ new/minitube-3.4.2/lib/media/src/mpv/mpvwidget.h    2020-06-10 
18:50:13.000000000 +0200
@@ -3,7 +3,6 @@
 
 #include <QtWidgets>
 #include <mpv/client.h>
-#include <mpv/qthelper.hpp>
 #include <mpv/render_gl.h>
 
 class MpvWidget Q_DECL_FINAL : public QOpenGLWidget {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/lib/media/src/mpv/qthelper.hpp 
new/minitube-3.4.2/lib/media/src/mpv/qthelper.hpp
--- old/minitube-3.4/lib/media/src/mpv/qthelper.hpp     1970-01-01 
01:00:00.000000000 +0100
+++ new/minitube-3.4.2/lib/media/src/mpv/qthelper.hpp   2020-06-10 
18:50:13.000000000 +0200
@@ -0,0 +1,386 @@
+/* Copyright (C) 2017 the mpv developers
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef MPV_CLIENT_API_QTHELPER_H_
+#define MPV_CLIENT_API_QTHELPER_H_
+
+#include <mpv/client.h>
+
+#if !MPV_ENABLE_DEPRECATED
+#error "This helper is deprecated. Copy it into your project instead."
+#else
+
+/**
+ * Note: these helpers are provided for convenience for C++/Qt applications.
+ * This is based on the public API in client.h, and it does not encode any
+ * knowledge that is not known or guaranteed outside of the C client API. You
+ * can even copy and modify this code as you like, or implement similar things
+ * for other languages.
+ */
+
+#include <cstring>
+
+#include <QVariant>
+#include <QString>
+#include <QList>
+#include <QHash>
+#include <QSharedPointer>
+#include <QMetaType>
+
+namespace mpv {
+namespace qt {
+
+// Wrapper around mpv_handle. Does refcounting under the hood.
+class Handle
+{
+    struct container {
+        container(mpv_handle *h) : mpv(h) {}
+        ~container() { mpv_terminate_destroy(mpv); }
+        mpv_handle *mpv;
+    };
+    QSharedPointer<container> sptr;
+public:
+    // Construct a new Handle from a raw mpv_handle with refcount 1. If the
+    // last Handle goes out of scope, the mpv_handle will be destroyed with
+    // mpv_terminate_destroy().
+    // Never destroy the mpv_handle manually when using this wrapper. You
+    // will create dangling pointers. Just let the wrapper take care of
+    // destroying the mpv_handle.
+    // Never create multiple wrappers from the same raw mpv_handle; copy the
+    // wrapper instead (that's what it's for).
+    static Handle FromRawHandle(mpv_handle *handle) {
+        Handle h;
+        h.sptr = QSharedPointer<container>(new container(handle));
+        return h;
+    }
+
+    // Return the raw handle; for use with the libmpv C API.
+    operator mpv_handle*() const { return sptr ? (*sptr).mpv : 0; }
+};
+
+static inline QVariant node_to_variant(const mpv_node *node)
+{
+    switch (node->format) {
+    case MPV_FORMAT_STRING:
+        return QVariant(QString::fromUtf8(node->u.string));
+    case MPV_FORMAT_FLAG:
+        return QVariant(static_cast<bool>(node->u.flag));
+    case MPV_FORMAT_INT64:
+        return QVariant(static_cast<qlonglong>(node->u.int64));
+    case MPV_FORMAT_DOUBLE:
+        return QVariant(node->u.double_);
+    case MPV_FORMAT_NODE_ARRAY: {
+        mpv_node_list *list = node->u.list;
+        QVariantList qlist;
+        for (int n = 0; n < list->num; n++)
+            qlist.append(node_to_variant(&list->values[n]));
+        return QVariant(qlist);
+    }
+    case MPV_FORMAT_NODE_MAP: {
+        mpv_node_list *list = node->u.list;
+        QVariantMap qmap;
+        for (int n = 0; n < list->num; n++) {
+            qmap.insert(QString::fromUtf8(list->keys[n]),
+                        node_to_variant(&list->values[n]));
+        }
+        return QVariant(qmap);
+    }
+    default: // MPV_FORMAT_NONE, unknown values (e.g. future extensions)
+        return QVariant();
+    }
+}
+
+struct node_builder {
+    node_builder(const QVariant& v) {
+        set(&node_, v);
+    }
+    ~node_builder() {
+        free_node(&node_);
+    }
+    mpv_node *node() { return &node_; }
+private:
+    Q_DISABLE_COPY(node_builder)
+    mpv_node node_;
+    mpv_node_list *create_list(mpv_node *dst, bool is_map, int num) {
+        dst->format = is_map ? MPV_FORMAT_NODE_MAP : MPV_FORMAT_NODE_ARRAY;
+        mpv_node_list *list = new mpv_node_list();
+        dst->u.list = list;
+        if (!list)
+            goto err;
+        list->values = new mpv_node[num]();
+        if (!list->values)
+            goto err;
+        if (is_map) {
+            list->keys = new char*[num]();
+            if (!list->keys)
+                goto err;
+        }
+        return list;
+    err:
+        free_node(dst);
+        return NULL;
+    }
+    char *dup_qstring(const QString &s) {
+        QByteArray b = s.toUtf8();
+        char *r = new char[b.size() + 1];
+        if (r)
+            std::memcpy(r, b.data(), b.size() + 1);
+        return r;
+    }
+    bool test_type(const QVariant &v, QMetaType::Type t) {
+        // The Qt docs say: "Although this function is declared as returning
+        // "QVariant::Type(obsolete), the return value should be interpreted
+        // as QMetaType::Type."
+        // So a cast really seems to be needed to avoid warnings (urgh).
+        return static_cast<int>(v.type()) == static_cast<int>(t);
+    }
+    void set(mpv_node *dst, const QVariant &src) {
+        if (test_type(src, QMetaType::QString)) {
+            dst->format = MPV_FORMAT_STRING;
+            dst->u.string = dup_qstring(src.toString());
+            if (!dst->u.string)
+                goto fail;
+        } else if (test_type(src, QMetaType::Bool)) {
+            dst->format = MPV_FORMAT_FLAG;
+            dst->u.flag = src.toBool() ? 1 : 0;
+        } else if (test_type(src, QMetaType::Int) ||
+                   test_type(src, QMetaType::LongLong) ||
+                   test_type(src, QMetaType::UInt) ||
+                   test_type(src, QMetaType::ULongLong))
+        {
+            dst->format = MPV_FORMAT_INT64;
+            dst->u.int64 = src.toLongLong();
+        } else if (test_type(src, QMetaType::Double)) {
+            dst->format = MPV_FORMAT_DOUBLE;
+            dst->u.double_ = src.toDouble();
+        } else if (src.canConvert<QVariantList>()) {
+            QVariantList qlist = src.toList();
+            mpv_node_list *list = create_list(dst, false, qlist.size());
+            if (!list)
+                goto fail;
+            list->num = qlist.size();
+            for (int n = 0; n < qlist.size(); n++)
+                set(&list->values[n], qlist[n]);
+        } else if (src.canConvert<QVariantMap>()) {
+            QVariantMap qmap = src.toMap();
+            mpv_node_list *list = create_list(dst, true, qmap.size());
+            if (!list)
+                goto fail;
+            list->num = qmap.size();
+            for (int n = 0; n < qmap.size(); n++) {
+                list->keys[n] = dup_qstring(qmap.keys()[n]);
+                if (!list->keys[n]) {
+                    free_node(dst);
+                    goto fail;
+                }
+                set(&list->values[n], qmap.values()[n]);
+            }
+        } else {
+            goto fail;
+        }
+        return;
+    fail:
+        dst->format = MPV_FORMAT_NONE;
+    }
+    void free_node(mpv_node *dst) {
+        switch (dst->format) {
+        case MPV_FORMAT_STRING:
+            delete[] dst->u.string;
+            break;
+        case MPV_FORMAT_NODE_ARRAY:
+        case MPV_FORMAT_NODE_MAP: {
+            mpv_node_list *list = dst->u.list;
+            if (list) {
+                for (int n = 0; n < list->num; n++) {
+                    if (list->keys)
+                        delete[] list->keys[n];
+                    if (list->values)
+                        free_node(&list->values[n]);
+                }
+                delete[] list->keys;
+                delete[] list->values;
+            }
+            delete list;
+            break;
+        }
+        default: ;
+        }
+        dst->format = MPV_FORMAT_NONE;
+    }
+};
+
+/**
+ * RAII wrapper that calls mpv_free_node_contents() on the pointer.
+ */
+struct node_autofree {
+    mpv_node *ptr;
+    node_autofree(mpv_node *a_ptr) : ptr(a_ptr) {}
+    ~node_autofree() { mpv_free_node_contents(ptr); }
+};
+
+#if MPV_ENABLE_DEPRECATED
+
+/**
+ * Return the given property as mpv_node converted to QVariant, or QVariant()
+ * on error.
+ *
+ * @deprecated use get_property() instead
+ *
+ * @param name the property name
+ */
+static inline QVariant get_property_variant(mpv_handle *ctx, const QString 
&name)
+{
+    mpv_node node;
+    if (mpv_get_property(ctx, name.toUtf8().data(), MPV_FORMAT_NODE, &node) < 
0)
+        return QVariant();
+    node_autofree f(&node);
+    return node_to_variant(&node);
+}
+
+/**
+ * Set the given property as mpv_node converted from the QVariant argument.
+
+ * @deprecated use set_property() instead
+ */
+static inline int set_property_variant(mpv_handle *ctx, const QString &name,
+                                       const QVariant &v)
+{
+    node_builder node(v);
+    return mpv_set_property(ctx, name.toUtf8().data(), MPV_FORMAT_NODE, 
node.node());
+}
+
+/**
+ * Set the given option as mpv_node converted from the QVariant argument.
+ *
+ * @deprecated use set_property() instead
+ */
+static inline int set_option_variant(mpv_handle *ctx, const QString &name,
+                                     const QVariant &v)
+{
+    node_builder node(v);
+    return mpv_set_option(ctx, name.toUtf8().data(), MPV_FORMAT_NODE, 
node.node());
+}
+
+/**
+ * mpv_command_node() equivalent. Returns QVariant() on error (and
+ * unfortunately, the same on success).
+ *
+ * @deprecated use command() instead
+ */
+static inline QVariant command_variant(mpv_handle *ctx, const QVariant &args)
+{
+    node_builder node(args);
+    mpv_node res;
+    if (mpv_command_node(ctx, node.node(), &res) < 0)
+        return QVariant();
+    node_autofree f(&res);
+    return node_to_variant(&res);
+}
+
+#endif
+
+/**
+ * This is used to return error codes wrapped in QVariant for functions which
+ * return QVariant.
+ *
+ * You can use get_error() or is_error() to extract the error status from a
+ * QVariant value.
+ */
+struct ErrorReturn
+{
+    /**
+     * enum mpv_error value (or a value outside of it if ABI was extended)
+     */
+    int error;
+
+    ErrorReturn() : error(0) {}
+    explicit ErrorReturn(int err) : error(err) {}
+};
+
+/**
+ * Return the mpv error code packed into a QVariant, or 0 (success) if it's not
+ * an error value.
+ *
+ * @return error code (<0) or success (>=0)
+ */
+static inline int get_error(const QVariant &v)
+{
+    if (!v.canConvert<ErrorReturn>())
+        return 0;
+    return v.value<ErrorReturn>().error;
+}
+
+/**
+ * Return whether the QVariant carries a mpv error code.
+ */
+static inline bool is_error(const QVariant &v)
+{
+    return get_error(v) < 0;
+}
+
+/**
+ * Return the given property as mpv_node converted to QVariant, or QVariant()
+ * on error.
+ *
+ * @param name the property name
+ * @return the property value, or an ErrorReturn with the error code
+ */
+static inline QVariant get_property(mpv_handle *ctx, const QString &name)
+{
+    mpv_node node;
+    int err = mpv_get_property(ctx, name.toUtf8().data(), MPV_FORMAT_NODE, 
&node);
+    if (err < 0)
+        return QVariant::fromValue(ErrorReturn(err));
+    node_autofree f(&node);
+    return node_to_variant(&node);
+}
+
+/**
+ * Set the given property as mpv_node converted from the QVariant argument.
+ *
+ * @return mpv error code (<0 on error, >= 0 on success)
+ */
+static inline int set_property(mpv_handle *ctx, const QString &name,
+                                       const QVariant &v)
+{
+    node_builder node(v);
+    return mpv_set_property(ctx, name.toUtf8().data(), MPV_FORMAT_NODE, 
node.node());
+}
+
+/**
+ * mpv_command_node() equivalent.
+ *
+ * @param args command arguments, with args[0] being the command name as string
+ * @return the property value, or an ErrorReturn with the error code
+ */
+static inline QVariant command(mpv_handle *ctx, const QVariant &args)
+{
+    node_builder node(args);
+    mpv_node res;
+    int err = mpv_command_node(ctx, node.node(), &res);
+    if (err < 0)
+        return QVariant::fromValue(ErrorReturn(err));
+    node_autofree f(&res);
+    return node_to_variant(&res);
+}
+
+}
+}
+
+Q_DECLARE_METATYPE(mpv::qt::ErrorReturn)
+
+#endif /* else #if MPV_ENABLE_DEPRECATED */
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/minitube.pro 
new/minitube-3.4.2/minitube.pro
--- old/minitube-3.4/minitube.pro       2020-05-29 16:37:47.000000000 +0200
+++ new/minitube-3.4.2/minitube.pro     2020-06-10 18:50:13.000000000 +0200
@@ -1,7 +1,7 @@
 CONFIG += c++14 exceptions_off rtti_off optimize_full
 
 TEMPLATE = app
-VERSION = 3.4
+VERSION = 3.4.2
 DEFINES += APP_VERSION="$$VERSION"
 
 APP_NAME = Minitube
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/src/aboutview.cpp 
new/minitube-3.4.2/src/aboutview.cpp
--- old/minitube-3.4/src/aboutview.cpp  2020-05-29 16:37:47.000000000 +0200
+++ new/minitube-3.4.2/src/aboutview.cpp        2020-06-10 18:50:13.000000000 
+0200
@@ -150,8 +150,8 @@
     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);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/src/appwidget.cpp 
new/minitube-3.4.2/src/appwidget.cpp
--- old/minitube-3.4/src/appwidget.cpp  2020-05-29 16:37:47.000000000 +0200
+++ new/minitube-3.4.2/src/appwidget.cpp        2020-06-10 18:50:13.000000000 
+0200
@@ -21,7 +21,9 @@
     const QString ext = "deb";
 #endif
 
+#ifdef APP_MAC
     setupApp("Sofa", "sofa." + ext);
+#endif
     setupApp("Finetune", "finetune." + ext);
     setupApp("Musictube", "musictube." + ext);
     setupApp("Musique", "musique." + ext);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/src/channelview.cpp 
new/minitube-3.4.2/src/channelview.cpp
--- old/minitube-3.4/src/channelview.cpp        2020-05-29 16:37:47.000000000 
+0200
+++ new/minitube-3.4.2/src/channelview.cpp      2020-06-10 18:50:13.000000000 
+0200
@@ -150,7 +150,7 @@
 }
 
 void ChannelView::appear() {
-    updateQuery();
+    updateQuery(true);
     MainWindow::instance()->showActionsInStatusBar(statusActions, true);
     setFocus();
     ChannelAggregator::instance()->start();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/src/iconutils.cpp 
new/minitube-3.4.2/src/iconutils.cpp
--- old/minitube-3.4/src/iconutils.cpp  2020-05-29 16:37:47.000000000 +0200
+++ new/minitube-3.4.2/src/iconutils.cpp        2020-06-10 18:50:13.000000000 
+0200
@@ -33,8 +33,15 @@
         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 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;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/src/iconutils.h 
new/minitube-3.4.2/src/iconutils.h
--- old/minitube-3.4/src/iconutils.h    2020-05-29 16:37:47.000000000 +0200
+++ new/minitube-3.4.2/src/iconutils.h  2020-06-10 18:50:13.000000000 +0200
@@ -25,6 +25,8 @@
 
 class IconUtils {
 public:
+    static void setSizes(const QVector<int> &value);
+
     static QIcon fromTheme(const QString &name);
     static QIcon fromResources(const char *name);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/src/main.cpp 
new/minitube-3.4.2/src/main.cpp
--- old/minitube-3.4/src/main.cpp       2020-05-29 16:37:47.000000000 +0200
+++ new/minitube-3.4.2/src/main.cpp     2020-06-10 18:50:13.000000000 +0200
@@ -138,6 +138,8 @@
 
     QNetworkProxyFactory::setUseSystemConfiguration(true);
 
+    IconUtils::setSizes({16, 24, 32, 88});
+
     showWindow(app, pkgDataDir);
 
     return app.exec();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/src/mainwindow.cpp 
new/minitube-3.4.2/src/mainwindow.cpp
--- old/minitube-3.4/src/mainwindow.cpp 2020-05-29 16:37:47.000000000 +0200
+++ new/minitube-3.4.2/src/mainwindow.cpp       2020-06-10 18:50:13.000000000 
+0200
@@ -157,7 +157,7 @@
     showHome();
 #endif
 
-    QTimer::singleShot(1000, this, &MainWindow::lazyInit);
+    QTimer::singleShot(100, this, &MainWindow::lazyInit);
 }
 
 void MainWindow::lazyInit() {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/minitube-3.4/src/ytvideo.cpp 
new/minitube-3.4.2/src/ytvideo.cpp
--- old/minitube-3.4/src/ytvideo.cpp    2020-05-29 16:37:47.000000000 +0200
+++ new/minitube-3.4.2/src/ytvideo.cpp  2020-06-10 18:50:13.000000000 +0200
@@ -245,7 +245,7 @@
 
     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();


Reply via email to