MythTV  master
v2video.h
Go to the documentation of this file.
1 #ifndef V2VIDEO_H
2 #define V2VIDEO_H
3 
6 
9 #include "v2blurayInfo.h"
10 #include "v2videoStreamInfoList.h"
11 #include "v2cutList.h"
12 
13 #define VIDEO_SERVICE QString("/Video/")
14 #define VIDEO_HANDLE QString("Video")
15 
16 class V2Video : public MythHTTPService
17 {
18  Q_OBJECT
19  Q_CLASSINFO("Version", "1.5")
20  Q_CLASSINFO("description", "Methods to access and update Video metadata and related topics")
21  Q_CLASSINFO("LookupVideo", "methods=GET,POST,HEAD")
22  Q_CLASSINFO("GetSavedBookmark", "name=long")
23  Q_CLASSINFO("GetLastPlayPos", "name=long")
24  Q_CLASSINFO("RemoveVideoFromDB", "methods=POST;name=bool")
25  Q_CLASSINFO("AddVideo", "methods=POST;name=bool")
26  Q_CLASSINFO("UpdateVideoWatchedStatus", "methods=POST;name=bool")
27  Q_CLASSINFO("UpdateVideoMetadata", "methods=POST;name=bool")
28 
29  public:
30  V2Video();
31  ~V2Video() override = default;
32  static void RegisterCustomTypes();
33 
34  public slots:
35 
36  static V2VideoMetadataInfo* GetVideo (int Id);
37  static V2VideoMetadataInfo* GetVideoByFileName ( const QString &FileName );
38  static long GetSavedBookmark (int Id );
39  static long GetLastPlayPos (int Id );
40  static V2VideoMetadataInfoList* GetVideoList ( const QString &Folder,
41  const QString &Sort,
42  bool Descending,
43  int StartIndex,
44  int Count );
45  static V2VideoLookupList* LookupVideo ( const QString &Title,
46  const QString &Subtitle,
47  const QString &Inetref,
48  int Season,
49  int Episode,
50  const QString &GrabberType,
51  bool AllowGeneric );
52  static bool RemoveVideoFromDB ( int Id );
53  static bool AddVideo ( const QString &FileName,
54  const QString &HostName );
55 
56  static bool UpdateVideoWatchedStatus ( int Id,
57  bool Watched );
58  bool UpdateVideoMetadata ( int Id,
59  const QString &Title,
60  const QString &SubTitle,
61  const QString &TagLine,
62  const QString &Director,
63  const QString &Studio,
64  const QString &Plot,
65  const QString &Rating,
66  const QString &Inetref,
67  int CollectionRef,
68  const QString &HomePage,
69  int Year,
70  QDate ReleaseDate,
71  float UserRating,
72  int Length,
73  int PlayCount,
74  int Season,
75  int Episode,
76  int ShowLevel,
77  const QString &FileName,
78  const QString &Hash,
79  const QString &CoverFile,
80  int ChildID,
81  bool Browse,
82  bool Watched,
83  bool Processed,
84  const QString &PlayCommand,
85  int Category,
86  const QString &Trailer,
87  const QString &Host,
88  const QString &Screenshot,
89  const QString &Banner,
90  const QString &Fanart,
91  QDate InsertDate,
92  const QString &ContentType,
93  const QString &Genres,
94  const QString &Cast,
95  const QString &Countries
96  );
97 
98  static bool SetSavedBookmark ( int Id,
99  long Offset );
100 
101  static bool SetLastPlayPos ( int Id,
102  long Offset );
103 
104  static V2BlurayInfo* GetBluray ( const QString &Path );
105 
106  static V2VideoStreamInfoList* GetStreamInfo ( const QString &StorageGroup,
107  const QString &FileName );
108 
109  static V2CutList* GetVideoCutList ( int Id,
110  const QString &OffsetType );
111 
112  static V2CutList* GetVideoCommBreak ( int Id,
113  const QString &OffsetType );
114 
115  private:
116  Q_DISABLE_COPY(V2Video)
117 };
118 
119 #endif // V2VIDEO_H
V2Video::~V2Video
~V2Video() override=default
V2VideoStreamInfoList
Definition: v2videoStreamInfoList.h:20
V2Video::AddVideo
static bool AddVideo(const QString &FileName, const QString &HostName)
Definition: v2video.cpp:399
GrabberType
GrabberType
Definition: metadatagrabber.h:20
V2Video::GetVideoCommBreak
static V2CutList * GetVideoCommBreak(int Id, const QString &OffsetType)
Definition: v2video.cpp:1072
v2videoMetadataInfoList.h
V2Video
Definition: v2video.h:16
V2VideoLookupList
Definition: v2videoLookupInfoList.h:21
V2Video::LookupVideo
static V2VideoLookupList * LookupVideo(const QString &Title, const QString &Subtitle, const QString &Inetref, int Season, int Episode, const QString &GrabberType, bool AllowGeneric)
Definition: v2video.cpp:267
V2Video::GetBluray
static V2BlurayInfo * GetBluray(const QString &Path)
Definition: v2video.cpp:904
V2BlurayInfo
Definition: v2blurayInfo.h:20
V2Video::SetLastPlayPos
static bool SetLastPlayPos(int Id, long Offset)
Definition: v2video.cpp:860
V2Video::GetVideo
static V2VideoMetadataInfo * GetVideo(int Id)
Definition: v2video.cpp:55
v2cutList.h
V2Video::GetStreamInfo
static V2VideoStreamInfoList * GetStreamInfo(const QString &StorageGroup, const QString &FileName)
Definition: v2video.cpp:967
V2Video::SetSavedBookmark
static bool SetSavedBookmark(int Id, long Offset)
Definition: v2video.cpp:813
V2Video::UpdateVideoMetadata
bool UpdateVideoMetadata(int Id, const QString &Title, const QString &SubTitle, const QString &TagLine, const QString &Director, const QString &Studio, const QString &Plot, const QString &Rating, const QString &Inetref, int CollectionRef, const QString &HomePage, int Year, QDate ReleaseDate, float UserRating, int Length, int PlayCount, int Season, int Episode, int ShowLevel, const QString &FileName, const QString &Hash, const QString &CoverFile, int ChildID, bool Browse, bool Watched, bool Processed, const QString &PlayCommand, int Category, const QString &Trailer, const QString &Host, const QString &Screenshot, const QString &Banner, const QString &Fanart, QDate InsertDate, const QString &ContentType, const QString &Genres, const QString &Cast, const QString &Countries)
Definition: v2video.cpp:473
v2blurayInfo.h
V2Video::RemoveVideoFromDB
static bool RemoveVideoFromDB(int Id)
Definition: v2video.cpp:383
v2videoLookupInfoList.h
V2CutList
Definition: v2cutList.h:21
MythHTTPService
Definition: mythhttpservice.h:19
V2Video::V2Video
V2Video()
Definition: v2video.cpp:50
videometadatalistmanager.h
mythhttpservice.h
V2Video::GetLastPlayPos
static long GetLastPlayPos(int Id)
Definition: v2video.cpp:140
V2Video::UpdateVideoWatchedStatus
static bool UpdateVideoWatchedStatus(int Id, bool Watched)
Definition: v2video.cpp:455
V2Video::RegisterCustomTypes
static void RegisterCustomTypes()
StorageGroup
Definition: storagegroup.h:11
V2VideoMetadataInfoList
Definition: v2videoMetadataInfoList.h:20
V2Video::GetVideoByFileName
static V2VideoMetadataInfo * GetVideoByFileName(const QString &FileName)
Definition: v2video.cpp:70
V2Video::GetSavedBookmark
static long GetSavedBookmark(int Id)
Definition: v2video.cpp:93
V2Video::GetVideoList
static V2VideoMetadataInfoList * GetVideoList(const QString &Folder, const QString &Sort, bool Descending, int StartIndex, int Count)
Definition: v2video.cpp:184
v2videoStreamInfoList.h
V2Video::GetVideoCutList
static V2CutList * GetVideoCutList(int Id, const QString &OffsetType)
Definition: v2video.cpp:1011
V2VideoMetadataInfo
Definition: v2videoMetadataInfo.h:9