Hello community, here is the log from the commit of package clipgrab for openSUSE:Factory checked in at 2019-05-08 15:17:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/clipgrab (Old) and /work/SRC/openSUSE:Factory/.clipgrab.new.5148 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "clipgrab" Wed May 8 15:17:36 2019 rev:8 rq:701511 version:3.8.2 Changes: -------- --- /work/SRC/openSUSE:Factory/clipgrab/clipgrab.changes 2019-01-24 14:15:35.543211484 +0100 +++ /work/SRC/openSUSE:Factory/.clipgrab.new.5148/clipgrab.changes 2019-05-08 15:17:39.113147012 +0200 @@ -1,0 +2,5 @@ +Wed May 8 06:31:36 UTC 2019 - [email protected] + +- Update to version 3.8.2 (no changelog supplied) + +------------------------------------------------------------------- Old: ---- clipgrab-3.8.0.tar.gz New: ---- clipgrab-3.8.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ clipgrab.spec ++++++ --- /var/tmp/diff_new_pack.MDAWKG/_old 2019-05-08 15:17:39.757148446 +0200 +++ /var/tmp/diff_new_pack.MDAWKG/_new 2019-05-08 15:17:39.757148446 +0200 @@ -18,7 +18,7 @@ Name: clipgrab -Version: 3.8.0 +Version: 3.8.2 Release: 0 Summary: Video downloader License: GPL-3.0-or-later ++++++ clipgrab-3.8.0.tar.gz -> clipgrab-3.8.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/ClipGrab.plist new/clipgrab-3.8.2/ClipGrab.plist --- old/clipgrab-3.8.0/ClipGrab.plist 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/ClipGrab.plist 2019-02-28 08:11:56.000000000 +0100 @@ -2,21 +2,25 @@ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> - <key>CFBundleExecutable</key> - <string>ClipGrab</string> - <key>CFBundleIconFile</key> - <string>clipgrab.icns</string> - <key>CFBundleIdentifier</key> - <string>de.clipgrab.ClipGrab</string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>NSHumanReadableCopyright</key> - <string>https://clipgrab.org</string> - <key>Note</key> - <string>ClipGrab</string> - <key>NSHighResolutionCapable</key> - <string>True</string> - <key>CFBundleVersion</key> - <string>3.8.0</string> + <key>CFBundleExecutable</key> + <string>ClipGrab</string> + <key>CFBundleIconFile</key> + <string>clipgrab.icns</string> + <key>CFBundleIdentifier</key> + <string>de.clipgrab.ClipGrab</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>NSHumanReadableCopyright</key> + <string>https://clipgrab.org</string> + <key>Note</key> + <string>ClipGrab</string> + <key>NSHighResolutionCapable</key> + <string>True</string> + <key>CFBundleVersion</key> + <string>3.8.2</string> + <key>CFBundleShortVersionString</key> + <string>3.8.2</string> + <key>CFBundleGetInfoString</key> + <string>3.8.2</string> </dict> </plist> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/clipgrab.cpp new/clipgrab-3.8.2/clipgrab.cpp --- old/clipgrab-3.8.0/clipgrab.cpp 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/clipgrab.cpp 2019-02-28 08:11:56.000000000 +0100 @@ -823,3 +823,16 @@ QString path = QFileInfo(this->getDownloadTargetPath(item)).absoluteDir().path(); QDesktopServices::openUrl(QUrl::fromLocalFile(path)); } + +void ClipGrab::openDownload(int item) +{ + if (this->isDownloadFinished(item)) + { + QString path = this->getDownloadSaveFileName(item); + QDesktopServices::openUrl(QUrl::fromLocalFile(path)); + } + else + { + this->openTargetFolder(item); + } +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/clipgrab.h new/clipgrab-3.8.2/clipgrab.h --- old/clipgrab-3.8.0/clipgrab.h 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/clipgrab.h 2019-02-28 08:11:56.000000000 +0100 @@ -139,6 +139,7 @@ bool isDownloadFinished(int item); video* heuristic; void openTargetFolder(int item); + void openDownload(int item); QList<language> languages; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/clipgrab.pro new/clipgrab-3.8.2/clipgrab.pro --- old/clipgrab-3.8.0/clipgrab.pro 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/clipgrab.pro 2019-02-28 08:11:56.000000000 +0100 @@ -97,5 +97,5 @@ QMAKE_INFO_PLIST = ClipGrab.plist LIBS += -framework AppKit -framework Foundation } -VERSION = 3.8.0 +VERSION = 3.8.2 DEFINES += CLIPGRAB_VERSION=$$VERSION Binary files old/clipgrab-3.8.0/clipgrab_pt.qm and new/clipgrab-3.8.2/clipgrab_pt.qm differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/clipgrab_pt.ts new/clipgrab-3.8.2/clipgrab_pt.ts --- old/clipgrab-3.8.0/clipgrab_pt.ts 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/clipgrab_pt.ts 2019-02-28 08:11:56.000000000 +0100 @@ -9,19 +9,19 @@ </message> <message> <source>Downloading update … %1/%2 MBytes</source> - <translation type="unfinished"></translation> + <translation>Atualização do download … %1/%2 MBytes</translation> </message> <message> <source>There was an error while downloading the update.: %1</source> - <translation type="unfinished"></translation> + <translation>Ocorreu um erro baixando a atualização.: %1</translation> </message> <message> <source>The fingerprint of the downloaded update file could not be verified: %1 should have been %2</source> - <translation type="unfinished"></translation> + <translation>A assinatura do arquivo atualizado baixado não pôde ser verificada: %1 deveria ter sido %2</translation> </message> <message> <source>Could not open update file.</source> - <translation type="unfinished"></translation> + <translation>Não foi possível abrir o arquivo de atualização.</translation> </message> </context> <context> @@ -49,15 +49,15 @@ <name>LoginDialog</name> <message> <source>Confirmation or Login Required</source> - <translation type="unfinished"></translation> + <translation>Confirmação ou Login Requerido</translation> </message> <message> <source>Confirmation or login required</source> - <translation type="unfinished"></translation> + <translation>Confirmação ou login requerido</translation> </message> <message> <source>This video requires you to sign in or confirm your access before downloading it.</source> - <translation type="unfinished"></translation> + <translation>Este vídeo requer que você efetue o login ou confirme seu acesso antes de baixá-lo.</translation> </message> <message> <source>about:blank</source> @@ -65,28 +65,26 @@ </message> <message> <source>Remember login</source> - <translation type="unfinished"></translation> + <translation>Memorizar login</translation> </message> </context> <context> <name>MainWindow</name> <message> <source>Select Target</source> - <translation>Selecione um destino</translation> + <translation>Selecione um Destino</translation> </message> <message> <source>Please wait while ClipGrab is loading information about the video ...</source> - <translation>Espere enquanto ClipGrab está carregando informações a respeito do vídeo ...</translation> + <translation>Espere enquanto ClipGrab está carregando informações sobre o vídeo ...</translation> </message> <message> <source>Please enter the link to the video you want to download in the field below.</source> - <translatorcomment>The English word "link" is frequently used without translation in Brazil. Trying to translate it into Portuguese probably would lead to misinterpretation. I am unable to translate it into Portuguese as written in Portugal and other Portuguese speaking countries.</translatorcomment> - <translation>Escreva o link para o vídeo o qual você deseja baixar no campo abaixo.</translation> + <translation>Informe no campo abaixo o link do vídeo que você deseja baixar.</translation> </message> <message> <source>The link you have entered seems to not be recognised by any of the supported portals.<br/>Now ClipGrab will check if it can download a video from that site anyway.</source> - <translatorcomment>The word "portals" is translated into Portuguese as "portais". I believe the English word "sites" is more adequate.</translatorcomment> - <translation>O link que você digitou aparentemente não é reconhecido por nenhum dos sites suportados.<br/>Agora ClipGrab irá checar se é possível baixar o vídeo a partir deste link apesar disto.</translation> + <translation>O link que você digitou aparentemente não é reconhecido por nenhum dos sites suportados.<br/>O ClipGrab irá checar se é possível baixar o vídeo a partir deste link.</translation> </message> <message> <source>No downloadable video could be found.<br />Maybe you have entered the wrong link or there is a problem with your connection.</source> @@ -152,54 +150,57 @@ </message> <message> <source>Downloading and converting “%title” is now finished.</source> - <translation type="unfinished"></translation> + <translation>?%title? baixado e conversão finalizada.</translation> </message> <message> <source>&Open downloaded file</source> - <translation type="unfinished"></translation> + <translation>&Abrir arquivo baixado</translation> </message> <message> <source>Open &target folder</source> - <translation type="unfinished"></translation> + <translation>Abrir &pasta de destino</translation> </message> <message> <source>&Pause download</source> - <translation type="unfinished"></translation> + <translation>&Pausar download</translation> </message> <message> <source>&Restart download</source> - <translation type="unfinished"></translation> + <translation>&Reiniciar download</translation> </message> <message> <source>&Cancel download</source> - <translation type="unfinished"></translation> + <translation>&Cancelar download</translation> </message> <message> <source>Copy &video link</source> - <translation type="unfinished"></translation> + <translation>Copiar link do &vídeo</translation> </message> <message> <source>Open video link in &browser</source> - <translation type="unfinished"></translation> + <translatorcomment>I'm sure all brazilians would call it "browser" but navegador de internet is the correct translation +</translatorcomment> + <translation>Abrir link do vídeo no &navegador de internet</translation> </message> <message> <source>Resume download</source> - <translation type="unfinished"></translation> + <translation>Continuar download</translation> </message> <message> <source>Show in &Finder</source> - <translation type="unfinished"></translation> + <translatorcomment>Finder is a Mac IOs feature, not sure what the name in Portuguese is and if Finder needs to be translated</translatorcomment> + <translation>Mostrar no &Finder</translation> </message> <message> <source>No results found.</source> - <translation type="unfinished"></translation> + <translation>Nenhum resultado encontrado.</translation> </message> </context> <context> <name>MainWindowClass</name> <message> <source>ClipGrab - Download and Convert Online Videos</source> - <translation>ClipGrab - Baixa e Converte Vídeos Online</translation> + <translation>ClipGrab - Baixe e Converta Vídeos Online</translation> </message> <message> <source>Search</source> @@ -227,7 +228,7 @@ </message> <message> <source>Please enter the link to the video you want to download in the field below.</source> - <translation>Ponha o link do vídeo que você deseja baixar no campo abaixo.</translation> + <translation>Informe no campo abaixo o link do vídeo que você deseja baixar.</translation> </message> <message> <source>Format:</source> @@ -315,7 +316,7 @@ </message> <message> <source>Here you can configure how ClipGrab behaves when a downloadable video is discovered in your clipboard.</source> - <translation>Aqui você pode configurar como ClipGrab deve comportar-se quando um vídeo baixado é encontrado na sua área de transferência.</translation> + <translation>Aqui você pode configurar como ClipGrab deve se comportar quando um vídeo baixado é encontrado na sua área de transferência.</translation> </message> <message> <source>Always download</source> @@ -419,7 +420,7 @@ </message> <message> <source>Here you can change the language of ClipGrab.</source> - <translation>Aqui você pode mudar o idioma de ClipGrab.</translation> + <translation>Aqui você pode mudar o idioma do ClipGrab.</translation> </message> <message> <source>Please select a language from the list below. You have to restart ClipGrab in order to apply you selection.</source> @@ -447,7 +448,7 @@ </message> <message> <source>Audio</source> - <translation>Som</translation> + <translation>Áudio</translation> </message> <message> <source>Codec</source> @@ -459,7 +460,7 @@ </message> <message> <source>Disable Audio</source> - <translation>Desativar o som</translation> + <translation>Desativar áudio</translation> </message> <message> <source>Video</source> @@ -487,7 +488,7 @@ <source><h2>Translation</h2> ClipGrab is already available in many languages. If ClipGrab has not been translated into your language yet and if you want to contribute a translation, please check <a href="http://clipgrab.de/translate">http://clipgrab.de/translate</a> for further information.</source> <translation><h2>Tradução</h2> -ClipGrab já está disponível em vários idiomas. Se ClipGrab ainda não foi traduzido para o seu idioma e você quer contribuir com sua tradução, consulte <a href="http://clipgrab.de/translate">http://clipgrab.de/translate</a> para mais informações.</translation> +ClipGrab já está disponível em vários idiomas. Se o ClipGrab ainda não foi traduzido para o seu idioma e você quer contribuir com sua tradução, consulte <a href="http://clipgrab.de/translate">http://clipgrab.de/translate</a> para mais informações.</translation> </message> <message> <source><h2>Thanks</h2> @@ -499,28 +500,30 @@ </message> <message> <source>Ignore SSL errors</source> - <translation type="unfinished"></translation> + <translation>Ignore erros de SSL</translation> </message> <message> <source><h2>Thanks</h2> ClipGrab relies on the work of the Qt project and the ffmpeg team.<br> Visit <a href="https://www.qt.io">qt.io</a> and <a href="https://ffmpeg.org">ffmpeg.org</a> for further information.</source> - <translation type="unfinished"></translation> + <translation><h2>Thanks</h2> +ClipGrab depende do trabalho do projeto Qt e do time ffmpeg.<br> +Visite <a href="https://www.qt.io">qt.io</a> e <a href="https://ffmpeg.org">ffmpeg.org</a> para mais informações.</translation> </message> <message> <source>Remember logins</source> - <translation type="unfinished"></translation> + <translation>Memorize logins</translation> </message> <message> <source>Remember video quality</source> - <translation type="unfinished"></translation> + <translation>Memorize qualidade de vídeo</translation> </message> </context> <context> <name>MetadataDialog</name> <message> <source>ClipGrab - enter metadata</source> - <translation>ClipGrab - Escriva os metadados</translation> + <translation>ClipGrab - entre os metadados</translation> </message> <message> <source><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> @@ -546,42 +549,42 @@ </message> <message> <source>Please enter the metadata for your download. If you don't want to add metadata, just leave the fields empty.</source> - <translation type="unfinished"></translation> + <translation>Favor entrar os metadados para o seu download. Se você não quiser adicionar metadados, deixe os campos em branco.</translation> </message> </context> <context> <name>UpdateMessage</name> <message> <source>Update for ClipGrab</source> - <translation type="unfinished"></translation> + <translation>Atualização para o ClipGrab</translation> </message> <message> <source>ClipGrab %1 is now available (you are using %2). Would you like to install the update?</source> - <translation type="unfinished"></translation> + <translation>ClipGrab %1 já está disponível (você está usando %2). Você gostaria de instalar a atualização?</translation> </message> <message> <source>There is an update for your version of ClipGrab!</source> - <translation type="unfinished"></translation> + <translation>Existe uma atualização para a sua versão do ClipGrab!</translation> </message> <message> <source>Skip this update</source> - <translation type="unfinished"></translation> + <translation>Ignore esta atualização</translation> </message> <message> <source>Download update</source> - <translation type="unfinished"></translation> + <translation>Baixe a atualização</translation> </message> <message> <source>about:blank</source> - <translation type="unfinished">about:blank</translation> + <translation>about:blank</translation> </message> <message> <source>Remind me later</source> - <translation type="unfinished"></translation> + <translation>Lembre-me mais tarde</translation> </message> <message> <source>The update will begin in just a moment …</source> - <translation type="unfinished"></translation> + <translation>A atualização vai começar em breve ...</translation> </message> </context> <context> @@ -602,7 +605,7 @@ <name>converter_ffmpeg</name> <message> <source>MPEG4</source> - <translation>MPEG-4</translation> + <translation>MPEG4</translation> </message> <message> <source>WMV (Windows)</source> @@ -614,39 +617,39 @@ </message> <message> <source>MP3 (audio only)</source> - <translation>MP3 (apenas som)</translation> + <translation>MP3 (apenas áudio)</translation> </message> <message> <source>OGG Vorbis (audio only)</source> - <translation>OGG Vorbis (apenas som)</translation> + <translation>OGG Vorbis (apenas áudio)</translation> </message> <message> <source>No installed version of avconv or ffmpeg coud be found. Converting files and downloading 1080p videos from YouTube is not supported.</source> - <translation type="unfinished"></translation> + <translation>Não foi possível encontrar versão instalada do avconv ou ffmpeg. Converter arquivos e baixar vídeos 1080p do YouTube não é suportado.</translation> </message> <message> <source>The installed version of %1 is outdated. Downloading 1080p videos from YouTube is not supported.</source> - <translation type="unfinished"></translation> + <translation>A versão instalada do %1 está desatualizada. Baixar vídeos 1080p do YouTuvbe não é suportado.</translation> </message> <message> <source>Original (audio only)</source> - <translation type="unfinished"></translation> + <translation>Original (apenas áudio)</translation> </message> </context> <context> <name>messageDialog</name> <message> <source>Dialog</source> - <translation type="unfinished"></translation> + <translation>Diálogo</translation> </message> <message> <source>Close this message</source> - <translation type="unfinished"></translation> + <translation>Fechar esta mensagem</translation> </message> <message> <source>about:blank</source> - <translation type="unfinished">about:blank</translation> + <translation>about:blank</translation> </message> </context> <context> @@ -673,7 +676,7 @@ </message> <message> <source>Cancelled</source> - <translation type="unfinished"></translation> + <translation>Cancelado</translation> </message> </context> <context> @@ -706,30 +709,30 @@ </message> <message> <source>HD (1080p)</source> - <translation type="unfinished">Alta Definição (HD,1080p)</translation> + <translation>Alta Definição (HD,1080p)</translation> </message> <message> <source>480p</source> - <translation type="unfinished"></translation> + <translation>480p</translation> </message> <message> <source>380p</source> - <translation type="unfinished"></translation> + <translation>380p</translation> </message> <message> <source>240p</source> - <translation type="unfinished"></translation> + <translation>240p</translation> </message> </context> <context> <name>video_facebook</name> <message> <source>HD</source> - <translation type="unfinished">Alta Definição (HD)</translation> + <translation>Alta Definição (HD)</translation> </message> <message> <source>normal</source> - <translation type="unfinished">normal</translation> + <translation>normal</translation> </message> </context> <context> @@ -814,27 +817,27 @@ </message> <message> <source>HD (1440p)</source> - <translation type="unfinished">Alta Definição (HD,720p) {1440p?}</translation> + <translation>Alta Definição (HD,1440p)</translation> </message> <message> <source>4K (2160p)</source> - <translation type="unfinished"></translation> + <translation>4K (2160p)</translation> </message> <message> <source>5K (2880p)</source> - <translation type="unfinished"></translation> + <translation>5K (2880p)</translation> </message> <message> <source>8K (4320p)</source> - <translation type="unfinished"></translation> + <translation>8K (4320p)</translation> </message> <message> <source>Original</source> - <translation type="unfinished">Original</translation> + <translation>Original</translation> </message> <message> <source>8K (4320p60)</source> - <translation type="unfinished"></translation> + <translation>8K (4320p60)</translation> </message> </context> </TS> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/jsrunner.cpp new/clipgrab-3.8.2/jsrunner.cpp --- old/clipgrab-3.8.0/jsrunner.cpp 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/jsrunner.cpp 2019-02-28 08:11:56.000000000 +0100 @@ -7,10 +7,14 @@ page->setAudioMuted(true); } -bool JSRunner::setHtml(QString html) { - QTimer timer; - QEventLoop loop; +JSRunner::~JSRunner() { + this->page->disconnect(); + this->profile->disconnect(); + this->page->deleteLater(); + this->profile->deleteLater(); +} +bool JSRunner::setHtml(QString html) { timer.setSingleShot(true); connect(page, SIGNAL(loadFinished(bool)), this, SLOT(handleHtmlReady(bool))); connect(page, SIGNAL(loadFinished(bool)), &loop, SLOT(quit())); @@ -24,9 +28,6 @@ } QVariant JSRunner::runJavaScript(QString script) { - QTimer timer; - QEventLoop loop; - timer.setSingleShot(true); connect(&timer, SIGNAL(timeout()), &loop, SLOT(quit())); connect(this, SIGNAL(resultAvailable()), &loop, SLOT(quit())); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/jsrunner.h new/clipgrab-3.8.2/jsrunner.h --- old/clipgrab-3.8.0/jsrunner.h 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/jsrunner.h 2019-02-28 08:11:56.000000000 +0100 @@ -13,6 +13,7 @@ public: JSRunner(); + ~JSRunner(); bool setHtml(QString); QVariant runJavaScript(QString); @@ -26,6 +27,8 @@ private: QWebEngineProfile* profile; QWebEnginePage* page; + QTimer timer; + QEventLoop loop; private slots: void handleHtmlReady(bool); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/main.cpp new/clipgrab-3.8.2/main.cpp --- old/clipgrab-3.8.0/main.cpp 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/main.cpp 2019-02-28 08:11:56.000000000 +0100 @@ -39,6 +39,15 @@ QCoreApplication::setOrganizationDomain("clipgrab.de"); QCoreApplication::setApplicationName("ClipGrab"); QCoreApplication::setApplicationVersion(QString(STRINGIZE_VALUE_OF(CLIPGRAB_VERSION)).replace("\"", "")); + + QCommandLineParser parser; + parser.setApplicationDescription("ClipGrab"); + parser.addVersionOption(); + parser.addHelpOption(); + QCommandLineOption startMinimizedOption(QStringList() << "start-minimized", "Hide the ClipGrab window on launch"); + parser.addOption(startMinimizedOption); + parser.process(app); + ClipGrab cg; QTranslator translator; @@ -64,7 +73,9 @@ MainWindow w; w.cg = &cg; w.init(); - w.show(); + if (!parser.isSet(startMinimizedOption)) { + w.show(); + } cg.getUpdateInfo(); return app.exec(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/mainwindow.cpp new/clipgrab-3.8.2/mainwindow.cpp --- old/clipgrab-3.8.0/mainwindow.cpp 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/mainwindow.cpp 2019-02-28 08:11:56.000000000 +0100 @@ -63,7 +63,6 @@ connect(ui.downloadStart, SIGNAL(clicked()), this, SLOT(startDownload())); connect(ui.downloadLineEdit, SIGNAL(textChanged(QString)), cg, SLOT(determinePortal(QString))); connect(this, SIGNAL(itemToRemove(int)), cg, SLOT(removeDownload(int))); - //connect(ui.downloadTree, SIGNAL(doubleClicked(QModelIndex)), this, openFinishedVideo(QModelIndex)); ui.downloadTree->header()->setSectionResizeMode(1, QHeaderView::Stretch); ui.downloadTree->header()->setStretchLastSection(false); ui.downloadTree->header()->setSectionResizeMode(3, QHeaderView::ResizeToContents); @@ -334,7 +333,7 @@ if (currentVideo) { - currentVideo->deleteLater();; + currentVideo->deleteAfterAnalysingFinished();; } currentVideo = portal->createNewInstance(); currentVideo->setUrl(ui.downloadLineEdit->text()); @@ -356,7 +355,7 @@ if (currentVideo) { - currentVideo->deleteLater();; + currentVideo->deleteAfterAnalysingFinished(); } currentVideo = cg->heuristic->createNewInstance(); currentVideo->setUrl(ui.downloadLineEdit->text()); @@ -864,20 +863,9 @@ cg->settings.setValue("MainTab", index); } -void MainWindow::on_downloadTree_doubleClicked(QModelIndex /*index*/) +void MainWindow::on_downloadTree_doubleClicked(QModelIndex modelIndex) { - if (ui.downloadTree->currentIndex().row() != -1) - { - if (cg->isDownloadFinished(ui.downloadTree->topLevelItemCount()-1)) - { - QString targetFile; - cg->downloadProgress(); - targetFile = cg->getDownloadTargetPath(ui.downloadTree->topLevelItemCount()-1 - ui.downloadTree->currentIndex().row()); - QUrl targetFileUrl = QUrl::fromLocalFile(targetFile); - qDebug() << targetFileUrl << targetFileUrl.isValid(); - qDebug() << QDesktopServices::openUrl(targetFileUrl); - } - } + cg->openDownload(modelIndex.row()); } void MainWindow::on_settingsLanguage_currentIndexChanged(int index) @@ -932,7 +920,6 @@ contextMenu.removeAction(restartDownload); contextMenu.removeAction(cancelDownload); #ifdef Q_OS_MAC - qDebug() << "SHOW IN FINDER!"; openFolder->setText(tr("Show in &Finder")); #endif } @@ -960,8 +947,7 @@ } else if (selectedAction == openDownload) { - QString path = cg->getDownloadSaveFileName(selectedVideo); - QDesktopServices::openUrl(QUrl::fromLocalFile(path)); + cg->openDownload(selectedVideo); } else if (selectedAction == openLink) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/mainwindow.h new/clipgrab-3.8.2/mainwindow.h --- old/clipgrab-3.8.0/mainwindow.h 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/mainwindow.h 2019-02-28 08:11:56.000000000 +0100 @@ -82,8 +82,6 @@ void updateVideoInfo(); void targetFileSelected(QString target); - //void openFinishedVideo(QModelIndex); - signals: void itemToRemove(int); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/video.cpp new/clipgrab-3.8.2/video.cpp --- old/clipgrab-3.8.0/video.cpp 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/video.cpp 2019-02-28 08:11:56.000000000 +0100 @@ -32,6 +32,23 @@ _treeItem = NULL; _downloadPaused = false; _isRestarted = false; + _analysingFinished = false; + _deleteAfterAnalysingFinished = false; +} + +void video::deleteAfterAnalysingFinished() +{ + if (_analysingFinished) + { + this->deleteLater(); + } + else + { + this->disconnect(); + connect(this, SIGNAL(analysingFinished()), this, SLOT(slotAnalysingFinished())); + _deleteAfterAnalysingFinished = true; + } + } bool video::supportsSearch() @@ -481,6 +498,11 @@ void video::slotAnalysingFinished() { + if (_deleteAfterAnalysingFinished) + { + return this->deleteLater(); + } + _analysingFinished = true; qDebug() << "Discovered: " << _title; for (int i = 0; i > _supportedQualities.size(); i++) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/video.h new/clipgrab-3.8.2/video.h --- old/clipgrab-3.8.0/video.h 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/video.h 2019-02-28 08:11:56.000000000 +0100 @@ -143,6 +143,8 @@ QPair<qint64, qint64> downloadProgress(); void cancel(); + void deleteAfterAnalysingFinished(); + protected: //* @@ -190,6 +192,8 @@ QPair<qint64, qint64> cachedProgress; bool _downloadPaused; bool _isRestarted; + bool _analysingFinished; + bool _deleteAfterAnalysingFinished; int _step; virtual void parseVideo(QString); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/video_dailymotion.cpp new/clipgrab-3.8.2/video_dailymotion.cpp --- old/clipgrab-3.8.0/video_dailymotion.cpp 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/video_dailymotion.cpp 2019-02-28 08:11:56.000000000 +0100 @@ -102,7 +102,7 @@ QString video_dailymotion::getProperty(QString json, QString property) { JSRunner runner; - return runner.runJavaScript("JSON.parse('" + json + "')" + "['" + property + "']").toString(); + return runner.runJavaScript("var json = " + json + "; json['" + property + "']").toString(); } QString video_dailymotion::getQualityUrl(QString json, QString quality) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/video_vimeo.cpp new/clipgrab-3.8.2/video_vimeo.cpp --- old/clipgrab-3.8.0/video_vimeo.cpp 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/video_vimeo.cpp 2019-02-28 08:11:56.000000000 +0100 @@ -32,6 +32,8 @@ this->_supportsSearch = true; this->_icon = 0; this->_urlRegExp << QRegExp("http[s]?://(www\\.)?vimeo\\.com/(channels/[a-z0-9]+/)?([0-9]+)", Qt::CaseInsensitive); + this->_urlRegExp << QRegExp("http[s]?://(www\\.)?vimeo\\.com/(groups/[a-z0-9]+/videos/)?([0-9]+)", Qt::CaseInsensitive); + this->_urlRegExp << QRegExp("http[s]?://(player.)vimeo\\.com/video/([0-9]+)", Qt::CaseInsensitive); _treeItem = NULL; } @@ -45,13 +47,22 @@ { _originalUrl = url; - _urlRegExp.first().indexIn(url); - if (!_urlRegExp.first().cap(3).isEmpty()) - { - this->_url = QUrl(url); - if (_url.isValid()) + foreach (QRegExp regExp, _urlRegExp) { + regExp.indexIn(url); + if (!regExp.cap(3).isEmpty()) { - return true; + this->_url = QUrl(url); + if (_url.isValid()) + { + return true; + } + } else if (!regExp.cap(2).isEmpty()) + { + this->_url = QUrl("https://vimeo.com/" + regExp.cap(2)); + if (_url.isValid()) + { + return true; + } } } return false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clipgrab-3.8.0/video_youtube.cpp new/clipgrab-3.8.2/video_youtube.cpp --- old/clipgrab-3.8.0/video_youtube.cpp 2019-01-23 15:26:56.000000000 +0100 +++ new/clipgrab-3.8.2/video_youtube.cpp 2019-02-28 08:11:56.000000000 +0100 @@ -320,7 +320,7 @@ } //Is signature parsing required? - expression = QRegExp("\"url_encoded_fmt_stream_map\": ?\"[^\"]*([^a-z])(s=)"); + expression = QRegExp("\"url_encoded_fmt_stream_map\": ?\"([^\"]*([^a-z]))?(s=)"); expression.setMinimal(true); if (this->js.isEmpty() && (hasMPDSignature || expression.indexIn(html) != -1)) {
