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  bool CollapseSubDirs );
46  static V2VideoLookupList* LookupVideo ( const QString &Title,
47  const QString &Subtitle,
48  const QString &Inetref,
49  int Season,
50  int Episode,
51  const QString &GrabberType,
52  bool AllowGeneric );
53  static bool RemoveVideoFromDB ( int Id );
54  static bool AddVideo ( const QString &FileName,
55  const QString &HostName );
56 
57  static bool UpdateVideoWatchedStatus ( int Id,
58  bool Watched );
59  bool UpdateVideoMetadata ( int Id,
60  const QString &Title,
61  const QString &SubTitle,
62  const QString &TagLine,
63  const QString &Director,
64  const QString &Studio,
65  const QString &Plot,
66  const QString &Rating,
67  const QString &Inetref,
68  int CollectionRef,
69  const QString &HomePage,
70  int Year,
71  QDate ReleaseDate,
72  float UserRating,
73  int Length,
74  int PlayCount,
75  int Season,
76  int Episode,
77  int ShowLevel,
78  const QString &FileName,
79  const QString &Hash,
80  const QString &CoverFile,
81  int ChildID,
82  bool Browse,
83  bool Watched,
84  bool Processed,
85  const QString &PlayCommand,
86  int Category,
87  const QString &Trailer,
88  const QString &Host,
89  const QString &Screenshot,
90  const QString &Banner,
91  const QString &Fanart,
92  QDate InsertDate,
93  const QString &ContentType,
94  const QString &Genres,
95  const QString &Cast,
96  const QString &Countries
97  );
98 
99  static bool SetSavedBookmark ( int Id,
100  long Offset );
101 
102  static bool SetLastPlayPos ( int Id,
103  long Offset );
104 
105  static V2BlurayInfo* GetBluray ( const QString &Path );
106 
107  static V2VideoStreamInfoList* GetStreamInfo ( const QString &StorageGroup,
108  const QString &FileName );
109 
110  static V2CutList* GetVideoCutList ( int Id,
111  const QString &OffsetType );
112 
113  static V2CutList* GetVideoCommBreak ( int Id,
114  const QString &OffsetType );
115 
116  private:
117  Q_DISABLE_COPY(V2Video)
118 };
119 
120 #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:506
V2Video::GetVideoCommBreak
static V2CutList * GetVideoCommBreak(int Id, const QString &OffsetType)
Definition: v2video.cpp:1164
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:376
V2Video::GetBluray
static V2BlurayInfo * GetBluray(const QString &Path)
Definition: v2video.cpp:996
V2BlurayInfo
Definition: v2blurayInfo.h:20
V2Video::SetLastPlayPos
static bool SetLastPlayPos(int Id, long Offset)
Definition: v2video.cpp:952
V2Video::GetVideo
static V2VideoMetadataInfo * GetVideo(int Id)
Definition: v2video.cpp:55
GrabberType
GrabberType
Definition: metadatagrabber.h:20
v2cutList.h
V2Video::GetStreamInfo
static V2VideoStreamInfoList * GetStreamInfo(const QString &StorageGroup, const QString &FileName)
Definition: v2video.cpp:1059
V2Video::SetSavedBookmark
static bool SetSavedBookmark(int Id, long Offset)
Definition: v2video.cpp:905
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:580
v2blurayInfo.h
V2Video::RemoveVideoFromDB
static bool RemoveVideoFromDB(int Id)
Definition: v2video.cpp:490
V2Video::GetVideoList
static V2VideoMetadataInfoList * GetVideoList(const QString &Folder, const QString &Sort, bool Descending, int StartIndex, int Count, bool CollapseSubDirs)
Definition: v2video.cpp:202
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:562
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
v2videoStreamInfoList.h
V2Video::GetVideoCutList
static V2CutList * GetVideoCutList(int Id, const QString &OffsetType)
Definition: v2video.cpp:1103
V2VideoMetadataInfo
Definition: v2videoMetadataInfo.h:9