]> git.vomp.tv Git - vompclient.git/blob - tvmedia.h
Merge branch 'master' of ssh://git.vomp.tv:20022/vompclient into scraper_support
[vompclient.git] / tvmedia.h
1 /*
2     Copyright 2014 Marten Richter
3
4     This file is part of VOMP.
5
6     VOMP is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation; either version 2 of the License, or
9     (at your option) any later version.
10
11     VOMP is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with VOMP; if not, write to the Free Software
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19 */
20
21 #ifndef TVMEDIA_H
22 #define TVMEDIA_H
23
24 #include "defines.h"
25 #include <vector>
26 #include <string>
27
28 class MovieInfo;
29 class SeriesInfo;
30
31 class TVMediaInfo
32 {
33 friend class VDR;
34 public:
35         TVMediaInfo();
36         TVMediaInfo(const TVMediaInfo& info);
37
38         friend bool operator<(const TVMediaInfo& rhs, const TVMediaInfo& lhs);
39
40         void setSeasonThumb() { type_pict=2; container=0; container_member=0;};
41         void setPosterThumb() { type_pict=1; container=0; container_member=0;};
42         void setElement(int cont,int memb) { type_pict=0; container=cont; container_member=memb;};
43         void setMovieInfo(const MovieInfo * mi);
44         void setSeriesInfo(const SeriesInfo * si);
45
46 private:
47         int type; // movie or series
48         int primary_id; //movie or series_id
49         int secondary_id;  //0 or episode id
50         int type_pict; // 0 full info, 1 poster thumb, 2 season thumb
51         int container; // indices the dataelements with picture in movieinfo or seriesinfo
52         int container_member; // index into the container
53 };
54
55 struct TVMedia
56 {
57         unsigned int width;
58         unsigned int height;
59
60         // no filename, file handling is only on the server
61         TVMediaInfo info;
62
63 };
64
65 typedef std::vector<TVMedia> TVMedias;
66
67 struct Actor
68 {
69         std::string name;
70         std::string role;
71         TVMedia thumb;
72 };
73
74 typedef std::vector<Actor> Actors;
75
76 #endif