#ifndef SEASON_H #define SEASON_H #include #include #include #include "episode.h" class EpisodeList : public QObject { Q_OBJECT public: EpisodeList(QObject *parent = NULL); virtual ~EpisodeList(); void exportXbmcLinks(QDir); void writeDetailed(nw::JsonWriter &jw, const QStringList& releaseGroupPreference) const; void writeAsElement(nw::JsonWriter& jw) const; void readAsElement(nw::JsonReader &jr); void addMovieFile(const VideoFile *movieFile); ///< this takes ownage void addEpisode(Episode* episode); ///< this takes ownage Episode* getEpisodeForNumber(float number); int numberOfEpisodes() const; int numberOfWatchedEpisodes() const; float highestWatchedEpisodeNumber(int min = -1) const; Episode* getEpisodeForPath(const QString &path); QString mostDownloadedReleaseGroup() const; QString favouriteReleaseGroup() const; float highestDownloadedEpisodeNumber() const; QStringList releaseGroups() const; // TODO // move stuff that uses this into this class QList episodes; void setMinimalWatched(int number); void setWatched(int number); void setMaximalWatched(int number); QList missingFiles() const; bool removeFileFromList(QString filepath); bool hasNoFiles(); signals: void beforeWatchCountChanged(int newCount, int oldCount); void watchCountChanged(int oldCount, int newCount); // TODO new, old private slots: void beforeWatchedChanged(bool newValue, bool oldValue); void watchedChanged(bool oldValue, bool newValue); // TODO new, old private: }; #endif // SEASON_H