summaryrefslogtreecommitdiffstats
path: root/daemon/Movie.h
blob: d4373f758773a855903e2ce533ab4f4accf52ef8 (plain) (blame)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef MOVIE_H
#define MOVIE_H

#include <QObject>
#include <QString>
#include <QStringList>

class Movie : public QObject
{
	Q_OBJECT

public:
#ifdef ENABLE_RIPPING
	Movie(const QString &title, QObject *parent = 0);
#endif
	Movie(const QString &title, const QString &isoLocation, QObject *parent = 0);
	Movie(const QString &title, const QString &isoLocation, const QString &mp4Location, QObject *parent = 0);

	QString title() const;
	void setTitle(const QString &title);

	QString isoLocation() const;
	void setIsoLocation(const QString &isoLocation);
	bool hasRipped() const;
	void setRipped(bool ripped);

	QStringList mp4Locations() const;
	void setMp4LocationDirectory(const QString &mp4LocationDirectory);
	bool hasEncoded() const;
	void setEncoded(bool encoded);

	bool hasUploaded() const;
	void setUploaded(bool uploaded);

	quint8 videoTrack() const;
	void setVideoTrack(quint8 videoTrack);
	quint8 audioTrack() const;
	void setAudioTrack(quint8 audioTrack);

	static QString fileNameFromTitle(const QString &title, const QString &extension);
	static QString titleFromISOName(const QString &isoName);


private:
	QString m_title;

	QString m_isoLocation;
	QStringList m_mp4Locations;

	quint8 m_videoTrack;
	quint8 m_audioTrack;

	bool m_hasRipped;
	bool m_hasEncoded;
	bool m_hasUploaded;

signals:
	void trackSet() const;
};

#endif // MOVIE_H