blob: 493f464e280aa72f1a9212514931060c7299fc4c (
plain)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
#ifndef VIDEO_H
#define VIDEO_H
#include <Poco/DOM/DOMParser.h>
#include <Poco/DOM/Document.h>
#include <Poco/DOM/NamedNodeMap.h>
#include <Poco/DOM/NodeIterator.h>
#include <Poco/DOM/NodeFilter.h>
#include <Poco/DOM/NodeList.h>
#include <Poco/DOM/AutoPtr.h>
#include <Poco/Exception.h>
#include <Poco/Timestamp.h>
#include <Poco/String.h>
#include <vector>
#include <iostream>
#include <memory>
#include <libskindesignerapi/osdelements.h>
#include "viewGridNavigator.h"
#include "XmlObject.h"
#include "MediaContainer.h"
#include "Media.h"
#include "PlexServer.h"
using Poco::XML::DOMParser;
using Poco::XML::Document;
using Poco::XML::NodeIterator;
using Poco::XML::NodeFilter;
using Poco::XML::Node;
using Poco::XML::AutoPtr;
using Poco::Exception;
namespace plexclient
{
class MediaContainer;
class Video: private XmlObject, public cGridElement
{
private:
MediaContainer* m_pParent;
void Parse(Poco::XML::Node* pNode);
public:
Video(Poco::XML::Node* pNode, PlexServer* Server, MediaContainer* parent);
Video() {};
public:
int m_iRatingKey;
std::string m_sKey;
std::string m_sStudio;
MediaType m_tType;
std::string m_sTitle;
std::string m_sOriginalTitle;
std::string m_sGrandparentTitle;
std::string m_sContentRating;
std::string m_sSummary;
long m_lViewoffset;
Poco::Timestamp m_tLastViewedAt;
int m_iYear;
std::string m_sThumb;
std::string m_sGrandparentThumb;
std::string m_sArt;
std::string m_sGrandparentArt;
long m_iDuration;
int m_iViewCount;
double m_dRating;
Poco::Timestamp m_tAddedAt;
Poco::Timestamp m_tUpdatedAt;
Poco::DateTime m_tOriginallyAvailableAt;
std::vector<std::string> m_vGenre;
std::vector<std::string> m_vWriter;
std::vector<std::string> m_vDirector;
std::vector<std::string> m_vCountry;
std::vector<std::string> m_vRole;
std::string m_sCollection;
Media m_Media;
PlexServer* m_pServer;
int m_iMyPlayOffset;
int m_iIndex;
int m_iParentIndex;
virtual std::string GetTitle();
bool SetStream(Stream* stream);
bool UpdateFromServer();
bool SetWatched();
bool SetUnwatched();
std::string ThumbUri();
std::string ArtUri();
std::string GetSubtitleUrl();
// gridElement
virtual void AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bool clear = true, std::function<void(cGridElement*)> OnCached = NULL);
};
}
#endif // VIDEO_H
|