11 #include "XBDateTime.h" 12 #include "utils/EmbeddedArt.h" 13 #include "utils/Fanart.h" 14 #include "utils/ISortable.h" 15 #include "utils/ScraperUrl.h" 16 #include "utils/StreamDetails.h" 17 #include "video/Bookmark.h" 27 enum class VideoAssetType;
33 return order < right.order;
46 explicit CRating(
float r): rating(r) {}
47 CRating(
float r,
int v): rating(r), votes(v) {}
51 typedef std::map<std::string, CRating> RatingMap;
74 bool Load(
const TiXmlElement *element,
bool append =
false,
bool prioritise =
false);
75 bool Save(TiXmlNode *node,
const std::string &tag,
bool savePathInfo =
true,
const TiXmlElement *additionalNode = NULL);
78 void Serialize(
CVariant& value)
const override;
79 void ToSortable(SortItem& sortable, Field field)
const override;
80 const CRating GetRating(std::string type =
"")
const;
81 const std::string& GetDefaultRating()
const;
82 const std::string GetUniqueID(std::string type =
"")
const;
83 const std::map<std::string, std::string>& GetUniqueIDs()
const;
84 const std::string& GetDefaultUniqueID()
const;
85 bool HasUniqueID()
const;
86 virtual bool HasYear()
const;
87 virtual int GetYear()
const;
88 bool HasPremiered()
const;
91 const std::string GetCast(
bool bIncludeRole =
false)
const;
92 bool HasStreamDetails()
const;
95 const std::string& GetPath()
const 97 if (m_strFileNameAndPath.empty())
99 return m_strFileNameAndPath;
105 void SetDuration(
int duration);
110 unsigned int GetDuration()
const;
115 unsigned int GetStaticDuration()
const;
121 static unsigned int GetDurationFromMinuteString(
const std::string &runtime);
123 void SetBasePath(std::string basePath);
124 void SetDirector(std::vector<std::string> director);
125 void SetWritingCredits(std::vector<std::string> writingCredits);
126 void SetGenre(std::vector<std::string> genre);
127 void SetCountry(std::vector<std::string> country);
128 void SetTagLine(std::string tagLine);
129 void SetPlotOutline(std::string plotOutline);
130 void SetTrailer(std::string trailer);
131 void SetPlot(std::string plot);
132 std::string
const& GetTitle()
const;
133 void SetTitle(std::string title);
134 void SetSortTitle(std::string sortTitle);
136 void SetRating(
float rating,
int votes,
const std::string& type =
"",
bool def =
false);
137 void SetRating(
CRating rating,
const std::string& type =
"",
bool def =
false);
138 void SetRating(
float rating,
const std::string& type =
"",
bool def =
false);
139 void RemoveRating(
const std::string& type);
140 void SetRatings(RatingMap ratings,
const std::string& defaultRating =
"");
141 void SetVotes(
int votes,
const std::string& type =
"");
142 void SetUniqueIDs(std::map<std::string, std::string> uniqueIDs);
143 void SetPremiered(
const CDateTime& premiered);
144 void SetPremieredFromDBDate(
const std::string& premieredString);
145 virtual void SetYear(
int year);
146 void SetArtist(std::vector<std::string> artist);
147 void SetSet(std::string
set);
148 void SetSetOverview(std::string setOverview);
149 void SetTags(std::vector<std::string> tags);
150 void SetFile(std::string file);
151 void SetPath(std::string path);
152 void SetMPAARating(std::string mpaaRating);
153 void SetFileNameAndPath(std::string fileNameAndPath);
154 void SetOriginalTitle(std::string originalTitle);
155 void SetEpisodeGuide(std::string episodeGuide);
156 void SetStatus(std::string status);
157 void SetProductionCode(std::string productionCode);
158 void SetShowTitle(std::string showTitle);
159 void SetStudio(std::vector<std::string> studio);
160 void SetAlbum(std::string album);
161 void SetShowLink(std::vector<std::string> showLink);
162 void SetUniqueID(
const std::string& uniqueid,
const std::string& type =
"",
bool def =
false);
163 void RemoveUniqueID(
const std::string& type);
164 void SetNamedSeasons(std::map<int, std::string> namedSeasons);
165 void SetUserrating(
int userrating);
171 virtual int GetPlayCount()
const;
178 virtual bool SetPlayCount(
int count);
184 virtual bool IncrementPlayCount();
189 virtual void ResetPlayCount();
195 virtual bool IsPlayCountSet()
const;
201 virtual CBookmark GetResumePoint()
const;
208 virtual bool SetResumePoint(
const CBookmark &resumePoint);
228 void Save(TiXmlNode* movie);
234 void ParseNative(
const TiXmlElement* movie);
246 void Serialize(
CVariant& value)
const;
252 const std::string&
GetTitle()
const {
return m_title; }
258 void SetTitle(
const std::string& assetTitle);
270 void SetId(
int assetId);
276 VideoAssetType
GetType()
const {
return m_type; }
282 void SetType(VideoAssetType assetType);
287 VideoAssetType m_type{-1};
295 CAssetInfo& GetAssetInfo() {
return m_assetInfo; }
307 void SetHasVideoVersions(
bool hasVersions);
319 void SetHasVideoExtras(
bool hasExtras);
331 void SetIsDefaultVideoVersion(
bool isDefaultVideoVersion);
347 virtual bool SetResumePoint(
double timeInSeconds,
double totalTimeInSeconds,
const std::string &playerState);
349 std::string m_basePath;
351 std::vector<std::string> m_director;
352 std::vector<std::string> m_writingCredits;
353 std::vector<std::string> m_genre;
354 std::vector<std::string> m_country;
355 std::string m_strTagLine;
356 std::string m_strPlotOutline;
357 std::string m_strTrailer;
358 std::string m_strPlot;
360 std::string m_strTitle;
361 std::string m_strSortTitle;
362 std::vector<std::string> m_artist;
363 std::vector< SActorInfo > m_cast;
364 typedef std::vector< SActorInfo >::const_iterator iCast;
372 std::vector<std::string> m_tags;
373 std::string m_strFile;
374 std::string m_strPath;
375 std::string m_strMPAARating;
376 std::string m_strFileNameAndPath;
377 std::string m_strOriginalTitle;
378 std::string m_strEpisodeGuide;
380 bool m_bHasPremiered;
381 std::string m_strStatus;
382 std::string m_strProductionCode;
384 std::string m_strShowTitle;
385 std::vector<std::string> m_studio;
386 std::string m_strAlbum;
388 std::vector<std::string> m_showLink;
389 std::map<int, std::string> m_namedSeasons;
397 int m_iSpecialSortSeason;
398 int m_iSpecialSortEpisode;
426 void ParseNative(
const TiXmlElement* element,
bool prioritise);
428 std::string m_strDefaultRating;
429 std::string m_strDefaultUniqueID;
430 std::map<std::string, std::string> m_uniqueIDs;
431 std::string Trim(std::string &&value);
432 std::vector<std::string> Trim(std::vector<std::string> &&items);
436 static const int PLAYCOUNT_NOT_SET = -1;
439 bool m_hasVideoVersions{
false};
440 bool m_hasVideoExtras{
false};
441 bool m_isDefaultVideoVersion{
false};
443 bool m_updateSetOverview{
true};
446 typedef std::vector<CVideoInfoTag> VECMOVIES;
const CAssetInfo & GetAssetInfo() const
Get the video's asset info.
Definition: VideoInfoTag.h:294
int id
ID of movie set in database.
Definition: VideoInfoTag.h:368
std::vector< EmbeddedArtInfo > m_coverArt
art information
Definition: VideoInfoTag.h:413
Definition: VideoInfoTag.h:42
bool HasVideoExtras() const
Whether the item has video extras.
Definition: VideoInfoTag.h:313
SetInfo m_set
Assigned movie set.
Definition: VideoInfoTag.h:371
/brief CFanart is the core of fanart support and contains all fanart data for a specific show ...
Definition: Fanart.h:30
const std::string & GetTitle() const
Get the video's asset title.
Definition: VideoInfoTag.h:252
Definition: Bookmark.h:14
Definition: VideoInfoTag.h:210
< Struct holding information about a movie set
Definition: VideoInfoTag.h:365
std::string overview
Overview/description of the movie set.
Definition: VideoInfoTag.h:369
Definition: StreamDetails.h:92
VideoAssetType GetType() const
Get the video's asset type.
Definition: VideoInfoTag.h:276
bool IsDefaultVideoVersion() const
Whether the item is the default video version.
Definition: VideoInfoTag.h:325
Definition: ISerializable.h:13
Definition: VideoInfoTag.h:29
bool GetUpdateSetOverview() const
Get whether the Set Overview should be updated. If an NFO contains a <name> but no <overview> then th...
Definition: VideoInfoTag.h:338
bool HasVideoVersions() const
Whether the item has multiple video versions.
Definition: VideoInfoTag.h:301
DateTime class, which uses FileTime as it's base.
Definition: XBDateTime.h:63
Definition: ISortable.h:15
int GetId() const
Get the video's asset id.
Definition: VideoInfoTag.h:264
unsigned int m_duration
duration in seconds
Definition: VideoInfoTag.h:416
Definition: VideoInfoTag.h:53
std::string title
Title of the movie set.
Definition: VideoInfoTag.h:367
Definition: IArchivable.h:13
Definition: ScraperUrl.h:21