added Vimeo download

This commit is contained in:
Martchus 2015-10-14 22:58:55 +02:00
parent 807b76ae07
commit 7b671da37a
5 changed files with 57 additions and 15 deletions

View File

@ -1,14 +1,17 @@
# Video Downloader
A video downloader with Qt 5 GUI.
Currently YouTube is the only maintained platform so this is basically a YouTube downloader.
It allows to download any quality, including the HD qualities. However
1080p streams (and above) are only provided as video-only or audio-only stream
by YouTube which currently need to be downloaded separately and then muxed together.
Currently YouTube and Vimeo are the only maintained platforms.
This is just a downloader. It does not convert or mux anything. You might use
ffmpeg or mkvmerge to convert/remux downloaded videos.
## Supported YouTube quality levels
The downloader allows to download any quality, including the HD qualities. However
1080p streams (and above) are only provided as video-only or audio-only stream
by YouTube which currently need to be downloaded separately and then muxed together.
## TODO
* Fix (or remove) platforms that are not working.
* Mux video-only and audio-only streams.

View File

@ -1,6 +1,7 @@
#include "./adddownloaddialog.h"
#include "../network/youtubedownload.h"
#include "../network/vimeodownload.h"
#include "../network/socksharedownload.h"
#include "../network/bitsharedownload.h"
#include "../network/groovesharkdownload.h"
@ -26,6 +27,7 @@ namespace QtGui {
QStringList AddDownloadDialog::m_knownDownloadTypeNames = QStringList()
<< QStringLiteral("standard http(s)/ftp")
<< QStringLiteral("Youtube")
<< QStringLiteral("Vimeo")
<< QStringLiteral("Grooveshark")
<< QStringLiteral("Sockshare/Putlocker")
<< QStringLiteral("Bitshare")
@ -82,15 +84,17 @@ Download *AddDownloadDialog::result() const
case 1:
return new YoutubeDownload(QUrl(res));
case 2:
return new GroovesharkDownload(res);
return new VimeoDownload(QUrl(res));
case 3:
return new SockshareDownload(QUrl(res));
return new GroovesharkDownload(res);
case 4:
return new BitshareDownload(QUrl(res));
return new SockshareDownload(QUrl(res));
case 5:
return new BitshareDownload(QUrl(res));
case 6:
return new FileNukeDownload(QUrl(res));
#ifdef UNDER_CONSTRUCTION
case 6:
case 7:
return new SpotifyDownload(res);
#endif
default:
@ -143,17 +147,18 @@ void AddDownloadDialog::textChanged(const QString &text)
if(!text.isEmpty()) {
// entered value might be a grooveshark song id
bool isValidGroovesharkId = true;
foreach(QChar c, text)
for(const auto c : text) {
if(!c.isDigit()) {
isValidGroovesharkId = false;
break;
}
}
if(isValidGroovesharkId) {
m_ui->downloadTypeInfoWidget->setHidden(false);
m_ui->addPushButton->setEnabled(true);
m_validInput = true;
m_downloadTypeIndex = 2;
m_downloadTypeIndex = 3;
m_ui->downloadTypeLabel->setText(tr("The entered number will be treated as Grooveshark song id."));
return;
}
@ -175,12 +180,14 @@ void AddDownloadDialog::textChanged(const QString &text)
m_downloadTypeIndex = 0;
if(host.contains(QLatin1String("youtube"), Qt::CaseInsensitive) || host.startsWith(QLatin1String("youtu.be"))) {
m_downloadTypeIndex = 1;
} else if(host.contains(QLatin1String("vimeo"))) {
m_downloadTypeIndex = 2;
} else if(host.contains(QLatin1String("sockshare")) || host.contains(QLatin1String("putlocker"))) {
m_downloadTypeIndex = 4;
} else if(host.contains(QLatin1String("bitshare"))) {
m_downloadTypeIndex = 5;
} else if(host.contains(QLatin1String("filenuke"))) {
} else if(host.contains(QLatin1String("bitshare"))) {
m_downloadTypeIndex = 6;
} else if(host.contains(QLatin1String("filenuke"))) {
m_downloadTypeIndex = 7;
}
if(m_downloadTypeIndex) {
m_ui->downloadTypeLabel->setText(tr("The entered url seems to be from %1 so it will be added as %1 download.").arg(m_knownDownloadTypeNames.at(m_downloadTypeIndex)));

11
network/vimeodownload.cpp Normal file
View File

@ -0,0 +1,11 @@
#include "vimeodownload.h"
namespace Network {
VimeoDownload::VimeoDownload()
{
}
} // namespace Network

19
network/vimeodownload.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef NETWORK_VIMEODOWNLOAD_H
#define NETWORK_VIMEODOWNLOAD_H
namespace Network {
class VimeoDownload
{
public:
VimeoDownload();
signals:
public slots:
};
} // namespace Network
#endif // NETWORK_VIMEODOWNLOAD_H

View File

@ -62,7 +62,8 @@ SOURCES += application/main.cpp \
network/optiondata.cpp \
gui/initiate.cpp \
cli/mainfeatures.cpp \
cli/clidownloadinteraction.cpp
cli/clidownloadinteraction.cpp \
network/vimeodownload.cpp
HEADERS += application/main.h \
network/bitsharedownload.h \
@ -97,7 +98,8 @@ HEADERS += application/main.h \
application/main.h \
gui/initiate.h \
cli/mainfeatures.h \
cli/clidownloadinteraction.h
cli/clidownloadinteraction.h \
network/vimeodownload.h
testdownload {
SOURCES += network/testdownload.cpp