Hello community, here is the log from the commit of package mpc-qt for openSUSE:Factory checked in at 2017-11-03 16:25:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mpc-qt (Old) and /work/SRC/openSUSE:Factory/.mpc-qt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mpc-qt" Fri Nov 3 16:25:19 2017 rev:5 rq:538076 version:17.11 Changes: -------- --- /work/SRC/openSUSE:Factory/mpc-qt/mpc-qt.changes 2017-10-08 20:15:56.634088298 +0200 +++ /work/SRC/openSUSE:Factory/.mpc-qt.new/mpc-qt.changes 2017-11-03 16:25:56.641822020 +0100 @@ -1,0 +2,11 @@ +Wed Nov 1 08:24:01 UTC 2017 - [email protected] + +- Update to version 17.11 + * Remember time of favorites + * Remember correct config folder (#137) + * Correct window frame calculation (#138) + * Don't crash in a new ipc connection (#140) + +- Dropped Qt-5.6-backport_setFlag.patch (merged upstream) + +------------------------------------------------------------------- Old: ---- Qt-5.6-backport_setFlag.patch mpc-qt-17.10.tar.gz New: ---- mpc-qt-17.11.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mpc-qt.spec ++++++ --- /var/tmp/diff_new_pack.CMVftD/_old 2017-11-03 16:25:57.513790283 +0100 +++ /var/tmp/diff_new_pack.CMVftD/_new 2017-11-03 16:25:57.517790137 +0100 @@ -19,7 +19,7 @@ # See also http://en.opensuse.org/openSUSE:Specfile_guidelines Name: mpc-qt -Version: 17.10 +Version: 17.11 Release: 0 Summary: Media Player Classic Qute Theater License: GPL-2.0 @@ -27,8 +27,6 @@ Url: https://github.com/cmdrkotori/mpc-qt Source0: https://github.com/cmdrkotori/mpc-qt/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: %{name}.changes -# PATCH-FIX-UPSTREAM Qt-5.6-backport_setFlag.patch -- allows to build against Qt 5.6 LTS [email protected] -Patch0: Qt-5.6-backport_setFlag.patch BuildRequires: libqt5-linguist BuildRequires: pkgconfig(Qt5Core) BuildRequires: pkgconfig(Qt5DBus) @@ -40,12 +38,11 @@ %if 0%{?suse_version} > 1320 BuildRequires: gcc-c++ %else -%if 0%{?sle_version} == 120100 -# Leap 42.1 -BuildRequires: gcc5-c++ -%else +%if 0%{?sle_version} == 120200 # Leap 42.2+ / SLE12SP2Backports BuildRequires: gcc6-c++ +%else +BuildRequires: gcc7-c++ %endif %endif @@ -55,7 +52,6 @@ %prep %setup -q rm -rf mpv-dev -%patch0 -p1 # fix builddate info # Remove build time references so build-compare can do its work FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{SOURCE1} '+%%H:%%M:%%S') @@ -66,8 +62,6 @@ %build export CC=gcc export CXX=g++ -test -x "$(type -p gcc-5)" && export CC=gcc-5 -test -x "$(type -p g++-5)" && export CXX=g++-5 test -x "$(type -p gcc-6)" && export CC=gcc-6 test -x "$(type -p g++-6)" && export CXX=g++-6 test -x "$(type -p gcc-7)" && export CC=gcc-7 ++++++ mpc-qt-17.10.tar.gz -> mpc-qt-17.11.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/.gitignore new/mpc-qt-17.11/.gitignore --- old/mpc-qt-17.10/.gitignore 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/.gitignore 2017-10-15 11:22:00.000000000 +0200 @@ -49,3 +49,4 @@ # make release scripts /mpc-qt-*/ *.zip +*.sha512 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/README.md new/mpc-qt-17.11/README.md --- old/mpc-qt-17.10/README.md 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/README.md 2017-10-15 11:22:00.000000000 +0200 @@ -36,8 +36,7 @@ ## Features Nearly everything that mpc-hc does. For the most part, unwritten -portions relate to setting options, streaming from devices, and storing -favorites. +portions relate to setting options and streaming from devices. ### Improvements over mpc-hc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/favoriteswindow.cpp new/mpc-qt-17.11/favoriteswindow.cpp --- old/mpc-qt-17.10/favoriteswindow.cpp 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/favoriteswindow.cpp 2017-10-15 11:22:00.000000000 +0200 @@ -1,5 +1,6 @@ #include <QLineEdit> #include <QPainter> +#include <QtGlobal> #include "favoriteswindow.h" #include "ui_favoriteswindow.h" @@ -97,7 +98,11 @@ { track_ = t; Qt::ItemFlags f = flags(); +#if QT_VERSION >= 0x050700 f.setFlag(Qt::ItemIsEditable); +#else + f |= Qt::ItemIsEditable; +#endif this->setFlags(f); } @@ -159,7 +164,8 @@ QApplication::style()->drawControl(QStyle::CE_ItemViewItem, &option, painter); QString text = listItem->track().text; - QString time = Helpers::toDateFormat(listItem->track().length); + QString time = Helpers::toDateFormat(listItem->track().position) + " / " + + Helpers::toDateFormat(listItem->track().length); QRect rc = option.rect.adjusted(3, 0, -3, 0); painter->drawText(rc, Qt::AlignRight|Qt::AlignCenter, time); rc.adjust(0, 0, -(3 + option.fontMetrics.width(time)), 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/helpers.cpp new/mpc-qt-17.11/helpers.cpp --- old/mpc-qt-17.10/helpers.cpp 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/helpers.cpp 2017-10-15 11:22:00.000000000 +0200 @@ -646,19 +646,21 @@ -TrackInfo::TrackInfo(const QUrl &url, const QUuid &list, const QUuid &item, QString text, double length) +TrackInfo::TrackInfo(const QUrl &url, const QUuid &list, const QUuid &item, QString text, double length, double position) { this->url = url; this->list = list; this->item = item; this->text = text.isEmpty() ? url.toString() : text; this->length = length; + this->position = position; } QVariantMap TrackInfo::toVMap() const { return QVariantMap({{"url", url}, {"list", list}, {"item", item}, - {"text", text}, {"length", length}}); + {"text", text}, {"length", length}, + {"position", position}}); } void TrackInfo::fromVMap(const QVariantMap &map) @@ -670,6 +672,7 @@ if (text.isEmpty()) text = url.toString(); length = map.value("length").toDouble(); + position = map.value("position").toDouble(); } bool TrackInfo::operator ==(const TrackInfo &track) const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/helpers.h new/mpc-qt-17.11/helpers.h --- old/mpc-qt-17.10/helpers.h 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/helpers.h 2017-10-15 11:22:00.000000000 +0200 @@ -121,12 +121,13 @@ class TrackInfo { public: TrackInfo() {} - TrackInfo(const QUrl &url, const QUuid &list, const QUuid &item, QString text, double length); + TrackInfo(const QUrl &url, const QUuid &list, const QUuid &item, QString text, double length, double position); QUrl url; QUuid list; QUuid item; QString text; double length; + double position; QVariantMap toVMap() const; void fromVMap(const QVariantMap &map); bool operator ==(const TrackInfo &track) const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/ipcjson.cpp new/mpc-qt-17.11/ipcjson.cpp --- old/mpc-qt-17.10/ipcjson.cpp 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/ipcjson.cpp 2017-10-15 11:22:00.000000000 +0200 @@ -70,15 +70,18 @@ void JsonServer::listen() { server = new QLocalServer(this); - server->removeServer(socketName); - server->listen(socketName); connect(server, &QLocalServer::newConnection, this, &JsonServer::server_newConnection); + + server->removeServer(socketName); + server->listen(socketName); } void JsonServer::server_newConnection() { - emit newConnection(server->nextPendingConnection()); + QLocalSocket *connection = server->nextPendingConnection(); + if (connection) + emit newConnection(connection); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/main.cpp new/mpc-qt-17.11/main.cpp --- old/mpc-qt-17.10/main.cpp 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/main.cpp 2017-10-15 11:22:00.000000000 +0200 @@ -712,6 +712,8 @@ playbackManager->playItem(track.list, track.item); else playbackManager->openFile(track.url); + if (track.position > 0 && track.url.isLocalFile()) + playbackManager->navigateToTime(track.position); } void Flow::mainwindow_recentClear() @@ -763,7 +765,7 @@ void Flow::manager_nowPlayingChanged(QUrl url, QUuid listUuid, QUuid itemUuid) { - TrackInfo track(url, listUuid, itemUuid, QString(), 0); + TrackInfo track(url, listUuid, itemUuid, QString(), 0, 0); if (recentFiles.contains(track)) { recentFiles.removeAll(track); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/mainwindow.cpp new/mpc-qt-17.11/mainwindow.cpp --- old/mpc-qt-17.10/mainwindow.cpp 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/mainwindow.cpp 2017-10-15 11:22:00.000000000 +0200 @@ -192,6 +192,8 @@ QRect available = first_run ? desktop->availableGeometry( desktop->screenNumber(QCursor::pos())) : desktop->availableGeometry(this); + QSize frameDiff = this->frameGeometry().size() - this->geometry().size(); + available.adjust(0, 0, -frameDiff.width(), -frameDiff.height()); // calculate player size QSize player = mpvw->videoSize() / ratio; @@ -247,13 +249,16 @@ QRect available = first_run ? desktop->availableGeometry( desktop->screenNumber(QCursor::pos())) : desktop->availableGeometry(this); + QSize frameDiff = this->frameGeometry().size() - this->geometry().size(); + available.adjust(0, 0, -frameDiff.width(), -frameDiff.height()); if (size.height() > available.height()) size.setHeight(available.height()); if (size.width() > available.width()) size.setWidth(available.width()); + QPoint clientOffset = geometry().topLeft() - pos(); return QStyle::alignedRect(Qt::LeftToRight, Qt::AlignCenter, - size, available).topLeft(); + size, available).topLeft() + clientOffset; } void MainWindow::unfreezeWindow() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/make-release-win.sh new/mpc-qt-17.11/make-release-win.sh --- old/mpc-qt-17.10/make-release-win.sh 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/make-release-win.sh 2017-10-15 11:22:00.000000000 +0200 @@ -95,3 +95,4 @@ cp "$BUILD/mpc-qt.exe" "$DEST/mpc-qt.exe" cp mpv-dev/lib/mpv-1.dll "$DEST/mpv-1.dll" 7z a "mpc-qt-$1.zip" "./$DEST/*" +sha512sum "mpc-qt-$1.zip" >"mpc-qt-$1.zip.sha512" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/manager.cpp new/mpc-qt-17.11/manager.cpp --- old/mpc-qt-17.10/manager.cpp 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/manager.cpp 2017-10-15 11:22:00.000000000 +0200 @@ -22,6 +22,8 @@ this, &PlaybackManager::mpvw_playTimeChanged); connect(mpvWidget, &MpvWidget::playLengthChanged, this, &PlaybackManager::mpvw_playLengthChanged); + connect(mpvWidget, &MpvWidget::seekableChanged, + this, &PlaybackManager::mpvw_seekableChanged); connect(mpvWidget, &MpvWidget::playbackLoading, this, &PlaybackManager::mpvw_playbackLoading); connect(mpvWidget, &MpvWidget::playbackStarted, @@ -89,6 +91,7 @@ return; emit stateChanged(playbackState_ = WaitingState); + mpvStartTime = -1.0; nowPlaying_ = what; mpvWidget_->fileOpen(what.isLocalFile() ? what.toLocalFile() : what.fromPercentEncoding(what.toEncoded())); @@ -212,6 +215,7 @@ emit stateChanged(playbackState_); mpvWidget_->stopPlayback(); } + mpvStartTime = -1.0; mpvWidget_->discFilesOpen(where.toLocalFile()); mpvWidget_->setPaused(false); playbackStartState = PlayingState; @@ -374,7 +378,10 @@ void PlaybackManager::navigateToTime(double time) { - mpvWidget_->setTime(time); + if (playbackState_ == WaitingState || playbackState_ == StoppedState) + mpvStartTime = time; + else + mpvWidget_->setTime(time); } void PlaybackManager::speedUp() @@ -466,7 +473,8 @@ void PlaybackManager::sendCurrentTrackInfo() { QUrl url(playlistWindow_->getUrlOf(nowPlayingList, nowPlayingItem)); - emit currentTrackInfo({url, nowPlayingList, nowPlayingItem, nowPlayingTitle, mpvLength}); + emit currentTrackInfo({url, nowPlayingList, nowPlayingItem, + nowPlayingTitle, mpvLength, mpvTime}); } void PlaybackManager::mpvw_playTimeChanged(double time) @@ -475,6 +483,7 @@ // to indicate that the time is in fact available. if (mpvLength < time) mpvLength = time; + mpvTime = time; emit timeChanged(time, mpvLength); } @@ -483,6 +492,14 @@ mpvLength = length; } +void PlaybackManager::mpvw_seekableChanged(bool yes) +{ + if (yes && mpvStartTime > 0) { + mpvWidget_->setTimeSync(mpvStartTime); + mpvStartTime = -1; + } +} + void PlaybackManager::mpvw_playbackLoading() { playbackState_ = BufferingState; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/manager.h new/mpc-qt-17.11/manager.h --- old/mpc-qt-17.10/manager.h 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/manager.h 2017-10-15 11:22:00.000000000 +0200 @@ -90,6 +90,7 @@ private slots: void mpvw_playTimeChanged(double time); void mpvw_playLengthChanged(double length); + void mpvw_seekableChanged(bool yes); void mpvw_playbackLoading(); void mpvw_playbackStarted(); void mpvw_pausedChanged(bool yes); @@ -151,6 +152,8 @@ QUuid nowPlayingItem; QString nowPlayingTitle; + double mpvStartTime = -1.0; + double mpvTime = 0.0; double mpvLength = 0.0; double mpvSpeed = 1.0; PlaybackState playbackState_ = StoppedState; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/mpvwidget.cpp new/mpc-qt-17.11/mpvwidget.cpp --- old/mpc-qt-17.10/mpvwidget.cpp 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/mpvwidget.cpp 2017-10-15 11:22:00.000000000 +0200 @@ -167,7 +167,8 @@ { "file-size", 0, MPV_FORMAT_STRING }, { "file-date-created", 0, MPV_FORMAT_NODE }, { "format", 0, MPV_FORMAT_STRING }, - { "path", 0, MPV_FORMAT_STRING } + { "path", 0, MPV_FORMAT_STRING }, + { "seekable", 0, MPV_FORMAT_FLAG } }; QSet<QString> throttled = { "time-pos", "avsync", "estimated-vf-fps", "frame-drop-count", @@ -260,6 +261,7 @@ void MpvWidget::fileOpen(QString filename) { setSubFile("\n"); + //setStartTime(0.0); emit ctrlCommand(QStringList({"loadfile", filename})); setMouseHideTime(hideTimer->interval()); } @@ -396,6 +398,11 @@ setMpvPropertyVariant("time-pos", position); } +void MpvWidget::setTimeSync(double position) +{ + controller()->command(QVariantList() << "seek" << position << "absolute"); +} + void MpvWidget::setLoopPoints(double first, double end) { setMpvPropertyVariant("ab-loop-a", @@ -623,6 +630,7 @@ //FIXME: use constant-time map to function lookup HANDLE_PROP("time-pos", emit self_playTimeChanged, toDouble, -1.0); HANDLE_PROP("duration", emit self_playLengthChanged, toDouble, -1.0); + HANDLE_PROP("seekable", emit seekableChanged, toBool, false); HANDLE_PROP("pause", emit pausedChanged, toBool, true); HANDLE_PROP("media-title", emit mediaTitleChanged, toString, QString()); HANDLE_PROP("chapter-metadata", emit chapterDataChanged, toMap, QVariantMap()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/mpvwidget.h new/mpc-qt-17.11/mpvwidget.h --- old/mpc-qt-17.10/mpvwidget.h 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/mpvwidget.h 2017-10-15 11:22:00.000000000 +0200 @@ -50,6 +50,7 @@ void setPaused(bool yes); void setSpeed(double speed); void setTime(double position); + void setTimeSync(double position); void setLoopPoints(double first, double end); void setAudioTrack(int64_t id); void setSubtitleTrack(int64_t id); @@ -96,6 +97,7 @@ void playTimeChanged(double time); void playLengthChanged(double length); + void seekableChanged(bool yes); void playbackLoading(); void playbackStarted(); void pausedChanged(bool yes); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/qdrawnslider.cpp new/mpc-qt-17.11/qdrawnslider.cpp --- old/mpc-qt-17.10/qdrawnslider.cpp 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/qdrawnslider.cpp 2017-10-15 11:22:00.000000000 +0200 @@ -231,10 +231,6 @@ ev->ignore(); } - - -constexpr QRectF QMediaSlider::noLoopArea; - QMediaSlider::QMediaSlider(QWidget *parent) : QDrawnSlider(parent, QSize(11, 12), QSize(5, 3)) { @@ -244,7 +240,7 @@ { ticks.clear(); vLoopA = vLoopB = -1; - loopArea = noLoopArea; + loopArea = { -1, -1, 0, 0 }; } void QMediaSlider::setTick(double value, QString text) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/qdrawnslider.h new/mpc-qt-17.11/qdrawnslider.h --- old/mpc-qt-17.10/qdrawnslider.h 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/qdrawnslider.h 2017-10-15 11:22:00.000000000 +0200 @@ -93,8 +93,7 @@ QMap<double, QString> ticks; double vLoopA = -1; double vLoopB = -1; - static constexpr QRectF noLoopArea = { -1, -1, 0, 0 }; - QRectF loopArea = noLoopArea; + QRectF loopArea = { -1, -1, 0, 0}; }; class QVolumeSlider : public QDrawnSlider { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mpc-qt-17.10/storage.cpp new/mpc-qt-17.11/storage.cpp --- old/mpc-qt-17.10/storage.cpp 2017-10-01 01:27:29.000000000 +0200 +++ new/mpc-qt-17.11/storage.cpp 2017-10-15 11:22:00.000000000 +0200 @@ -14,7 +14,8 @@ QObject(parent) { configPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation); - QDir().mkpath(Platform::fixedConfigPath(configPath)); + configPath = Platform::fixedConfigPath(configPath); + QDir().mkpath(configPath); } void Storage::writeVMap(QString name, const QVariantMap &qvm)
