~saruneko/umedia/master

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef YOUTUBEDOWNLOADER_H
#define YOUTUBEDOWNLOADER_H

#include <QObject>
#include <QProcess>
#include <QString>
#include <QDir>
#include "songs.h"

class YouTubeDownloader : public QObject
{
    Q_OBJECT
public:
    explicit YouTubeDownloader(QObject* root, Songs* songs, QObject *parent = 0);

    void start_download(QString url);

signals:

public slots:

private slots:
    void start_conversion();
    void add_file_converted();

private:
    Songs* songs;
    QObject* root;
    QProcess downloadProcess;
    QProcess convertProcess;
    QString cclive;
    QString ffmpeg;
    QString videofile;
    QString newsong;
    QDir* downloadDir;
    QStringList queued;

    void create_download_dir();
};

#endif // YOUTUBEDOWNLOADER_H