Hello community, here is the log from the commit of package minitube for openSUSE:Factory checked in at 2019-06-17 10:35:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/minitube (Old) and /work/SRC/openSUSE:Factory/.minitube.new.4811 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "minitube" Mon Jun 17 10:35:26 2019 rev:13 rq:710288 version:3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/minitube/minitube.changes 2019-05-22 11:11:34.586592327 +0200 +++ /work/SRC/openSUSE:Factory/.minitube.new.4811/minitube.changes 2019-06-17 10:35:28.249200295 +0200 @@ -1,0 +2,7 @@ +Sun Jun 16 19:58:02 UTC 2019 - Carsten Ziepke <kiel...@gmail.com> + +- Update to version 3.1: + * Fixes some videos skipping. + * Bug fix for audio playback not resuming after long pauses. + +------------------------------------------------------------------- Old: ---- minitube-3.0.tar.xz New: ---- minitube-3.1.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ minitube.spec ++++++ --- /var/tmp/diff_new_pack.2dpZ7J/_old 2019-06-17 10:35:28.809200015 +0200 +++ /var/tmp/diff_new_pack.2dpZ7J/_new 2019-06-17 10:35:28.813200013 +0200 @@ -17,7 +17,7 @@ Name: minitube -Version: 3.0 +Version: 3.1 Release: 0 Summary: Native YouTube Client License: GPL-3.0-or-later ++++++ _service ++++++ --- /var/tmp/diff_new_pack.2dpZ7J/_old 2019-06-17 10:35:28.849199995 +0200 +++ /var/tmp/diff_new_pack.2dpZ7J/_new 2019-06-17 10:35:28.849199995 +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.0</param> + <param name="revision">3.1</param> </service> <service mode="disabled" name="recompress"> <param name="file">*.tar</param> ++++++ minitube-3.0.tar.xz -> minitube-3.1.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/README.md new/minitube-3.1/README.md --- old/minitube-3.0/README.md 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/README.md 2019-06-14 15:06:12.000000000 +0200 @@ -21,7 +21,7 @@ git clone --recursive https://github.com/flaviotordini/minitube.git -You need at least Qt 5.6. The following Qt modules are needed: core, gui, widgets, network, sql (using the Sqlite plugin), declarative, dbus, x11extras. +You need Qt >= 5.6 and MPV >= 0.29.0. The following Qt modules are needed: core, gui, widgets, network, sql (using the Sqlite plugin), declarative, dbus, x11extras. To be able to build on a Debian (or derivative) system: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/create_assets.sh new/minitube-3.1/create_assets.sh --- old/minitube-3.0/create_assets.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/minitube-3.1/create_assets.sh 2019-06-14 15:06:12.000000000 +0200 @@ -0,0 +1,124 @@ +#!/usr/bin/env bash +# +# Copyright 2019, David Runge +# +# 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 <https://www.gnu.org/licenses/>. +# +# Creates assets for $upstream in the form of +# ${package_name}-$version.tar.bz2' and moves the file to the current working +# directory (aka. $(pwd)). +# Optionally creates a detached PGP signature for the tarball. +# Requires a writable /tmp folder. + +set -euo pipefail + +get_absolute_path() { + cd "$(dirname "$0")" && pwd -P +} + +remove_source_dir() { + rm -rf "${source_dir:?}/${package_name}"* +} + +checkout_project() { + remove_source_dir + cd "${source_dir}" + git clone "$upstream" --recursive + cd "${package_name}" + git checkout "${version}" +} + +clean_sources() { + cd "${source_dir}/${package_name}" + rm -rfv .gitignore \ + .gitmodules \ + .clang-format \ + .travis.yml \ + .git/ \ + create_assets.sh +} + +rename_sources() { + cd "${source_dir}" + mv -v "${package_name}" "${package_name}-${version}" +} + +compress_sources() { + cd "${source_dir}" + tar cvfz "${package_name}-${version}.tar.bz2" \ + "${package_name}-${version}" +} + +move_sources() { + cd "${source_dir}" + mv -v "${package_name}-${version}.tar.bz2" "${output_dir}/" +} + +sign_sources() { + cd "${output_dir}" + gpg2 --default-key "${signer}" \ + --output "${package_name}-${version}.tar.bz2.asc" \ + --detach-sign "${package_name}-${version}.tar.bz2" +} + +cleanup_source_dir() { + cd "${source_dir}" + rm -rf "${package_name}-${version}" +} + +print_help() { + echo "Usage: $0 -v <version tag> -s <signature email>" + exit 1 +} + +upstream="https://github.com/flaviotordini/minitube" +package_name="minitube" +source_dir="/tmp" +version=$(date "+%Y-%m-%d") +signer="" +output_dir=$(get_absolute_path "$0") + + +if [ ${#@} -gt 0 ]; then + while getopts 'hv:s:' flag; do + case "${flag}" in + h) print_help + ;; + s) signer=$OPTARG + ;; + v) version=$OPTARG + ;; + *) + echo "Error! Try '${0} -h'." + exit 1 + ;; + esac + done +else + print_help +fi + +checkout_project +clean_sources +rename_sources +compress_sources +move_sources +if [ -n "${signer}" ]; then + sign_sources +fi +cleanup_source_dir + +exit 0 + +# vim:set ts=2 sw=2 et: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/lib/media/README.md new/minitube-3.1/lib/media/README.md --- old/minitube-3.0/lib/media/README.md 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/lib/media/README.md 2019-06-14 15:06:12.000000000 +0200 @@ -1,7 +1,9 @@ # Qt Media Library Abstraction -This is a simple wrapper around a multimedia playback library. It currently wraps only QtAV. +This is a simple wrapper around a multimedia playback library. -Defining `MEDIA_QTAV` is required. `MEDIA_AUDIOONLY` can be defined if the application does not need video. +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. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/lib/media/src/mpv/mediampv.cpp new/minitube-3.1/lib/media/src/mpv/mediampv.cpp --- old/minitube-3.0/lib/media/src/mpv/mediampv.cpp 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/lib/media/src/mpv/mediampv.cpp 2019-06-14 15:06:12.000000000 +0200 @@ -112,6 +112,7 @@ // qDebug() << event->data; switch (event->event_id) { case MPV_EVENT_START_FILE: + clearTrackState(); emit sourceChanged(); setState(Media::LoadingState); break; @@ -212,8 +213,6 @@ void MediaMPV::clearTrackState() { lastErrorString.clear(); aboutToFinishEmitted = false; - - if (currentState == Media::PausedState) play(); } void MediaMPV::setAudioOnly(bool value) { @@ -305,6 +304,7 @@ sendCommand(args); clearTrackState(); + if (currentState == Media::PausedState) play(); } void MediaMPV::play() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/locale/ca.ts new/minitube-3.1/locale/ca.ts --- old/minitube-3.0/locale/ca.ts 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/locale/ca.ts 2019-06-14 15:06:12.000000000 +0200 @@ -27,11 +27,11 @@ </message> <message> <source>Powered by %1</source> - <translation type="unfinished"/> + <translation>Creat per %1</translation> </message> <message> <source>Open-source software</source> - <translation type="unfinished"/> + <translation>Programari de codi obert</translation> </message> <message> <source>Icon designed by %1.</source> @@ -115,7 +115,7 @@ </message> <message numerus="yes"> <source>You have %n new video(s)</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>Teniu %n vídeo(s) nou(s)</numerusform><numerusform>Teniu %n vídeos nous</numerusform></translation> </message> </context> <context> @@ -196,15 +196,15 @@ </message> <message numerus="yes"> <source>%n hour(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>fa %n hores</numerusform><numerusform>fa %n hores</numerusform></translation> </message> <message numerus="yes"> <source>%n day(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>fa %n dies</numerusform><numerusform>fa %n dies</numerusform></translation> </message> <message numerus="yes"> <source>%n month(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>fa %n mesos</numerusform><numerusform>fa %n mesos</numerusform></translation> </message> <message> <source>K</source> @@ -227,7 +227,7 @@ </message> <message numerus="yes"> <source>%n week(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>fa %n setmanes</numerusform><numerusform>fa %n setmanes</numerusform></translation> </message> </context> <context> @@ -281,7 +281,7 @@ </message> <message numerus="yes"> <source>%n Download(s)</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>%n baixades</numerusform><numerusform>%n baixades</numerusform></translation> </message> </context> <context> @@ -678,7 +678,7 @@ </message> <message> <source>Menu</source> - <translation type="unfinished"/> + <translation>Menú</translation> </message> <message> <source>&Love %1? Rate it!</source> @@ -856,7 +856,7 @@ </message> <message> <source>Switched to %1</source> - <translation type="unfinished"/> + <translation>S'ha canviat a %1</translation> </message> <message> <source>Unsubscribed from %1</source> @@ -905,7 +905,7 @@ <name>PickMessage</name> <message> <source>Pick a video</source> - <translation type="unfinished"/> + <translation>Trieu un vídeo</translation> </message> </context> <context> @@ -1102,7 +1102,7 @@ </message> <message> <source>&Forward</source> - <translation type="unfinished"/> + <translation>E&ndavant</translation> </message> <message> <source>Forward to %1</source> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/locale/es.ts new/minitube-3.1/locale/es.ts --- old/minitube-3.0/locale/es.ts 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/locale/es.ts 2019-06-14 15:06:12.000000000 +0200 @@ -678,7 +678,7 @@ </message> <message> <source>Menu</source> - <translation type="unfinished"/> + <translation>Menú</translation> </message> <message> <source>&Love %1? Rate it!</source> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/locale/fr.ts new/minitube-3.1/locale/fr.ts --- old/minitube-3.0/locale/fr.ts 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/locale/fr.ts 2019-06-14 15:06:12.000000000 +0200 @@ -674,7 +674,7 @@ </message> <message> <source>Toggle &Menu Bar</source> - <translation type="unfinished"/> + <translation>Bascule la barre de &Menu</translation> </message> <message> <source>Menu</source> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/locale/ja_JP.ts new/minitube-3.1/locale/ja_JP.ts --- old/minitube-3.0/locale/ja_JP.ts 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/locale/ja_JP.ts 2019-06-14 15:06:12.000000000 +0200 @@ -104,7 +104,7 @@ <name>AppWidget</name> <message> <source>Download</source> - <translation type="unfinished"/> + <translation>ダウンロード</translation> </message> </context> <context> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/locale/ms_MY.ts new/minitube-3.1/locale/ms_MY.ts --- old/minitube-3.0/locale/ms_MY.ts 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/locale/ms_MY.ts 2019-06-14 15:06:12.000000000 +0200 @@ -27,11 +27,11 @@ </message> <message> <source>Powered by %1</source> - <translation type="unfinished"/> + <translation>Diperkasakan oleh %1</translation> </message> <message> <source>Open-source software</source> - <translation type="unfinished"/> + <translation>Perisian sumber-terbuka</translation> </message> <message> <source>Icon designed by %1.</source> @@ -115,7 +115,7 @@ </message> <message numerus="yes"> <source>You have %n new video(s)</source> - <translation type="unfinished"><numerusform></numerusform></translation> + <translation><numerusform>Anda mempunyai %n video baharu</numerusform></translation> </message> </context> <context> @@ -196,30 +196,30 @@ </message> <message numerus="yes"> <source>%n hour(s) ago</source> - <translation type="unfinished"><numerusform></numerusform></translation> + <translation><numerusform>%n jam yang lalu</numerusform></translation> </message> <message numerus="yes"> <source>%n day(s) ago</source> - <translation type="unfinished"><numerusform></numerusform></translation> + <translation><numerusform>%n hari yang lalu</numerusform></translation> </message> <message numerus="yes"> <source>%n month(s) ago</source> - <translation type="unfinished"><numerusform></numerusform></translation> + <translation><numerusform>%n bulan yang lalu</numerusform></translation> </message> <message> <source>K</source> <comment>K as in Kilo, i.e. thousands</comment> - <translation type="unfinished"/> + <translation>K</translation> </message> <message> <source>M</source> <comment>M stands for Millions</comment> - <translation type="unfinished"/> + <translation>M</translation> </message> <message> <source>B</source> <comment>B stands for Billions</comment> - <translation type="unfinished"/> + <translation>B</translation> </message> <message> <source>%1 views</source> @@ -227,7 +227,7 @@ </message> <message numerus="yes"> <source>%n week(s) ago</source> - <translation type="unfinished"><numerusform></numerusform></translation> + <translation><numerusform>%n minggu yang lalu</numerusform></translation> </message> </context> <context> @@ -281,7 +281,7 @@ </message> <message numerus="yes"> <source>%n Download(s)</source> - <translation type="unfinished"><numerusform></numerusform></translation> + <translation><numerusform>%n Muat Turun</numerusform></translation> </message> </context> <context> @@ -856,7 +856,7 @@ </message> <message> <source>Switched to %1</source> - <translation type="unfinished"/> + <translation>Beralih ke %1</translation> </message> <message> <source>Unsubscribed from %1</source> @@ -905,7 +905,7 @@ <name>PickMessage</name> <message> <source>Pick a video</source> - <translation type="unfinished"/> + <translation>Pilih satu video</translation> </message> </context> <context> @@ -1102,7 +1102,7 @@ </message> <message> <source>&Forward</source> - <translation type="unfinished"/> + <translation>&Maju</translation> </message> <message> <source>Forward to %1</source> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/locale/nl.ts new/minitube-3.1/locale/nl.ts --- old/minitube-3.0/locale/nl.ts 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/locale/nl.ts 2019-06-14 15:06:12.000000000 +0200 @@ -104,7 +104,7 @@ <name>AppWidget</name> <message> <source>Download</source> - <translation type="unfinished"/> + <translation>Downloaden</translation> </message> </context> <context> @@ -318,11 +318,11 @@ <name>Extra</name> <message> <source>The executable file has been tempered with, maybe by a virus.</source> - <translation type="unfinished"/> + <translation>Het uitvoerbare bestand is aangepast, misschien door een virus.</translation> </message> <message> <source>%1 will not run. Try installing again.</source> - <translation type="unfinished"/> + <translation>%1 kan niet starten. Probeer opnieuw te installeren.</translation> </message> <message> <source>Quit</source> @@ -674,11 +674,11 @@ </message> <message> <source>Toggle &Menu Bar</source> - <translation type="unfinished"/> + <translation>&Menubalk weergeven/verbergen</translation> </message> <message> <source>Menu</source> - <translation type="unfinished"/> + <translation>Menu</translation> </message> <message> <source>&Love %1? Rate it!</source> @@ -806,7 +806,7 @@ </message> <message> <source>You can still access the menu bar by pressing the ALT key</source> - <translation type="unfinished"/> + <translation>U kunt de menubalk nog steeds benaderen door op ALT te drukken</translation> </message> </context> <context> @@ -1154,7 +1154,7 @@ </message> <message> <source>Downloading %1...</source> - <translation type="unfinished"/> + <translation>Downloaden van %1...</translation> </message> </context> <context> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/locale/tr.ts new/minitube-3.1/locale/tr.ts --- old/minitube-3.0/locale/tr.ts 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/locale/tr.ts 2019-06-14 15:06:12.000000000 +0200 @@ -27,11 +27,11 @@ </message> <message> <source>Powered by %1</source> - <translation type="unfinished"/> + <translation>% 1 tarafından desteklenmektedir</translation> </message> <message> <source>Open-source software</source> - <translation type="unfinished"/> + <translation>Açık kaynaklı yazılım</translation> </message> <message> <source>Icon designed by %1.</source> @@ -115,7 +115,7 @@ </message> <message numerus="yes"> <source>You have %n new video(s)</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>%n yeni videonuz var</numerusform><numerusform>%n yeni videonuz var</numerusform></translation> </message> </context> <context> @@ -196,30 +196,30 @@ </message> <message numerus="yes"> <source>%n hour(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>&n saat önce</numerusform><numerusform>&n saat önce</numerusform></translation> </message> <message numerus="yes"> <source>%n day(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>&n gün önce</numerusform><numerusform>&n gün önce</numerusform></translation> </message> <message numerus="yes"> <source>%n month(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>&n ay önce</numerusform><numerusform>&n ay önce</numerusform></translation> </message> <message> <source>K</source> <comment>K as in Kilo, i.e. thousands</comment> - <translation type="unfinished"/> + <translation>K</translation> </message> <message> <source>M</source> <comment>M stands for Millions</comment> - <translation type="unfinished"/> + <translation>M</translation> </message> <message> <source>B</source> <comment>B stands for Billions</comment> - <translation type="unfinished"/> + <translation>B</translation> </message> <message> <source>%1 views</source> @@ -227,7 +227,7 @@ </message> <message numerus="yes"> <source>%n week(s) ago</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>&n hafta önce</numerusform><numerusform>&n hafta önce</numerusform></translation> </message> </context> <context> @@ -281,7 +281,7 @@ </message> <message numerus="yes"> <source>%n Download(s)</source> - <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> + <translation><numerusform>&n İndirme</numerusform><numerusform>&n İndirme</numerusform></translation> </message> </context> <context> @@ -426,11 +426,11 @@ <name>MainWindow</name> <message> <source>&Window</source> - <translation>Pencere</translation> + <translation>&Pencere</translation> </message> <message> <source>&Minimize</source> - <translation>Küçült</translation> + <translation>&Küçült</translation> </message> <message> <source>&Stop</source> @@ -674,11 +674,11 @@ </message> <message> <source>Toggle &Menu Bar</source> - <translation type="unfinished"/> + <translation>&Menü Çubuğunu Aç/Kapat</translation> </message> <message> <source>Menu</source> - <translation type="unfinished"/> + <translation>Menü</translation> </message> <message> <source>&Love %1? Rate it!</source> @@ -806,7 +806,7 @@ </message> <message> <source>You can still access the menu bar by pressing the ALT key</source> - <translation type="unfinished"/> + <translation>ALT tuşuna basarak hala menü çubuğuna erişebilirsiniz</translation> </message> </context> <context> @@ -856,7 +856,7 @@ </message> <message> <source>Switched to %1</source> - <translation type="unfinished"/> + <translation>% 1 olarak değiştirildi</translation> </message> <message> <source>Unsubscribed from %1</source> @@ -905,7 +905,7 @@ <name>PickMessage</name> <message> <source>Pick a video</source> - <translation type="unfinished"/> + <translation>Bir video seç</translation> </message> </context> <context> @@ -1102,7 +1102,7 @@ </message> <message> <source>&Forward</source> - <translation type="unfinished"/> + <translation>&İleri</translation> </message> <message> <source>Forward to %1</source> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/locale/uk.ts new/minitube-3.1/locale/uk.ts --- old/minitube-3.0/locale/uk.ts 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/locale/uk.ts 2019-06-14 15:06:12.000000000 +0200 @@ -906,7 +906,7 @@ <name>PickMessage</name> <message> <source>Pick a video</source> - <translation type="unfinished"/> + <translation>Вибрати відео</translation> </message> </context> <context> @@ -1103,7 +1103,7 @@ </message> <message> <source>&Forward</source> - <translation type="unfinished"/> + <translation>&Вперед</translation> </message> <message> <source>Forward to %1</source> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/minitube.pro new/minitube-3.1/minitube.pro --- old/minitube-3.0/minitube.pro 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/minitube.pro 2019-06-14 15:06:12.000000000 +0200 @@ -1,7 +1,7 @@ CONFIG += c++14 exceptions_off rtti_off optimize_full TEMPLATE = app -VERSION = 3.0 +VERSION = 3.1 DEFINES += APP_VERSION="$$VERSION" APP_NAME = Minitube diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/src/mainwindow.cpp new/minitube-3.1/src/mainwindow.cpp --- old/minitube-3.0/src/mainwindow.cpp 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/src/mainwindow.cpp 2019-06-14 15:06:12.000000000 +0200 @@ -565,7 +565,7 @@ action->setEnabled(false); connect(action, SIGNAL(triggered()), mediaView, SLOT(toggleSubscription())); actionMap.insert("subscribeChannel", action); - mediaView->updateSubscriptionAction(0, false); + mediaView->updateSubscriptionActionForVideo(0, false); QString shareTip = tr("Share the current video using %1"); @@ -990,7 +990,7 @@ if (!geometrySettings.isEmpty()) { restoreGeometry(geometrySettings); } else { - const QRect desktopSize = qApp->desktop()->availableGeometry(); + const QRect desktopSize = QGuiApplication::primaryScreen()->availableGeometry(); int w = desktopSize.width() * .9; int h = qMin(w / 2, desktopSize.height()); setGeometry( @@ -1121,6 +1121,7 @@ ChannelAggregator::instance()->stop(); ChannelAggregator::instance()->cleanup(); Database::shutdown(); + HttpUtils::clearCaches(); qApp->quit(); } @@ -1808,14 +1809,12 @@ QSettings settings; QString checkedVersion = settings.value("checkedVersion").toString(); if (checkedVersion == version) return; -#ifdef APP_EXTRA -#ifndef APP_MAC +#ifdef APP_SIMPLEUPDATE + simpleUpdateDialog(version); +#elif defined(APP_EXTRA) && !defined(APP_MAC) UpdateDialog *dialog = new UpdateDialog(version, this); dialog->show(); #endif -#else - simpleUpdateDialog(version); -#endif }); updateChecker->checkForUpdate(); settings.setValue(updateCheckKey, unixTime); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/src/mediaview.cpp new/minitube-3.1/src/mediaview.cpp --- old/minitube-3.0/src/mediaview.cpp 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/src/mediaview.cpp 2019-06-14 15:06:12.000000000 +0200 @@ -204,6 +204,13 @@ // qDebug() << "Adding VideoSource" << videoSource->getName() << videoSource; + YTSearch * ytSearch = qobject_cast<YTSearch *>(videoSource); + if (nullptr != ytSearch) { + if (!ytSearch->getSearchParams()->channelId().isEmpty()) { + updateSubscriptionActionForChannel(ytSearch->getSearchParams()->channelId()); + } + } + if (addToHistory) { int currentIndex = getHistoryIndex(); if (currentIndex >= 0 && currentIndex < history.size() - 1) { @@ -361,7 +368,7 @@ playlistView->selectionModel()->clearSelection(); MainWindow::instance()->getAction("refineSearch")->setChecked(false); - updateSubscriptionAction(nullptr, false); + updateSubscriptionActionForVideo(nullptr, false); #ifdef APP_ACTIVATION demoTimer->stop(); #endif @@ -438,7 +445,7 @@ a->setEnabled(enableDownload); a->setVisible(enableDownload); - updateSubscriptionAction(video, YTChannel::isSubscribed(video->getChannelId())); + updateSubscriptionActionForVideo(video, YTChannel::isSubscribed(video->getChannelId())); for (QAction *action : currentVideoActions) action->setEnabled(true); @@ -763,9 +770,16 @@ videoAreaWidget->showFullScreen(); } -void MediaView::resumeWithNewStreamUrl(const QUrl &streamUrl) { +void MediaView::resumeWithNewStreamUrl(const QString &streamUrl, const QString &audioUrl) { pauseTime = media->position(); - media->play(streamUrl.toString()); + + if (audioUrl.isEmpty()) { + qDebug() << "Playing" << streamUrl; + media->play(streamUrl); + } else { + qDebug() << "Playing" << streamUrl << audioUrl; + media->playSeparateAudioAndVideo(streamUrl, audioUrl); + } Video *video = static_cast<Video *>(sender()); if (!video) { @@ -893,20 +907,22 @@ search(searchParams); } -void MediaView::updateSubscriptionAction(Video *video, bool subscribed) { + +void MediaView::updateSubscriptionAction(bool subscribed) { QAction *subscribeAction = MainWindow::instance()->getAction("subscribeChannel"); QString subscribeTip; QString subscribeText; - if (!video) { + + if (currentSubscriptionChannelId.isEmpty()) { subscribeText = subscribeAction->property("originalText").toString(); subscribeAction->setEnabled(false); } else if (subscribed) { - subscribeText = tr("Unsubscribe from %1").arg(video->getChannelTitle()); + subscribeText = tr("Unsubscribe from %1").arg(currentSubscriptionChannelTitle); subscribeTip = subscribeText; subscribeAction->setEnabled(true); } else { - subscribeText = tr("Subscribe to %1").arg(video->getChannelTitle()); + subscribeText = tr("Subscribe to %1").arg(currentSubscriptionChannelTitle); subscribeTip = subscribeText; subscribeAction->setEnabled(true); } @@ -922,6 +938,32 @@ MainWindow::instance()->setupAction(subscribeAction); } +void MediaView::updateSubscriptionActionForChannel(const QString & channelId) { + QString channelTitle = tr("channel"); + YTChannel *channel = YTChannel::forId(channelId); + if (nullptr != channel && !channel->getDisplayName().isEmpty()) { + channelTitle = channel->getDisplayName(); + } + + bool subscribed = YTChannel::isSubscribed(channelId); + + currentSubscriptionChannelId = channelId; + currentSubscriptionChannelTitle = channelTitle; + updateSubscriptionAction(subscribed); +} + +void MediaView::updateSubscriptionActionForVideo(Video *video, bool subscribed) { + if (!video) { + currentSubscriptionChannelId = ""; + currentSubscriptionChannelTitle = ""; + updateSubscriptionAction(false); + } else { + currentSubscriptionChannelId = video->getChannelId(); + currentSubscriptionChannelTitle = video->getChannelTitle(); + updateSubscriptionAction(subscribed); + } +} + void MediaView::reloadCurrentVideo() { Video *video = playlistModel->activeVideo(); if (!video) return; @@ -959,20 +1001,22 @@ } void MediaView::toggleSubscription() { - Video *video = playlistModel->activeVideo(); - if (!video) return; - QString userId = video->getChannelId(); - if (userId.isEmpty()) return; - bool subscribed = YTChannel::isSubscribed(userId); + //Video *video = playlistModel->activeVideo(); + if (currentSubscriptionChannelId.isEmpty()) { + return; + } + + bool subscribed = YTChannel::isSubscribed(currentSubscriptionChannelId); if (subscribed) { - YTChannel::unsubscribe(userId); + YTChannel::unsubscribe(currentSubscriptionChannelId); MainWindow::instance()->showMessage( - tr("Unsubscribed from %1").arg(video->getChannelTitle())); + tr("Unsubscribed from %1").arg(currentSubscriptionChannelTitle)); } else { - YTChannel::subscribe(userId); - MainWindow::instance()->showMessage(tr("Subscribed to %1").arg(video->getChannelTitle())); + YTChannel::subscribe(currentSubscriptionChannelId); + MainWindow::instance()->showMessage(tr("Subscribed to %1").arg(currentSubscriptionChannelTitle)); } - updateSubscriptionAction(video, !subscribed); + + updateSubscriptionAction(!subscribed); } void MediaView::adjustWindowSize() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/src/mediaview.h new/minitube-3.1/src/mediaview.h --- old/minitube-3.0/src/mediaview.h 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/src/mediaview.h 2019-06-14 15:06:12.000000000 +0200 @@ -55,7 +55,8 @@ int getHistoryIndex(); PlaylistModel *getPlaylistModel() { return playlistModel; } const QString &getCurrentVideoId(); - void updateSubscriptionAction(Video *video, bool subscribed); + void updateSubscriptionActionForVideo(Video *video, bool subscribed); + void updateSubscriptionActionForChannel(const QString & channelId); VideoArea *getVideoArea() { return videoAreaWidget; } void reloadCurrentVideo(); @@ -96,6 +97,7 @@ void goForward(); void toggleSubscription(); void adjustWindowSize(); + void updateSubscriptionAction(bool subscribed); private slots: void onItemActivated(const QModelIndex &index); @@ -110,7 +112,7 @@ void resumePlayback(); void onAuthorPushed(QModelIndex); void searchAgain(); - void resumeWithNewStreamUrl(const QUrl &streamUrl); + void resumeWithNewStreamUrl(const QString &streamUrl, const QString &audioUrl); private: MediaView(QWidget *parent = nullptr); @@ -133,6 +135,9 @@ Video *skippedVideo; QString currentVideoId; + QString currentSubscriptionChannelId; + QString currentSubscriptionChannelTitle; + #ifdef APP_ACTIVATION QTimer *demoTimer; #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/minitube-3.0/src/ytvideo.cpp new/minitube-3.1/src/ytvideo.cpp --- old/minitube-3.0/src/ytvideo.cpp 2019-03-23 09:25:27.000000000 +0100 +++ new/minitube-3.1/src/ytvideo.cpp 2019-06-14 15:06:12.000000000 +0200 @@ -82,7 +82,6 @@ } QString videoToken = videoTokeRE.cap(1); - qDebug() << "got token" << videoToken; while (videoToken.contains('%')) videoToken = QByteArray::fromPercentEncoding(videoToken.toLatin1()); qDebug() << "videoToken" << videoToken; @@ -121,8 +120,13 @@ int format = -1; QString url; QString sig; + QStringRef sp; for (const QStringRef &urlParam : urlParams) { - // qWarning() << "urlParam" << urlParam; + qDebug() << "urlParam" << urlParam; + if (sp.isNull() && urlParam.startsWith(QLatin1String("sp"))) { + int separator = urlParam.indexOf('='); + sp = urlParam.mid(separator + 1); + } if (urlParam.startsWith(QLatin1String("itag="))) { int separator = urlParam.indexOf('='); format = urlParam.mid(separator + 1).toInt(); @@ -138,6 +142,7 @@ sig = QByteArray::fromPercentEncoding(urlParam.mid(separator + 1).toUtf8()); sig = decryptSignature(sig); if (sig.isEmpty()) sig = JsFunctions::instance()->decryptSignature(sig); + if (sig.isEmpty()) qWarning() << "Empty signature"; } else { loadWebPage(); return; @@ -146,7 +151,12 @@ } if (format == -1 || url.isNull()) continue; - url += QLatin1String("&signature=") + sig; + if (!sig.isEmpty()) { + if (sp.isEmpty()) + url += QLatin1String("&signature=") + sig; + else + url += '&' + sp + '=' + sig; + } if (!url.contains(QLatin1String("ratebypass"))) url += QLatin1String("&ratebypass=yes"); @@ -285,13 +295,13 @@ continue; } else { sigFuncName = funcNameRe.cap(1); - // qDebug() << "Captures" << funcNameRe.captureCount() << funcNameRe.capturedTexts(); + qDebug() << "Captures" << funcNameRe.captureCount() << funcNameRe.capturedTexts(); if (sigFuncName.isEmpty()) { qDebug() << "Empty capture for" << funcNameRe; continue; } captureFunction(sigFuncName, jsPlayer); - // qWarning() << sigFunctions << sigObjects; + qDebug() << sigFunctions << sigObjects; break; } }