--- /dev/null
- * Do proper temporary file createn (Closes: #644935)
++minitube (1.6-1) unstable; urgency=low
++
++ * New upstream version (Closes: #650622, #647212)
++ * Recreate debian/patches/disable-update-check
++ * Recreate debian/patches/proper-tempfiles
++
++ -- Jakob Haufe <sur5r@sur5r.net> Wed, 07 Dec 2011 02:50:04 +0100
++
+minitube (1.5-2) unstable; urgency=low
+
++ * Do proper temporary file creation (Closes: #644935).
+
+ -- Jakob Haufe <sur5r@sur5r.net> Wed, 12 Oct 2011 23:06:30 +0200
+
+minitube (1.5-1.1) unstable; urgency=low
+
+ * Bump Standards-Version to 3.9.2 (no changes required)
+
+ -- Jakob Haufe <sur5r@sur5r.net> Sun, 14 Aug 2011 09:33:19 +0200
+
+minitube (1.5-1) unstable; urgency=low
+
+ * New upstream version (Closes: #637410)
+
+ -- Jakob Haufe <sur5r@sur5r.net> Fri, 12 Aug 2011 18:34:21 +0200
+
+minitube (1.4.3-1) unstable; urgency=low
+
+ * New upstream version (Closes: #623821)
+
+ -- Jakob Haufe <sur5r@sur5r.net> Fri, 10 Jun 2011 00:12:04 +0200
+
+minitube (1.4.2-1) unstable; urgency=low
+
+ * New upstream version
+
+ -- Jakob Haufe <sur5r@sur5r.net> Sun, 24 Apr 2011 19:30:24 +0200
+
+minitube (1.4.1-1) unstable; urgency=low
+
+ * New upstream version
+ * Disable update check, makes no sense for a packaged version (Closes:
+ #619941)
+
+ -- Jakob Haufe <sur5r@sur5r.net> Sun, 03 Apr 2011 20:38:04 +0200
+
+minitube (1.3-1) unstable; urgency=low
+
+ * New upstream version (Closes: #606670)
+
+ -- Jakob Haufe <sur5r@sur5r.net> Fri, 17 Dec 2010 00:23:23 +0100
+
+minitube (1.2-1) unstable; urgency=low
+
+ * New upstream version (Closes: #600070)
+
+ -- Jakob Haufe <sur5r@sur5r.net> Fri, 15 Oct 2010 01:48:10 +0200
+
+minitube (1.1-1) unstable; urgency=low
+
+ * New upstream version (Closes: #590320)
+ * Bump Standards-Version to 3.9.1 (no changes required)
+ * Add dependencies to dbus-x11 and gstreamer0.10-plugins-good
+
+ -- Jakob Haufe <sur5r@sur5r.net> Tue, 27 Jul 2010 23:04:09 +0200
+
+minitube (1.0-3) unstable; urgency=low
+
+ * Mention files with copyright by Nokia in debian/copyright. Thanks to Barry
+ deFreese for pointing it out.
+
+ -- Jakob Haufe <sur5r@sur5r.net> Wed, 09 Jun 2010 20:52:44 +0200
+
+minitube (1.0-2) unstable; urgency=low
+
+ * Make phonon and gstreamer dependencies more strict
+ * Remove now obsolete README.Debian
+ * Remove README.source template
+
+ -- Jakob Haufe <sur5r@sur5r.net> Thu, 06 May 2010 22:58:30 +0200
+
+minitube (1.0-1) unstable; urgency=low
+
+ * Initial release (Closes: #561012)
+
+ -- Jakob Haufe <sur5r@sur5r.net> Tue, 04 May 2010 21:51:02 +0200
+
--- /dev/null
- diff --git a/src/SearchView.cpp b/src/SearchView.cpp
- index 809537e..9ac18a8 100644
- --- minitube-1.4.1.orig/src/SearchView.cpp
- +++ minitube-1.4.1/src/SearchView.cpp
- @@ -180,7 +180,7 @@ SearchView::SearchView(QWidget *parent) : QWidget(parent) {
- updateChecker = 0;
+Description: Disable update check as it's useless for a packaged version
+Author: Jakob Haufe <sur5r@sur5r.net>
+
- #ifndef APP_MAC_STORE
- - checkForUpdate();
- + //checkForUpdate();
- #endif
++diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp
++index 137ee6f..16a2103 100644
++--- a/src/MainWindow.cpp
+++++ b/src/MainWindow.cpp
++@@ -102,7 +102,7 @@ MainWindow::MainWindow() :
+
++ setAcceptDrops(true);
++
++- QTimer::singleShot(0, this, SLOT(checkForUpdate()));
+++ //QTimer::singleShot(0, this, SLOT(checkForUpdate()));
+
+ }
++
--- /dev/null
- --- minitube-1.5.orig/src/MediaView.cpp
- +++ minitube-1.5/src/MediaView.cpp
- @@ -127,6 +127,7 @@ MediaView::MediaView(QWidget *parent) :
- connect(demoTimer, SIGNAL(timeout()), SLOT(demoMessage()));
+Description: Do proper temporary file creation
+ Upstream is using predictable temporary file names. Fix this in Debian
+ for now by using QTemporaryFile. This additionally ensures removal of
+ temporary files upon exit.
+Author: Jakob Haufe <sur5r@sur5r.net>
+Bug-Debian: http://bugs.debian.org/644935
+
- + tempFile = new QTemporaryFile(this);
- }
++diff --git a/src/temporary.cpp b/src/temporary.cpp
++index a979cbd..bebcd1f 100644
++--- a/src/temporary.cpp
+++++ b/src/temporary.cpp
++@@ -1,7 +1,7 @@
++ #include "temporary.h"
++ #include "constants.h"
++
++-static QList<QString> paths;
+++static QList<QTemporaryFile*> tempfiles;
++ #ifdef Q_WS_X11
++ static QString userName;
+ #endif
++@@ -10,41 +10,21 @@ Temporary::Temporary() { }
+
- void MediaView::initialize() {
- @@ -346,21 +347,15 @@ void MediaView::gotStreamUrl(QUrl stream
++ QString Temporary::filename() {
+
- QString tempDir = QDesktopServices::storageLocation(QDesktopServices::TempLocation);
++- static const QString tempDir = QDesktopServices::storageLocation(QDesktopServices::TempLocation);
+++ QTemporaryFile *tempfile = new QTemporaryFile(QDir::tempPath() + "/" + Constants::UNIX_NAME + "-XXXXXX");
+
++- QString tempFile = tempDir + "/" + Constants::UNIX_NAME + "-" + QString::number(qrand());
+++ tempfiles << tempfile;
+
- - QString tempFile = tempDir + "/minitube-" + getenv("USERNAME") + ".mp4";
- -#else
- - QString tempFile = tempDir + "/minitube.mp4";
+-#ifdef Q_WS_X11
- - qDebug() << "Cannot remove temp file";
++- if (userName.isNull()) {
++- userName = QString(getenv("USERNAME"));
++- if (userName.isEmpty())
++- userName = QString(getenv("USER"));
++- }
++- if (!userName.isEmpty())
++- tempFile += "-" + userName;
+-#endif
++-
+- if (QFile::exists(tempFile) && !QFile::remove(tempFile)) {
- + if(tempFile->fileName().isNull())
- + tempFile->open();
++- qDebug() << "Cannot remove temp file" << tempFile;
+++ if (tempfiles.size() > 1) {
+++ QTemporaryFile *removedFile = tempfiles.takeFirst();
+++ delete removedFile;
++ }
++
++- paths << tempFile;
++-
++- if (paths.size() > 1) {
++- QString removedFile = paths.takeFirst();
++- if (QFile::exists(removedFile) && !QFile::remove(removedFile)) {
++- qDebug() << "Cannot remove temp file" << removedFile;
++- }
+- }
- Video *videoCopy = video->clone();
- if (downloadItem) {
- downloadItem->stop();
- delete downloadItem;
++-
++- return tempFile;
++-
+++ tempfile->open();
+++ return tempfile->fileName();
++ }
+
- - downloadItem = new DownloadItem(videoCopy, streamUrl, tempFile, this);
- + downloadItem = new DownloadItem(videoCopy, streamUrl, tempFile->fileName(), this);
- connect(downloadItem, SIGNAL(statusChanged()), SLOT(downloadStatusChanged()));
- // connect(downloadItem, SIGNAL(progress(int)), SLOT(downloadProgress(int)));
- connect(downloadItem, SIGNAL(bufferProgress(int)), loadingWidget, SLOT(bufferStatus(int)));
- --- minitube-1.5.orig/src/MediaView.h
- +++ minitube-1.5/src/MediaView.h
++ void Temporary::deleteAll() {
++- foreach(QString path, paths) {
++- if (QFile::exists(path) && !QFile::remove(path)) {
++- qDebug() << "Cannot remove temp file" << path;
++- }
+++ foreach(QTemporaryFile *tempfile, tempfiles) {
+++ delete tempfile;
+ }
- #include <QtGui>
- #include <QtNetwork>
++ }
++diff --git a/src/temporary.h b/src/temporary.h
++index 50b9633..0453572 100644
++--- a/src/temporary.h
+++++ b/src/temporary.h
+@@ -3,6 +3,7 @@
+
- #include <phonon/mediaobject.h>
- #include <phonon/videowidget.h>
- #include "View.h"
- @@ -130,6 +131,8 @@ private:
- DownloadItem *downloadItem;
- // QSlider *slider;
-
- + QTemporaryFile *tempFile;
- +
- };
-
- #endif // __MEDIAVIEW_H__
++ #include <QtCore>
++ #include <QDesktopServices>
++#include <QTemporaryFile>
++
++ class Temporary {
++