12 #include "VideoInfoTag.h" 13 #include "addons/Scraper.h" 14 #include "dbwrappers/Database.h" 15 #include "utils/SortUtils.h" 16 #include "utils/UrlOptions.h" 31 enum class VideoAssetTypeOwner;
32 enum class VideoAssetType;
37 typedef std::vector<field_value> sql_record;
42 #define my_offsetof(TYPE, MEMBER) offsetof(TYPE, MEMBER) 52 #define my_offsetof(TYPE, MEMBER) \ 53 ((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10)) 57 typedef std::vector<CVideoInfoTag> VECMOVIES;
61 class IVideoInfoScannerObserver;
67 VideoDbDetailsNone = 0x00,
68 VideoDbDetailsRating = 0x01,
69 VideoDbDetailsTag = 0x02,
70 VideoDbDetailsShowLink = 0x04,
71 VideoDbDetailsStream = 0x08,
72 VideoDbDetailsCast = 0x10,
73 VideoDbDetailsBookmark = 0x20,
74 VideoDbDetailsUniqueID = 0x40,
75 VideoDbDetailsAll = 0xFF
80 #define VIDEODB_MAX_COLUMNS 24 81 #define VIDEODB_DETAILS_FILEID 1 83 #define VIDEODB_DETAILS_MOVIE_SET_ID VIDEODB_MAX_COLUMNS + 2 84 #define VIDEODB_DETAILS_MOVIE_USER_RATING VIDEODB_MAX_COLUMNS + 3 85 #define VIDEODB_DETAILS_MOVIE_PREMIERED VIDEODB_MAX_COLUMNS + 4 86 #define VIDEODB_DETAILS_MOVIE_SET_NAME VIDEODB_MAX_COLUMNS + 5 87 #define VIDEODB_DETAILS_MOVIE_SET_OVERVIEW VIDEODB_MAX_COLUMNS + 6 88 #define VIDEODB_DETAILS_MOVIE_FILE VIDEODB_MAX_COLUMNS + 7 89 #define VIDEODB_DETAILS_MOVIE_PATH VIDEODB_MAX_COLUMNS + 8 90 #define VIDEODB_DETAILS_MOVIE_PLAYCOUNT VIDEODB_MAX_COLUMNS + 9 91 #define VIDEODB_DETAILS_MOVIE_LASTPLAYED VIDEODB_MAX_COLUMNS + 10 92 #define VIDEODB_DETAILS_MOVIE_DATEADDED VIDEODB_MAX_COLUMNS + 11 93 #define VIDEODB_DETAILS_MOVIE_RESUME_TIME VIDEODB_MAX_COLUMNS + 12 94 #define VIDEODB_DETAILS_MOVIE_TOTAL_TIME VIDEODB_MAX_COLUMNS + 13 95 #define VIDEODB_DETAILS_MOVIE_PLAYER_STATE VIDEODB_MAX_COLUMNS + 14 96 #define VIDEODB_DETAILS_MOVIE_RATING VIDEODB_MAX_COLUMNS + 15 97 #define VIDEODB_DETAILS_MOVIE_VOTES VIDEODB_MAX_COLUMNS + 16 98 #define VIDEODB_DETAILS_MOVIE_RATING_TYPE VIDEODB_MAX_COLUMNS + 17 99 #define VIDEODB_DETAILS_MOVIE_UNIQUEID_VALUE VIDEODB_MAX_COLUMNS + 18 100 #define VIDEODB_DETAILS_MOVIE_UNIQUEID_TYPE VIDEODB_MAX_COLUMNS + 19 101 #define VIDEODB_DETAILS_MOVIE_HASVERSIONS VIDEODB_MAX_COLUMNS + 20 102 #define VIDEODB_DETAILS_MOVIE_HASEXTRAS VIDEODB_MAX_COLUMNS + 21 103 #define VIDEODB_DETAILS_MOVIE_ISDEFAULTVERSION VIDEODB_MAX_COLUMNS + 22 104 #define VIDEODB_DETAILS_MOVIE_VERSION_FILEID VIDEODB_MAX_COLUMNS + 23 105 #define VIDEODB_DETAILS_MOVIE_VERSION_TYPEID VIDEODB_MAX_COLUMNS + 24 106 #define VIDEODB_DETAILS_MOVIE_VERSION_TYPENAME VIDEODB_MAX_COLUMNS + 25 107 #define VIDEODB_DETAILS_MOVIE_VERSION_ITEMTYPE VIDEODB_MAX_COLUMNS + 26 109 #define VIDEODB_DETAILS_EPISODE_TVSHOW_ID VIDEODB_MAX_COLUMNS + 2 110 #define VIDEODB_DETAILS_EPISODE_USER_RATING VIDEODB_MAX_COLUMNS + 3 111 #define VIDEODB_DETAILS_EPISODE_SEASON_ID VIDEODB_MAX_COLUMNS + 4 112 #define VIDEODB_DETAILS_EPISODE_FILE VIDEODB_MAX_COLUMNS + 5 113 #define VIDEODB_DETAILS_EPISODE_PATH VIDEODB_MAX_COLUMNS + 6 114 #define VIDEODB_DETAILS_EPISODE_PLAYCOUNT VIDEODB_MAX_COLUMNS + 7 115 #define VIDEODB_DETAILS_EPISODE_LASTPLAYED VIDEODB_MAX_COLUMNS + 8 116 #define VIDEODB_DETAILS_EPISODE_DATEADDED VIDEODB_MAX_COLUMNS + 9 117 #define VIDEODB_DETAILS_EPISODE_TVSHOW_NAME VIDEODB_MAX_COLUMNS + 10 118 #define VIDEODB_DETAILS_EPISODE_TVSHOW_GENRE VIDEODB_MAX_COLUMNS + 11 119 #define VIDEODB_DETAILS_EPISODE_TVSHOW_STUDIO VIDEODB_MAX_COLUMNS + 12 120 #define VIDEODB_DETAILS_EPISODE_TVSHOW_AIRED VIDEODB_MAX_COLUMNS + 13 121 #define VIDEODB_DETAILS_EPISODE_TVSHOW_MPAA VIDEODB_MAX_COLUMNS + 14 122 #define VIDEODB_DETAILS_EPISODE_RESUME_TIME VIDEODB_MAX_COLUMNS + 15 123 #define VIDEODB_DETAILS_EPISODE_TOTAL_TIME VIDEODB_MAX_COLUMNS + 16 124 #define VIDEODB_DETAILS_EPISODE_PLAYER_STATE VIDEODB_MAX_COLUMNS + 17 125 #define VIDEODB_DETAILS_EPISODE_RATING VIDEODB_MAX_COLUMNS + 18 126 #define VIDEODB_DETAILS_EPISODE_VOTES VIDEODB_MAX_COLUMNS + 19 127 #define VIDEODB_DETAILS_EPISODE_RATING_TYPE VIDEODB_MAX_COLUMNS + 20 128 #define VIDEODB_DETAILS_EPISODE_UNIQUEID_VALUE VIDEODB_MAX_COLUMNS + 21 129 #define VIDEODB_DETAILS_EPISODE_UNIQUEID_TYPE VIDEODB_MAX_COLUMNS + 22 131 #define VIDEODB_DETAILS_TVSHOW_USER_RATING VIDEODB_MAX_COLUMNS + 1 132 #define VIDEODB_DETAILS_TVSHOW_DURATION VIDEODB_MAX_COLUMNS + 2 133 #define VIDEODB_DETAILS_TVSHOW_PARENTPATHID VIDEODB_MAX_COLUMNS + 3 134 #define VIDEODB_DETAILS_TVSHOW_PATH VIDEODB_MAX_COLUMNS + 4 135 #define VIDEODB_DETAILS_TVSHOW_DATEADDED VIDEODB_MAX_COLUMNS + 5 136 #define VIDEODB_DETAILS_TVSHOW_LASTPLAYED VIDEODB_MAX_COLUMNS + 6 137 #define VIDEODB_DETAILS_TVSHOW_NUM_EPISODES VIDEODB_MAX_COLUMNS + 7 138 #define VIDEODB_DETAILS_TVSHOW_NUM_WATCHED VIDEODB_MAX_COLUMNS + 8 139 #define VIDEODB_DETAILS_TVSHOW_NUM_SEASONS VIDEODB_MAX_COLUMNS + 9 140 #define VIDEODB_DETAILS_TVSHOW_RATING VIDEODB_MAX_COLUMNS + 10 141 #define VIDEODB_DETAILS_TVSHOW_VOTES VIDEODB_MAX_COLUMNS + 11 142 #define VIDEODB_DETAILS_TVSHOW_RATING_TYPE VIDEODB_MAX_COLUMNS + 12 143 #define VIDEODB_DETAILS_TVSHOW_UNIQUEID_VALUE VIDEODB_MAX_COLUMNS + 13 144 #define VIDEODB_DETAILS_TVSHOW_UNIQUEID_TYPE VIDEODB_MAX_COLUMNS + 14 145 #define VIDEODB_DETAILS_TVSHOW_NUM_INPROGRESS VIDEODB_MAX_COLUMNS + 15 147 #define VIDEODB_DETAILS_MUSICVIDEO_USER_RATING VIDEODB_MAX_COLUMNS + 2 148 #define VIDEODB_DETAILS_MUSICVIDEO_PREMIERED VIDEODB_MAX_COLUMNS + 3 149 #define VIDEODB_DETAILS_MUSICVIDEO_FILE VIDEODB_MAX_COLUMNS + 4 150 #define VIDEODB_DETAILS_MUSICVIDEO_PATH VIDEODB_MAX_COLUMNS + 5 151 #define VIDEODB_DETAILS_MUSICVIDEO_PLAYCOUNT VIDEODB_MAX_COLUMNS + 6 152 #define VIDEODB_DETAILS_MUSICVIDEO_LASTPLAYED VIDEODB_MAX_COLUMNS + 7 153 #define VIDEODB_DETAILS_MUSICVIDEO_DATEADDED VIDEODB_MAX_COLUMNS + 8 154 #define VIDEODB_DETAILS_MUSICVIDEO_RESUME_TIME VIDEODB_MAX_COLUMNS + 9 155 #define VIDEODB_DETAILS_MUSICVIDEO_TOTAL_TIME VIDEODB_MAX_COLUMNS + 10 156 #define VIDEODB_DETAILS_MUSICVIDEO_PLAYER_STATE VIDEODB_MAX_COLUMNS + 11 157 #define VIDEODB_DETAILS_MUSICVIDEO_UNIQUEID_VALUE VIDEODB_MAX_COLUMNS + 12 158 #define VIDEODB_DETAILS_MUSICVIDEO_UNIQUEID_TYPE VIDEODB_MAX_COLUMNS + 13 160 #define VIDEODB_TYPE_UNUSED 0 161 #define VIDEODB_TYPE_STRING 1 162 #define VIDEODB_TYPE_INT 2 163 #define VIDEODB_TYPE_FLOAT 3 164 #define VIDEODB_TYPE_BOOL 4 165 #define VIDEODB_TYPE_COUNT 5 166 #define VIDEODB_TYPE_STRINGARRAY 6 167 #define VIDEODB_TYPE_DATE 7 168 #define VIDEODB_TYPE_DATETIME 8 170 enum class VideoDbContentType
184 VIDEODB_ID_TITLE = 0,
186 VIDEODB_ID_PLOTOUTLINE = 2,
187 VIDEODB_ID_TAGLINE = 3,
188 VIDEODB_ID_VOTES = 4,
189 VIDEODB_ID_RATING_ID = 5,
190 VIDEODB_ID_CREDITS = 6,
192 VIDEODB_ID_THUMBURL = 8,
193 VIDEODB_ID_IDENT_ID = 9,
194 VIDEODB_ID_SORTTITLE = 10,
195 VIDEODB_ID_RUNTIME = 11,
196 VIDEODB_ID_MPAA = 12,
197 VIDEODB_ID_TOP250 = 13,
198 VIDEODB_ID_GENRE = 14,
199 VIDEODB_ID_DIRECTOR = 15,
200 VIDEODB_ID_ORIGINALTITLE = 16,
201 VIDEODB_ID_THUMBURL_SPOOF = 17,
202 VIDEODB_ID_STUDIOS = 18,
203 VIDEODB_ID_TRAILER = 19,
204 VIDEODB_ID_FANART = 20,
205 VIDEODB_ID_COUNTRY = 21,
206 VIDEODB_ID_BASEPATH = 22,
207 VIDEODB_ID_PARENTPATHID = 23,
217 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTitle) },
218 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPlot) },
219 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPlotOutline) },
220 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTagLine) },
221 { VIDEODB_TYPE_UNUSED, 0 },
222 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdRating) },
223 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_writingCredits) },
224 { VIDEODB_TYPE_UNUSED, 0 },
225 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPictureURL.m_data) },
226 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdUniqueID) },
227 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strSortTitle) },
229 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strMPAARating) },
231 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_genre) },
232 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_director) },
233 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strOriginalTitle) },
234 { VIDEODB_TYPE_UNUSED, 0 },
235 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_studio) },
236 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTrailer) },
237 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_fanart.m_xml) },
238 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_country) },
239 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_basePath) },
240 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_parentPathID) }
245 VIDEODB_ID_TV_MIN = -1,
246 VIDEODB_ID_TV_TITLE = 0,
247 VIDEODB_ID_TV_PLOT = 1,
248 VIDEODB_ID_TV_STATUS = 2,
249 VIDEODB_ID_TV_VOTES = 3,
250 VIDEODB_ID_TV_RATING_ID = 4,
251 VIDEODB_ID_TV_PREMIERED = 5,
252 VIDEODB_ID_TV_THUMBURL = 6,
253 VIDEODB_ID_TV_THUMBURL_SPOOF = 7,
254 VIDEODB_ID_TV_GENRE = 8,
255 VIDEODB_ID_TV_ORIGINALTITLE = 9,
256 VIDEODB_ID_TV_EPISODEGUIDE = 10,
257 VIDEODB_ID_TV_FANART = 11,
258 VIDEODB_ID_TV_IDENT_ID = 12,
259 VIDEODB_ID_TV_MPAA = 13,
260 VIDEODB_ID_TV_STUDIOS = 14,
261 VIDEODB_ID_TV_SORTTITLE = 15,
262 VIDEODB_ID_TV_TRAILER = 16,
268 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTitle) },
269 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPlot) },
270 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strStatus) },
271 { VIDEODB_TYPE_UNUSED, 0 },
272 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdRating) },
273 { VIDEODB_TYPE_DATE, my_offsetof(
CVideoInfoTag,m_premiered) },
274 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPictureURL.m_data) },
275 { VIDEODB_TYPE_UNUSED, 0 },
276 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_genre) },
277 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strOriginalTitle)},
278 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strEpisodeGuide)},
279 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_fanart.m_xml)},
280 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdUniqueID)},
281 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strMPAARating)},
282 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_studio)},
283 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strSortTitle)},
284 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTrailer)}
290 VIDEODB_ID_SEASON_MIN = -1,
291 VIDEODB_ID_SEASON_ID = 0,
292 VIDEODB_ID_SEASON_TVSHOW_ID = 1,
293 VIDEODB_ID_SEASON_NUMBER = 2,
294 VIDEODB_ID_SEASON_NAME = 3,
295 VIDEODB_ID_SEASON_USER_RATING = 4,
296 VIDEODB_ID_SEASON_TVSHOW_PATH = 5,
297 VIDEODB_ID_SEASON_TVSHOW_TITLE = 6,
298 VIDEODB_ID_SEASON_TVSHOW_PLOT = 7,
299 VIDEODB_ID_SEASON_TVSHOW_PREMIERED = 8,
300 VIDEODB_ID_SEASON_TVSHOW_GENRE = 9,
301 VIDEODB_ID_SEASON_TVSHOW_STUDIO = 10,
302 VIDEODB_ID_SEASON_TVSHOW_MPAA = 11,
303 VIDEODB_ID_SEASON_EPISODES_TOTAL = 12,
304 VIDEODB_ID_SEASON_EPISODES_WATCHED = 13,
305 VIDEODB_ID_SEASON_PREMIERED = 14,
306 VIDEODB_ID_SEASON_EPISODES_INPROGRESS = 15,
307 VIDEODB_ID_SEASON_MAX
308 } VIDEODB_SEASON_IDS;
312 VIDEODB_ID_EPISODE_MIN = -1,
313 VIDEODB_ID_EPISODE_TITLE = 0,
314 VIDEODB_ID_EPISODE_PLOT = 1,
315 VIDEODB_ID_EPISODE_VOTES = 2,
316 VIDEODB_ID_EPISODE_RATING_ID = 3,
317 VIDEODB_ID_EPISODE_CREDITS = 4,
318 VIDEODB_ID_EPISODE_AIRED = 5,
319 VIDEODB_ID_EPISODE_THUMBURL = 6,
320 VIDEODB_ID_EPISODE_THUMBURL_SPOOF = 7,
321 VIDEODB_ID_EPISODE_PLAYCOUNT = 8,
322 VIDEODB_ID_EPISODE_RUNTIME = 9,
323 VIDEODB_ID_EPISODE_DIRECTOR = 10,
324 VIDEODB_ID_EPISODE_PRODUCTIONCODE = 11,
325 VIDEODB_ID_EPISODE_SEASON = 12,
326 VIDEODB_ID_EPISODE_EPISODE = 13,
327 VIDEODB_ID_EPISODE_ORIGINALTITLE = 14,
328 VIDEODB_ID_EPISODE_SORTSEASON = 15,
329 VIDEODB_ID_EPISODE_SORTEPISODE = 16,
330 VIDEODB_ID_EPISODE_BOOKMARK = 17,
331 VIDEODB_ID_EPISODE_BASEPATH = 18,
332 VIDEODB_ID_EPISODE_PARENTPATHID = 19,
333 VIDEODB_ID_EPISODE_IDENT_ID = 20,
334 VIDEODB_ID_EPISODE_MAX
335 } VIDEODB_EPISODE_IDS;
339 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTitle) },
340 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPlot) },
341 { VIDEODB_TYPE_UNUSED, 0 },
342 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdRating) },
343 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_writingCredits) },
344 { VIDEODB_TYPE_DATE, my_offsetof(
CVideoInfoTag,m_firstAired) },
345 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPictureURL.m_data) },
346 { VIDEODB_TYPE_UNUSED, 0 },
347 { VIDEODB_TYPE_UNUSED, 0 },
349 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_director) },
350 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strProductionCode) },
353 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strOriginalTitle)},
354 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iSpecialSortSeason) },
355 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iSpecialSortEpisode) },
356 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iBookmarkId) },
357 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_basePath) },
358 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_parentPathID) },
359 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdUniqueID) }
364 VIDEODB_ID_MUSICVIDEO_MIN = -1,
365 VIDEODB_ID_MUSICVIDEO_TITLE = 0,
366 VIDEODB_ID_MUSICVIDEO_THUMBURL = 1,
367 VIDEODB_ID_MUSICVIDEO_THUMBURL_SPOOF = 2,
368 VIDEODB_ID_MUSICVIDEO_PLAYCOUNT = 3,
369 VIDEODB_ID_MUSICVIDEO_RUNTIME = 4,
370 VIDEODB_ID_MUSICVIDEO_DIRECTOR = 5,
371 VIDEODB_ID_MUSICVIDEO_STUDIOS = 6,
372 VIDEODB_ID_MUSICVIDEO_YEAR = 7,
373 VIDEODB_ID_MUSICVIDEO_PLOT = 8,
374 VIDEODB_ID_MUSICVIDEO_ALBUM = 9,
375 VIDEODB_ID_MUSICVIDEO_ARTIST = 10,
376 VIDEODB_ID_MUSICVIDEO_GENRE = 11,
377 VIDEODB_ID_MUSICVIDEO_TRACK = 12,
378 VIDEODB_ID_MUSICVIDEO_BASEPATH = 13,
379 VIDEODB_ID_MUSICVIDEO_PARENTPATHID = 14,
380 VIDEODB_ID_MUSICVIDEO_IDENT_ID = 15,
381 VIDEODB_ID_MUSICVIDEO_MAX
382 } VIDEODB_MUSICVIDEO_IDS;
386 { VIDEODB_TYPE_STRING, my_offsetof(
class CVideoInfoTag,m_strTitle) },
387 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPictureURL.m_data) },
388 { VIDEODB_TYPE_UNUSED, 0 },
389 { VIDEODB_TYPE_UNUSED, 0 },
391 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_director) },
392 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_studio) },
393 { VIDEODB_TYPE_UNUSED, 0 },
394 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPlot) },
395 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strAlbum) },
396 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_artist) },
397 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_genre) },
399 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_basePath) },
400 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_parentPathID) },
401 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdUniqueID)}
404 enum class ArtFallbackOptions
410 enum class DeleteMovieCascadeAction
416 #define COMPARE_PERCENTAGE 0.90f // 90% 417 #define COMPARE_PERCENTAGE_MIN 0.50f // 50% 436 std::vector<std::string> genre;
447 DatabaseResults results;
453 bool Open()
override;
454 bool CommitTransaction()
override;
490 int GetPlayCount(
const std::string& strFilenameAndPath);
497 CDateTime GetLastPlayed(
const std::string& strFilenameAndPath);
513 bool GetPlayCounts(
const std::string &path,
CFileItemList &items);
515 void UpdateMovieTitle(
int idMovie,
516 const std::string& strNewMovieTitle,
517 VideoDbContentType iType = VideoDbContentType::MOVIES);
518 bool UpdateVideoSortTitle(
int idDb,
519 const std::string& strNewSortTitle,
520 VideoDbContentType iType = VideoDbContentType::MOVIES);
522 bool HasMovieInfo(
const std::string& strFilenameAndPath);
523 bool HasTvShowInfo(
const std::string& strFilenameAndPath);
524 bool HasEpisodeInfo(
const std::string& strFilenameAndPath);
525 bool HasMusicVideoInfo(
const std::string& strFilenameAndPath);
527 void GetFilePathById(
int idMovie, std::string& filePath, VideoDbContentType iType);
528 std::string GetGenreById(
int id);
529 std::string GetCountryById(
int id);
530 std::string GetSetById(
int id);
531 std::string GetTagById(
int id);
532 std::string GetPersonById(
int id);
533 std::string GetStudioById(
int id);
534 std::string GetTvShowTitleById(
int id);
535 std::string GetMusicVideoAlbumById(
int id);
536 int GetTvShowForEpisode(
int idEpisode);
537 int GetSeasonForEpisode(
int idEpisode);
539 bool LoadVideoInfo(
const std::string& strFilenameAndPath,
CVideoInfoTag& details,
int getDetails = VideoDbDetailsAll);
540 bool GetMovieInfo(
const std::string& strFilenameAndPath,
544 int getDetails = VideoDbDetailsAll);
545 bool GetTvShowInfo(
const std::string& strPath,
CVideoInfoTag& details,
int idTvShow = -1,
CFileItem* item = NULL,
int getDetails = VideoDbDetailsAll);
548 bool GetSeasonInfo(
int idSeason,
CVideoInfoTag& details,
bool allDetails =
true);
549 bool GetEpisodeBasicInfo(
const std::string& strFilenameAndPath,
CVideoInfoTag& details,
int idEpisode = -1);
550 bool GetEpisodeInfo(
const std::string& strFilenameAndPath,
CVideoInfoTag& details,
int idEpisode = -1,
int getDetails = VideoDbDetailsAll);
551 bool GetMusicVideoInfo(
const std::string& strFilenameAndPath,
CVideoInfoTag& details,
int idMVideo = -1,
int getDetails = VideoDbDetailsAll);
553 bool GetFileInfo(
const std::string& strFilenameAndPath,
CVideoInfoTag& details,
int idFile = -1);
555 int GetPathId(
const std::string& strPath);
556 int GetTvShowId(
const std::string& strPath);
557 int GetEpisodeId(
const std::string& strFilenameAndPath,
int idEpisode=-1,
int idSeason=-1);
558 int GetSeasonId(
int idShow,
int season);
560 void GetEpisodesByFile(
const std::string& strFilenameAndPath, std::vector<CVideoInfoTag>& episodes);
562 int SetDetailsForItem(
CVideoInfoTag& details,
const std::map<std::string, std::string> &artwork);
563 int SetDetailsForItem(
int id,
const MediaType& mediaType,
CVideoInfoTag& details,
const std::map<std::string, std::string> &artwork);
566 const std::map<std::string, std::string>& artwork,
568 int SetDetailsForMovieSet(
const CVideoInfoTag& details,
const std::map<std::string, std::string> &artwork,
int idSet = -1);
580 int SetDetailsForTvShow(
const std::vector< std::pair<std::string, std::string> > &paths,
CVideoInfoTag& details,
const std::map<std::string, std::string> &artwork,
const std::map<
int, std::map<std::string, std::string> > &seasonArt,
int idTvShow = -1);
581 bool UpdateDetailsForTvShow(
int idTvShow,
CVideoInfoTag &details,
const std::map<std::string, std::string> &artwork,
const std::map<
int, std::map<std::string, std::string> > &seasonArt);
582 int SetDetailsForSeason(
const CVideoInfoTag& details,
const std::map<std::string, std::string> &artwork,
int idShow,
int idSeason = -1);
584 const std::map<std::string, std::string>& artwork,
588 const std::map<std::string, std::string>& artwork,
590 void SetStreamDetailsForFile(
const CStreamDetails& details,
const std::string &strFileNameAndPath);
591 void SetStreamDetailsForFileId(
const CStreamDetails& details,
int idFile);
593 bool SetSingleValue(VideoDbContentType type,
int dbId,
int dbField,
const std::string& strValue);
594 bool SetSingleValue(VideoDbContentType type,
597 const std::string& strValue);
598 bool SetSingleValue(
const std::string &table,
const std::string &fieldName,
const std::string &strValue,
599 const std::string &conditionName =
"",
int conditionValue = -1);
601 int UpdateDetailsForMovie(
int idMovie,
CVideoInfoTag& details,
const std::map<std::string, std::string> &artwork,
const std::set<std::string> &updatedDetails);
603 void DeleteMovie(
int idMovie,
604 bool bKeepId =
false,
605 DeleteMovieCascadeAction action = DeleteMovieCascadeAction::ALL_ASSETS);
606 void DeleteTvShow(
int idTvShow,
bool bKeepId =
false);
607 void DeleteTvShow(
const std::string& strPath);
608 void DeleteSeason(
int idSeason,
bool bKeepId =
false);
609 void DeleteEpisode(
int idEpisode,
bool bKeepId =
false);
610 void DeleteMusicVideo(
int idMusicVideo,
bool bKeepId =
false);
611 void DeleteDetailsForTvShow(
int idTvShow);
612 void DeleteStreamDetails(
int idFile);
613 void RemoveContentForPath(
const std::string& strPath,
CGUIDialogProgress *progress = NULL);
614 void UpdateFanart(
const CFileItem& item, VideoDbContentType type);
615 void DeleteSet(
int idSet);
616 void DeleteTag(
int idTag, VideoDbContentType mediaType);
637 bool GetVideoSettings(
const std::string &filePath,
CVideoSettings &settings);
649 void SetVideoSettings(
int idFile,
const CVideoSettings &settings);
655 void EraseVideoSettings(
const CFileItem &item);
660 void EraseAllVideoSettings();
666 void EraseAllVideoSettings(
const std::string& path);
672 void EraseAllForPath(
const std::string& path);
674 bool GetStackTimes(
const std::string &filePath, std::vector<uint64_t> ×);
675 void SetStackTimes(
const std::string &filePath,
const std::vector<uint64_t> ×);
677 void GetBookMarksForFile(
const std::string& strFilenameAndPath, VECBOOKMARKS& bookmarks, CBookmark::EType type = CBookmark::STANDARD,
bool bAppend=
false,
long partNumber=0);
678 void AddBookMarkToFile(
const std::string& strFilenameAndPath,
const CBookmark &bookmark, CBookmark::EType type = CBookmark::STANDARD);
679 bool GetResumeBookMark(
const std::string& strFilenameAndPath,
CBookmark &bookmark);
680 void DeleteResumeBookMark(
const CFileItem& item);
681 void ClearBookMarkOfFile(
const std::string& strFilenameAndPath,
CBookmark& bookmark, CBookmark::EType type = CBookmark::STANDARD);
682 void ClearBookMarksOfFile(
const std::string& strFilenameAndPath, CBookmark::EType type = CBookmark::STANDARD);
683 void ClearBookMarksOfFile(
int idFile, CBookmark::EType type = CBookmark::STANDARD);
690 bool GetDetailsByTypeAndId(
CFileItem& item, VideoDbContentType type,
int id);
691 CVideoInfoTag GetDetailsByTypeAndId(VideoDbContentType type,
int id);
694 void SetScraperForPath(
const std::string& filePath,
const ADDON::ScraperPtr& info,
const VIDEO::SScanSettings& settings);
695 ADDON::ScraperPtr GetScraperForPath(
const std::string& strPath);
696 ADDON::ScraperPtr GetScraperForPath(
const std::string& strPath,
VIDEO::SScanSettings& settings);
706 ADDON::ScraperPtr GetScraperForPath(
const std::string& strPath,
VIDEO::SScanSettings& settings,
bool& foundDirectly);
716 std::string GetContentForPath(
const std::string& strPath);
724 bool GetItemsForPath(
const std::string &content,
const std::string &path,
CFileItemList &items);
730 bool ScraperInUse(
const std::string &scraperID)
const;
733 bool SetPathHash(
const std::string &path,
const std::string &hash);
734 bool GetPathHash(
const std::string &path, std::string &hash);
735 bool GetPaths(std::set<std::string> &paths);
736 bool GetPathsForTvShow(
int idShow, std::set<int>& paths);
743 bool GetPathsLinkedToTvShow(
int idShow, std::vector<std::string> &paths);
750 bool GetSubPaths(
const std::string& basepath, std::vector< std::pair<int, std::string> >& subpaths);
752 bool GetSourcePath(
const std::string &path, std::string &sourcePath);
753 bool GetSourcePath(
const std::string &path, std::string &sourcePath,
VIDEO::SScanSettings& settings);
756 int GetMatchingMusicVideo(
const std::string& strArtist,
const std::string& strAlbum =
"",
const std::string& strTitle =
"");
759 void GetMoviesByActor(
const std::string& strActor,
CFileItemList& items);
760 void GetTvShowsByActor(
const std::string& strActor,
CFileItemList& items);
761 void GetEpisodesByActor(
const std::string& strActor,
CFileItemList& items);
763 void GetMusicVideosByArtist(
const std::string& strArtist,
CFileItemList& items);
764 void GetMusicVideosByAlbum(
const std::string& strAlbum,
CFileItemList& items);
766 void GetMovieGenresByName(
const std::string& strSearch,
CFileItemList& items);
767 void GetTvShowGenresByName(
const std::string& strSearch,
CFileItemList& items);
768 void GetMusicVideoGenresByName(
const std::string& strSearch,
CFileItemList& items);
770 void GetMovieCountriesByName(
const std::string& strSearch,
CFileItemList& items);
772 void GetMusicVideoAlbumsByName(
const std::string& strSearch,
CFileItemList& items);
774 void GetMovieActorsByName(
const std::string& strSearch,
CFileItemList& items);
775 void GetTvShowsActorsByName(
const std::string& strSearch,
CFileItemList& items);
776 void GetMusicVideoArtistsByName(
const std::string& strSearch,
CFileItemList& items);
778 void GetMovieDirectorsByName(
const std::string& strSearch,
CFileItemList& items);
779 void GetTvShowsDirectorsByName(
const std::string& strSearch,
CFileItemList& items);
780 void GetMusicVideoDirectorsByName(
const std::string& strSearch,
CFileItemList& items);
782 void GetMoviesByName(
const std::string& strSearch,
CFileItemList& items);
783 void GetTvShowsByName(
const std::string& strSearch,
CFileItemList& items);
784 void GetEpisodesByName(
const std::string& strSearch,
CFileItemList& items);
785 void GetMusicVideosByName(
const std::string& strSearch,
CFileItemList& items);
787 void GetEpisodesByPlot(
const std::string& strSearch,
CFileItemList& items);
788 void GetMoviesByPlot(
const std::string& strSearch,
CFileItemList& items);
790 bool LinkMovieToTvshow(
int idMovie,
int idShow,
bool bRemove);
791 bool IsLinkedToTvshow(
int idMovie);
792 bool GetLinksToTvShow(
int idMovie, std::vector<int>& ids);
795 bool GetGenresNav(
const std::string& strBaseDir,
797 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
799 bool countOnly =
false);
800 bool GetCountriesNav(
const std::string& strBaseDir,
802 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
804 bool countOnly =
false);
805 bool GetStudiosNav(
const std::string& strBaseDir,
807 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
809 bool countOnly =
false);
810 bool GetYearsNav(
const std::string& strBaseDir,
812 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
814 bool GetActorsNav(
const std::string& strBaseDir,
816 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
818 bool countOnly =
false);
819 bool GetDirectorsNav(
const std::string& strBaseDir,
821 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
823 bool countOnly =
false);
824 bool GetWritersNav(
const std::string& strBaseDir,
826 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
828 bool countOnly =
false);
829 bool GetSetsNav(
const std::string& strBaseDir,
831 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
833 bool ignoreSingleMovieSets =
false);
834 bool GetTagsNav(
const std::string& strBaseDir,
836 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
838 bool countOnly =
false);
840 bool GetMusicVideoAlbumsNav(
const std::string& strBaseDir,
CFileItemList& items,
int idArtist,
const Filter &filter =
Filter(),
bool countOnly =
false);
842 bool GetMoviesNav(
const std::string& strBaseDir,
CFileItemList& items,
int idGenre=-1,
int idYear=-1,
int idActor=-1,
int idDirector=-1,
int idStudio=-1,
int idCountry=-1,
int idSet=-1,
int idTag=-1,
const SortDescription &sortDescription =
SortDescription(),
int getDetails = VideoDbDetailsNone);
843 bool GetTvShowsNav(
const std::string& strBaseDir,
CFileItemList& items,
int idGenre=-1,
int idYear=-1,
int idActor=-1,
int idDirector=-1,
int idStudio=-1,
int idTag=-1,
const SortDescription &sortDescription =
SortDescription(),
int getDetails = VideoDbDetailsNone);
844 bool GetSeasonsNav(
const std::string& strBaseDir,
CFileItemList& items,
int idActor=-1,
int idDirector=-1,
int idGenre=-1,
int idYear=-1,
int idShow=-1,
bool getLinkedMovies =
true);
845 bool GetEpisodesNav(
const std::string& strBaseDir,
CFileItemList& items,
int idGenre=-1,
int idYear=-1,
int idActor=-1,
int idDirector=-1,
int idShow=-1,
int idSeason=-1,
const SortDescription &sortDescription =
SortDescription(),
int getDetails = VideoDbDetailsNone);
846 bool GetMusicVideosNav(
const std::string& strBaseDir,
CFileItemList& items,
int idGenre=-1,
int idYear=-1,
int idArtist=-1,
int idDirector=-1,
int idStudio=-1,
int idAlbum=-1,
int idTag=-1,
const SortDescription &sortDescription =
SortDescription(),
int getDetails = VideoDbDetailsNone);
848 bool GetRecentlyAddedMoviesNav(
const std::string& strBaseDir,
CFileItemList& items,
unsigned int limit=0,
int getDetails = VideoDbDetailsNone);
849 bool GetRecentlyAddedEpisodesNav(
const std::string& strBaseDir,
CFileItemList& items,
unsigned int limit=0,
int getDetails = VideoDbDetailsNone);
850 bool GetRecentlyAddedMusicVideosNav(
const std::string& strBaseDir,
CFileItemList& items,
unsigned int limit=0,
int getDetails = VideoDbDetailsNone);
851 bool GetInProgressTvShowsNav(
const std::string& strBaseDir,
CFileItemList& items,
unsigned int limit=0,
int getDetails = VideoDbDetailsNone);
854 bool HasContent(VideoDbContentType type);
855 bool HasSets()
const;
857 void CleanDatabase(
CGUIDialogProgressBarHandle* handle = NULL,
const std::set<int>& paths = std::set<int>(),
bool showProgress =
true);
868 int AddFile(
const std::string& url,
869 const std::string& parentPath =
"",
887 int AddFile(
const CVideoInfoTag& details,
const std::string& parentPath =
"");
896 int AddPath(
const std::string& strPath,
const std::string &parentPath =
"",
const CDateTime& dateAdded =
CDateTime());
904 void ExportToXML(
const std::string &path,
bool singleFile =
true,
bool images=
false,
bool actorThumbs=
false,
bool overwrite=
false);
905 void ExportActorThumbs(
const std::string &path,
const CVideoInfoTag& tag,
bool singleFiles,
bool overwrite=
false);
906 void ImportFromXML(
const std::string &path);
907 void DumpToDummyFiles(
const std::string &path);
908 bool ImportArtFromXML(
const TiXmlNode *node, std::map<std::string, std::string> &artwork);
912 bool GetSetsByWhere(
const std::string& strBaseDir,
const Filter &filter,
CFileItemList& items,
bool ignoreSingleMovieSets =
false);
924 bool GetItems(
const std::string& strBaseDir,
925 VideoDbContentType mediaType,
926 const std::string& itemType,
930 std::string GetItemById(
const std::string &itemType,
int id);
938 unsigned int GetRandomMusicVideoIDs(
const std::string& strWhere, std::vector<std::pair<int, int> > &songIDs);
940 static void VideoContentTypeToString(VideoDbContentType type, std::string& out)
944 case VideoDbContentType::MOVIES:
945 out = MediaTypeMovie;
947 case VideoDbContentType::TVSHOWS:
948 out = MediaTypeTvShow;
950 case VideoDbContentType::EPISODES:
951 out = MediaTypeEpisode;
953 case VideoDbContentType::MUSICVIDEOS:
954 out = MediaTypeMusicVideo;
961 void SetArtForItem(
int mediaId,
const MediaType &mediaType,
const std::string &artType,
const std::string &url);
962 void SetArtForItem(
int mediaId,
const MediaType &mediaType,
const std::map<std::string, std::string> &art);
963 bool GetArtForItem(
int mediaId,
const MediaType &mediaType, std::map<std::string, std::string> &art);
964 std::string GetArtForItem(
int mediaId,
const MediaType &mediaType,
const std::string &artType);
975 bool GetArtForAsset(
int assetId,
976 ArtFallbackOptions fallback,
977 std::map<std::string, std::string>& art);
978 bool HasArtForItem(
int mediaId,
const MediaType &mediaType);
979 bool RemoveArtForItem(
int mediaId,
const MediaType &mediaType,
const std::string &artType);
980 bool RemoveArtForItem(
int mediaId,
const MediaType &mediaType,
const std::set<std::string> &artTypes);
981 bool GetTvShowSeasons(
int showId, std::map<int, int> &seasons);
982 bool GetTvShowNamedSeasons(
int showId, std::map<int, std::string> &seasons);
990 std::string GetTvShowNamedSeasonById(
int tvshowId,
int seasonId);
992 bool GetTvShowSeasonArt(
int mediaId, std::map<
int, std::map<std::string, std::string> > &seasonArt);
993 bool GetArtTypes(
const MediaType &mediaType, std::vector<std::string> &artTypes);
1001 std::vector<std::string> GetAvailableArtTypesForItem(
int mediaId,
const MediaType& mediaType);
1010 std::vector<CScraperUrl::SUrlEntry> GetAvailableArtForItem(
1011 int mediaId,
const MediaType& mediaType,
const std::string& artType);
1013 int AddTag(
const std::string &tag);
1014 void AddTagToItem(
int idItem,
int idTag,
const std::string &type);
1015 void RemoveTagFromItem(
int idItem,
int idTag,
const std::string &type);
1016 void RemoveTagsFromItem(
int idItem,
const std::string &type);
1025 int AddSeason(
int showID,
int season,
const std::string& name =
"");
1026 int AddSet(
const std::string& strSet,
1027 const std::string& strOverview =
"",
1028 const bool updateOverview =
true);
1029 void ClearMovieSet(
int idMovie);
1030 void SetMovieSet(
int idMovie,
int idSet);
1031 bool SetVideoUserRating(
int dbId,
int rating,
const MediaType& mediaType);
1032 bool GetUseAllExternalAudioForVideo(
const std::string& videoPath);
1034 std::string GetSetByNameLike(
const std::string& nameLike)
const;
1036 std::string GetVideoItemTitle(VideoDbContentType itemType,
int dbId);
1037 std::string GetVideoVersionById(
int id);
1038 void GetVideoVersions(VideoDbContentType itemType,
1041 VideoAssetType videoAssetType);
1042 void GetDefaultVideoVersion(VideoDbContentType itemType,
int dbId,
CFileItem& item);
1054 bool ConvertVideoToVersion(VideoDbContentType itemType,
1058 VideoAssetType assetType);
1059 void SetDefaultVideoVersion(VideoDbContentType itemType,
int dbId,
int idFile);
1060 void SetVideoVersion(
int idFile,
int idVideoVersion);
1061 int AddVideoVersionType(
const std::string& typeVideoVersion,
1062 VideoAssetTypeOwner owner,
1063 VideoAssetType assetType);
1064 void AddVideoVersion(VideoDbContentType itemType,
1067 VideoAssetType videoAssetType,
1069 void AddPrimaryVideoVersion(VideoDbContentType itemType,
1073 void AddExtrasVideoVersion(VideoDbContentType itemType,
1077 bool RemoveVideoVersion(
int dbId);
1078 bool IsDefaultVideoVersion(
int idFile);
1079 bool GetVideoVersionTypes(VideoDbContentType idContent,
1080 VideoAssetType asset,
1082 void SetVideoVersionDefaultArt(
int dbId,
int idFrom, VideoDbContentType type);
1083 void InitializeVideoVersionTypeTable(
int schemaVersion);
1084 void UpdateVideoVersionTypeTable();
1085 bool GetVideoVersionsNav(
const std::string& strBaseDir,
1087 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
1089 VideoAssetInfo GetVideoVersionInfo(
const std::string& filenameAndPath);
1090 bool GetAssetsForVideo(VideoDbContentType itemType,
1092 VideoAssetType assetType,
1094 bool GetDefaultVersionForVideo(VideoDbContentType itemType,
int mediaId,
CFileItem& item);
1095 bool UpdateAssetsOwner(
const std::string& mediaType,
int dbIdSource,
int dbIdTarget);
1097 int GetMovieId(
const std::string& strFilenameAndPath);
1098 std::string GetMovieTitle(
int idMovie);
1100 int GetFileIdByMovie(
int idMovie);
1101 std::string GetFileBasePathById(
int idFile);
1107 int GetMusicVideoId(
const std::string& strFilenameAndPath);
1127 int GetFileId(
const std::string& url);
1129 int AddToTable(
const std::string& table,
const std::string& firstField,
const std::string& secondField,
const std::string& value);
1130 int UpdateRatings(
int mediaId,
const char *mediaType,
const RatingMap& values,
const std::string& defaultRating);
1131 int AddRatings(
int mediaId,
const char *mediaType,
const RatingMap& values,
const std::string& defaultRating);
1132 int UpdateUniqueIDs(
int mediaId,
const char *mediaType,
const CVideoInfoTag& details);
1133 int AddUniqueIDs(
int mediaId,
const char *mediaType,
const CVideoInfoTag& details);
1134 int AddActor(
const std::string& strActor,
const std::string& thumbURL,
const std::string &thumb =
"");
1145 bool AddPathToTvShow(
int idShow,
const std::string &path,
const std::string &parentPath,
const CDateTime& dateAdded =
CDateTime());
1155 void AddLinkToActor(
int mediaId,
const char *mediaType,
int actorId,
const std::string &role,
int order);
1156 void AddToLinkTable(
int mediaId,
const std::string& mediaType,
const std::string& table,
int valueId,
const char *foreignKey = NULL);
1157 void RemoveFromLinkTable(
int mediaId,
const std::string& mediaType,
const std::string& table,
int valueId,
const char *foreignKey = NULL);
1159 void AddLinksToItem(
int mediaId,
const std::string& mediaType,
const std::string& field,
const std::vector<std::string>& values);
1160 void UpdateLinksToItem(
int mediaId,
const std::string& mediaType,
const std::string& field,
const std::vector<std::string>& values);
1161 void AddActorLinksToItem(
int mediaId,
const std::string& mediaType,
const std::string& field,
const std::vector<std::string>& values);
1162 void UpdateActorLinksToItem(
int mediaId,
const std::string& mediaType,
const std::string& field,
const std::vector<std::string>& values);
1164 void AddCast(
int mediaId,
const char *mediaType,
const std::vector<SActorInfo> &cast);
1166 CVideoInfoTag GetDetailsForMovie(std::unique_ptr<dbiplus::Dataset> &pDS,
int getDetails = VideoDbDetailsNone);
1167 CVideoInfoTag GetDetailsForMovie(
const dbiplus::sql_record*
const record,
int getDetails = VideoDbDetailsNone);
1168 CVideoInfoTag GetDetailsForTvShow(std::unique_ptr<dbiplus::Dataset> &pDS,
int getDetails = VideoDbDetailsNone,
CFileItem* item = NULL);
1169 CVideoInfoTag GetDetailsForTvShow(
const dbiplus::sql_record*
const record,
int getDetails = VideoDbDetailsNone,
CFileItem* item = NULL);
1170 CVideoInfoTag GetBasicDetailsForEpisode(std::unique_ptr<dbiplus::Dataset> &pDS);
1171 CVideoInfoTag GetBasicDetailsForEpisode(
const dbiplus::sql_record*
const record);
1172 CVideoInfoTag GetDetailsForEpisode(std::unique_ptr<dbiplus::Dataset> &pDS,
int getDetails = VideoDbDetailsNone);
1173 CVideoInfoTag GetDetailsForEpisode(
const dbiplus::sql_record*
const record,
int getDetails = VideoDbDetailsNone);
1174 CVideoInfoTag GetDetailsForMusicVideo(std::unique_ptr<dbiplus::Dataset> &pDS,
int getDetails = VideoDbDetailsNone);
1175 CVideoInfoTag GetDetailsForMusicVideo(
const dbiplus::sql_record*
const record,
int getDetails = VideoDbDetailsNone);
1176 bool GetPeopleNav(
const std::string& strBaseDir,
1179 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
1181 bool countOnly =
false);
1182 bool GetNavCommon(
const std::string& strBaseDir,
1185 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
1187 bool countOnly =
false);
1188 void GetCast(
int media_id,
const std::string &media_type, std::vector<SActorInfo> &cast);
1189 void GetTags(
int media_id,
const std::string &media_type, std::vector<std::string> &tags);
1190 void GetRatings(
int media_id,
const std::string &media_type, RatingMap &ratings);
1191 void GetUniqueIDs(
int media_id,
const std::string &media_type,
CVideoInfoTag& details);
1193 void GetDetailsFromDB(std::unique_ptr<dbiplus::Dataset> &pDS,
int min,
int max,
const SDbTableOffsets *offsets,
CVideoInfoTag &details,
int idxOffset = 2);
1194 void GetDetailsFromDB(
const dbiplus::sql_record*
const record,
int min,
int max,
const SDbTableOffsets *offsets,
CVideoInfoTag &details,
int idxOffset = 2);
1198 void CreateTables()
override;
1199 void CreateAnalytics()
override;
1200 void UpdateTables(
int version)
override;
1201 void CreateLinkIndex(
const char *table);
1202 void CreateForeignLinkIndex(
const char *table,
const char *foreignkey);
1207 virtual void CreateViews();
1214 int GetDbId(
const std::string &query);
1221 int RunQuery(
const std::string &sql);
1223 void AppendIdLinkFilter(
const char* field,
const char *table,
const MediaType& mediaType,
const char *view,
const char *viewKey,
const CUrlOptions::UrlOptions& options,
Filter &filter);
1224 void AppendLinkFilter(
const char* field,
const char *table,
const MediaType& mediaType,
const char *view,
const char *viewKey,
const CUrlOptions::UrlOptions& options,
Filter &filter);
1230 bool LookupByFolders(
const std::string &path,
bool shows =
false);
1237 int GetPlayCount(
int iFileId);
1248 int GetMinSchemaVersion()
const override {
return 75; }
1249 int GetSchemaVersion()
const override;
1250 virtual int GetExportVersion()
const {
return 1; }
1251 const char* GetBaseDBName()
const override {
return "MyVideos"; }
1253 void ConstructPath(std::string& strDest,
const std::string& strPath,
const std::string& strFileName);
1254 void SplitPath(
const std::string& strFileNameAndPath, std::string& strPath, std::string& strFileName);
1255 void InvalidatePathHash(
const std::string& strPath);
1262 std::string GetSafeFile(
const std::string &dir,
const std::string &name)
const;
1264 std::vector<int> CleanMediaType(
const std::string &mediaType,
const std::string &cleanableFileIDs,
1265 std::map<int, bool> &pathsDeleteDecisions, std::string &deletedFileIDs,
bool silent);
1267 static void AnnounceRemove(
const std::string& content,
int id,
bool scanning =
false);
1268 static void AnnounceUpdate(
const std::string& content,
int id);
1272 bool FillMovieItem(std::unique_ptr<dbiplus::Dataset>& dataset,
int movieId,
CFileItem& item);
Definition: VideoInfoScanner.h:28
Definition: VideoDatabase.h:432
Definition: VideoDatabase.h:423
Represents a list of files.
Definition: FileItem.h:702
Definition: Database.h:29
Definition: VideoDatabase.h:419
Definition: Bookmark.h:14
Definition: Database.h:11
Definition: StreamDetails.h:92
Definition: Application.h:72
Definition: TestNfsFile.cpp:22
Definition: VideoDatabase.h:442
Definition: Database.h:26
DateTime class, which uses FileTime as it's base.
Definition: XBDateTime.h:63
Definition: settings.py:1
Definition: VideoManagerTypes.h:40
Definition: GUIDialogExtendedProgressBar.h:16
Definition: GUIDialogProgress.h:16
Definition: VideoDatabase.h:211
Definition: SortUtils.h:176
Definition: VideoInfoTag.h:53
Definition: VideoSettings.h:194
Represents a file on a share.
Definition: FileItem.h:102