12 #include "VideoInfoTag.h" 13 #include "addons/Scraper.h" 14 #include "dbwrappers/Database.h" 15 #include "utils/SortUtils.h" 16 #include "utils/UrlOptions.h" 32 typedef std::vector<field_value> sql_record;
37 #define my_offsetof(TYPE, MEMBER) offsetof(TYPE, MEMBER) 47 #define my_offsetof(TYPE, MEMBER) \ 48 ((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10)) 52 typedef std::vector<CVideoInfoTag> VECMOVIES;
56 class IVideoInfoScannerObserver;
62 VideoDbDetailsNone = 0x00,
63 VideoDbDetailsRating = 0x01,
64 VideoDbDetailsTag = 0x02,
65 VideoDbDetailsShowLink = 0x04,
66 VideoDbDetailsStream = 0x08,
67 VideoDbDetailsCast = 0x10,
68 VideoDbDetailsBookmark = 0x20,
69 VideoDbDetailsUniqueID = 0x40,
70 VideoDbDetailsAll = 0xFF
75 #define VIDEODB_MAX_COLUMNS 24 76 #define VIDEODB_DETAILS_FILEID 1 78 #define VIDEODB_DETAILS_MOVIE_SET_ID VIDEODB_MAX_COLUMNS + 2 79 #define VIDEODB_DETAILS_MOVIE_USER_RATING VIDEODB_MAX_COLUMNS + 3 80 #define VIDEODB_DETAILS_MOVIE_PREMIERED VIDEODB_MAX_COLUMNS + 4 81 #define VIDEODB_DETAILS_MOVIE_SET_NAME VIDEODB_MAX_COLUMNS + 5 82 #define VIDEODB_DETAILS_MOVIE_SET_OVERVIEW VIDEODB_MAX_COLUMNS + 6 83 #define VIDEODB_DETAILS_MOVIE_FILE VIDEODB_MAX_COLUMNS + 7 84 #define VIDEODB_DETAILS_MOVIE_PATH VIDEODB_MAX_COLUMNS + 8 85 #define VIDEODB_DETAILS_MOVIE_PLAYCOUNT VIDEODB_MAX_COLUMNS + 9 86 #define VIDEODB_DETAILS_MOVIE_LASTPLAYED VIDEODB_MAX_COLUMNS + 10 87 #define VIDEODB_DETAILS_MOVIE_DATEADDED VIDEODB_MAX_COLUMNS + 11 88 #define VIDEODB_DETAILS_MOVIE_RESUME_TIME VIDEODB_MAX_COLUMNS + 12 89 #define VIDEODB_DETAILS_MOVIE_TOTAL_TIME VIDEODB_MAX_COLUMNS + 13 90 #define VIDEODB_DETAILS_MOVIE_PLAYER_STATE VIDEODB_MAX_COLUMNS + 14 91 #define VIDEODB_DETAILS_MOVIE_RATING VIDEODB_MAX_COLUMNS + 15 92 #define VIDEODB_DETAILS_MOVIE_VOTES VIDEODB_MAX_COLUMNS + 16 93 #define VIDEODB_DETAILS_MOVIE_RATING_TYPE VIDEODB_MAX_COLUMNS + 17 94 #define VIDEODB_DETAILS_MOVIE_UNIQUEID_VALUE VIDEODB_MAX_COLUMNS + 18 95 #define VIDEODB_DETAILS_MOVIE_UNIQUEID_TYPE VIDEODB_MAX_COLUMNS + 19 97 #define VIDEODB_DETAILS_EPISODE_TVSHOW_ID VIDEODB_MAX_COLUMNS + 2 98 #define VIDEODB_DETAILS_EPISODE_USER_RATING VIDEODB_MAX_COLUMNS + 3 99 #define VIDEODB_DETAILS_EPISODE_SEASON_ID VIDEODB_MAX_COLUMNS + 4 100 #define VIDEODB_DETAILS_EPISODE_FILE VIDEODB_MAX_COLUMNS + 5 101 #define VIDEODB_DETAILS_EPISODE_PATH VIDEODB_MAX_COLUMNS + 6 102 #define VIDEODB_DETAILS_EPISODE_PLAYCOUNT VIDEODB_MAX_COLUMNS + 7 103 #define VIDEODB_DETAILS_EPISODE_LASTPLAYED VIDEODB_MAX_COLUMNS + 8 104 #define VIDEODB_DETAILS_EPISODE_DATEADDED VIDEODB_MAX_COLUMNS + 9 105 #define VIDEODB_DETAILS_EPISODE_TVSHOW_NAME VIDEODB_MAX_COLUMNS + 10 106 #define VIDEODB_DETAILS_EPISODE_TVSHOW_GENRE VIDEODB_MAX_COLUMNS + 11 107 #define VIDEODB_DETAILS_EPISODE_TVSHOW_STUDIO VIDEODB_MAX_COLUMNS + 12 108 #define VIDEODB_DETAILS_EPISODE_TVSHOW_AIRED VIDEODB_MAX_COLUMNS + 13 109 #define VIDEODB_DETAILS_EPISODE_TVSHOW_MPAA VIDEODB_MAX_COLUMNS + 14 110 #define VIDEODB_DETAILS_EPISODE_RESUME_TIME VIDEODB_MAX_COLUMNS + 15 111 #define VIDEODB_DETAILS_EPISODE_TOTAL_TIME VIDEODB_MAX_COLUMNS + 16 112 #define VIDEODB_DETAILS_EPISODE_PLAYER_STATE VIDEODB_MAX_COLUMNS + 17 113 #define VIDEODB_DETAILS_EPISODE_RATING VIDEODB_MAX_COLUMNS + 18 114 #define VIDEODB_DETAILS_EPISODE_VOTES VIDEODB_MAX_COLUMNS + 19 115 #define VIDEODB_DETAILS_EPISODE_RATING_TYPE VIDEODB_MAX_COLUMNS + 20 116 #define VIDEODB_DETAILS_EPISODE_UNIQUEID_VALUE VIDEODB_MAX_COLUMNS + 21 117 #define VIDEODB_DETAILS_EPISODE_UNIQUEID_TYPE VIDEODB_MAX_COLUMNS + 22 119 #define VIDEODB_DETAILS_TVSHOW_USER_RATING VIDEODB_MAX_COLUMNS + 1 120 #define VIDEODB_DETAILS_TVSHOW_DURATION VIDEODB_MAX_COLUMNS + 2 121 #define VIDEODB_DETAILS_TVSHOW_PARENTPATHID VIDEODB_MAX_COLUMNS + 3 122 #define VIDEODB_DETAILS_TVSHOW_PATH VIDEODB_MAX_COLUMNS + 4 123 #define VIDEODB_DETAILS_TVSHOW_DATEADDED VIDEODB_MAX_COLUMNS + 5 124 #define VIDEODB_DETAILS_TVSHOW_LASTPLAYED VIDEODB_MAX_COLUMNS + 6 125 #define VIDEODB_DETAILS_TVSHOW_NUM_EPISODES VIDEODB_MAX_COLUMNS + 7 126 #define VIDEODB_DETAILS_TVSHOW_NUM_WATCHED VIDEODB_MAX_COLUMNS + 8 127 #define VIDEODB_DETAILS_TVSHOW_NUM_SEASONS VIDEODB_MAX_COLUMNS + 9 128 #define VIDEODB_DETAILS_TVSHOW_RATING VIDEODB_MAX_COLUMNS + 10 129 #define VIDEODB_DETAILS_TVSHOW_VOTES VIDEODB_MAX_COLUMNS + 11 130 #define VIDEODB_DETAILS_TVSHOW_RATING_TYPE VIDEODB_MAX_COLUMNS + 12 131 #define VIDEODB_DETAILS_TVSHOW_UNIQUEID_VALUE VIDEODB_MAX_COLUMNS + 13 132 #define VIDEODB_DETAILS_TVSHOW_UNIQUEID_TYPE VIDEODB_MAX_COLUMNS + 14 133 #define VIDEODB_DETAILS_TVSHOW_NUM_INPROGRESS VIDEODB_MAX_COLUMNS + 15 135 #define VIDEODB_DETAILS_MUSICVIDEO_USER_RATING VIDEODB_MAX_COLUMNS + 2 136 #define VIDEODB_DETAILS_MUSICVIDEO_PREMIERED VIDEODB_MAX_COLUMNS + 3 137 #define VIDEODB_DETAILS_MUSICVIDEO_FILE VIDEODB_MAX_COLUMNS + 4 138 #define VIDEODB_DETAILS_MUSICVIDEO_PATH VIDEODB_MAX_COLUMNS + 5 139 #define VIDEODB_DETAILS_MUSICVIDEO_PLAYCOUNT VIDEODB_MAX_COLUMNS + 6 140 #define VIDEODB_DETAILS_MUSICVIDEO_LASTPLAYED VIDEODB_MAX_COLUMNS + 7 141 #define VIDEODB_DETAILS_MUSICVIDEO_DATEADDED VIDEODB_MAX_COLUMNS + 8 142 #define VIDEODB_DETAILS_MUSICVIDEO_RESUME_TIME VIDEODB_MAX_COLUMNS + 9 143 #define VIDEODB_DETAILS_MUSICVIDEO_TOTAL_TIME VIDEODB_MAX_COLUMNS + 10 144 #define VIDEODB_DETAILS_MUSICVIDEO_PLAYER_STATE VIDEODB_MAX_COLUMNS + 11 145 #define VIDEODB_DETAILS_MUSICVIDEO_UNIQUEID_VALUE VIDEODB_MAX_COLUMNS + 12 146 #define VIDEODB_DETAILS_MUSICVIDEO_UNIQUEID_TYPE VIDEODB_MAX_COLUMNS + 13 148 #define VIDEODB_TYPE_UNUSED 0 149 #define VIDEODB_TYPE_STRING 1 150 #define VIDEODB_TYPE_INT 2 151 #define VIDEODB_TYPE_FLOAT 3 152 #define VIDEODB_TYPE_BOOL 4 153 #define VIDEODB_TYPE_COUNT 5 154 #define VIDEODB_TYPE_STRINGARRAY 6 155 #define VIDEODB_TYPE_DATE 7 156 #define VIDEODB_TYPE_DATETIME 8 158 enum class VideoDbContentType
172 VIDEODB_ID_TITLE = 0,
174 VIDEODB_ID_PLOTOUTLINE = 2,
175 VIDEODB_ID_TAGLINE = 3,
176 VIDEODB_ID_VOTES = 4,
177 VIDEODB_ID_RATING_ID = 5,
178 VIDEODB_ID_CREDITS = 6,
180 VIDEODB_ID_THUMBURL = 8,
181 VIDEODB_ID_IDENT_ID = 9,
182 VIDEODB_ID_SORTTITLE = 10,
183 VIDEODB_ID_RUNTIME = 11,
184 VIDEODB_ID_MPAA = 12,
185 VIDEODB_ID_TOP250 = 13,
186 VIDEODB_ID_GENRE = 14,
187 VIDEODB_ID_DIRECTOR = 15,
188 VIDEODB_ID_ORIGINALTITLE = 16,
189 VIDEODB_ID_THUMBURL_SPOOF = 17,
190 VIDEODB_ID_STUDIOS = 18,
191 VIDEODB_ID_TRAILER = 19,
192 VIDEODB_ID_FANART = 20,
193 VIDEODB_ID_COUNTRY = 21,
194 VIDEODB_ID_BASEPATH = 22,
195 VIDEODB_ID_PARENTPATHID = 23,
205 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTitle) },
206 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPlot) },
207 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPlotOutline) },
208 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTagLine) },
209 { VIDEODB_TYPE_UNUSED, 0 },
210 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdRating) },
211 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_writingCredits) },
212 { VIDEODB_TYPE_UNUSED, 0 },
213 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPictureURL.m_data) },
214 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdUniqueID) },
215 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strSortTitle) },
217 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strMPAARating) },
219 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_genre) },
220 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_director) },
221 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strOriginalTitle) },
222 { VIDEODB_TYPE_UNUSED, 0 },
223 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_studio) },
224 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTrailer) },
225 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_fanart.m_xml) },
226 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_country) },
227 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_basePath) },
228 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_parentPathID) }
233 VIDEODB_ID_TV_MIN = -1,
234 VIDEODB_ID_TV_TITLE = 0,
235 VIDEODB_ID_TV_PLOT = 1,
236 VIDEODB_ID_TV_STATUS = 2,
237 VIDEODB_ID_TV_VOTES = 3,
238 VIDEODB_ID_TV_RATING_ID = 4,
239 VIDEODB_ID_TV_PREMIERED = 5,
240 VIDEODB_ID_TV_THUMBURL = 6,
241 VIDEODB_ID_TV_THUMBURL_SPOOF = 7,
242 VIDEODB_ID_TV_GENRE = 8,
243 VIDEODB_ID_TV_ORIGINALTITLE = 9,
244 VIDEODB_ID_TV_EPISODEGUIDE = 10,
245 VIDEODB_ID_TV_FANART = 11,
246 VIDEODB_ID_TV_IDENT_ID = 12,
247 VIDEODB_ID_TV_MPAA = 13,
248 VIDEODB_ID_TV_STUDIOS = 14,
249 VIDEODB_ID_TV_SORTTITLE = 15,
250 VIDEODB_ID_TV_TRAILER = 16,
256 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTitle) },
257 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPlot) },
258 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strStatus) },
259 { VIDEODB_TYPE_UNUSED, 0 },
260 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdRating) },
261 { VIDEODB_TYPE_DATE, my_offsetof(
CVideoInfoTag,m_premiered) },
262 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPictureURL.m_data) },
263 { VIDEODB_TYPE_UNUSED, 0 },
264 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_genre) },
265 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strOriginalTitle)},
266 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strEpisodeGuide)},
267 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_fanart.m_xml)},
268 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdUniqueID)},
269 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strMPAARating)},
270 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_studio)},
271 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strSortTitle)},
272 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTrailer)}
278 VIDEODB_ID_SEASON_MIN = -1,
279 VIDEODB_ID_SEASON_ID = 0,
280 VIDEODB_ID_SEASON_TVSHOW_ID = 1,
281 VIDEODB_ID_SEASON_NUMBER = 2,
282 VIDEODB_ID_SEASON_NAME = 3,
283 VIDEODB_ID_SEASON_USER_RATING = 4,
284 VIDEODB_ID_SEASON_TVSHOW_PATH = 5,
285 VIDEODB_ID_SEASON_TVSHOW_TITLE = 6,
286 VIDEODB_ID_SEASON_TVSHOW_PLOT = 7,
287 VIDEODB_ID_SEASON_TVSHOW_PREMIERED = 8,
288 VIDEODB_ID_SEASON_TVSHOW_GENRE = 9,
289 VIDEODB_ID_SEASON_TVSHOW_STUDIO = 10,
290 VIDEODB_ID_SEASON_TVSHOW_MPAA = 11,
291 VIDEODB_ID_SEASON_EPISODES_TOTAL = 12,
292 VIDEODB_ID_SEASON_EPISODES_WATCHED = 13,
293 VIDEODB_ID_SEASON_PREMIERED = 14,
294 VIDEODB_ID_SEASON_EPISODES_INPROGRESS = 15,
295 VIDEODB_ID_SEASON_MAX
296 } VIDEODB_SEASON_IDS;
300 VIDEODB_ID_EPISODE_MIN = -1,
301 VIDEODB_ID_EPISODE_TITLE = 0,
302 VIDEODB_ID_EPISODE_PLOT = 1,
303 VIDEODB_ID_EPISODE_VOTES = 2,
304 VIDEODB_ID_EPISODE_RATING_ID = 3,
305 VIDEODB_ID_EPISODE_CREDITS = 4,
306 VIDEODB_ID_EPISODE_AIRED = 5,
307 VIDEODB_ID_EPISODE_THUMBURL = 6,
308 VIDEODB_ID_EPISODE_THUMBURL_SPOOF = 7,
309 VIDEODB_ID_EPISODE_PLAYCOUNT = 8,
310 VIDEODB_ID_EPISODE_RUNTIME = 9,
311 VIDEODB_ID_EPISODE_DIRECTOR = 10,
312 VIDEODB_ID_EPISODE_PRODUCTIONCODE = 11,
313 VIDEODB_ID_EPISODE_SEASON = 12,
314 VIDEODB_ID_EPISODE_EPISODE = 13,
315 VIDEODB_ID_EPISODE_ORIGINALTITLE = 14,
316 VIDEODB_ID_EPISODE_SORTSEASON = 15,
317 VIDEODB_ID_EPISODE_SORTEPISODE = 16,
318 VIDEODB_ID_EPISODE_BOOKMARK = 17,
319 VIDEODB_ID_EPISODE_BASEPATH = 18,
320 VIDEODB_ID_EPISODE_PARENTPATHID = 19,
321 VIDEODB_ID_EPISODE_IDENT_ID = 20,
322 VIDEODB_ID_EPISODE_MAX
323 } VIDEODB_EPISODE_IDS;
327 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strTitle) },
328 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPlot) },
329 { VIDEODB_TYPE_UNUSED, 0 },
330 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdRating) },
331 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_writingCredits) },
332 { VIDEODB_TYPE_DATE, my_offsetof(
CVideoInfoTag,m_firstAired) },
333 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPictureURL.m_data) },
334 { VIDEODB_TYPE_UNUSED, 0 },
335 { VIDEODB_TYPE_UNUSED, 0 },
337 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_director) },
338 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strProductionCode) },
341 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strOriginalTitle)},
342 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iSpecialSortSeason) },
343 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iSpecialSortEpisode) },
344 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iBookmarkId) },
345 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_basePath) },
346 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_parentPathID) },
347 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdUniqueID) }
352 VIDEODB_ID_MUSICVIDEO_MIN = -1,
353 VIDEODB_ID_MUSICVIDEO_TITLE = 0,
354 VIDEODB_ID_MUSICVIDEO_THUMBURL = 1,
355 VIDEODB_ID_MUSICVIDEO_THUMBURL_SPOOF = 2,
356 VIDEODB_ID_MUSICVIDEO_PLAYCOUNT = 3,
357 VIDEODB_ID_MUSICVIDEO_RUNTIME = 4,
358 VIDEODB_ID_MUSICVIDEO_DIRECTOR = 5,
359 VIDEODB_ID_MUSICVIDEO_STUDIOS = 6,
360 VIDEODB_ID_MUSICVIDEO_YEAR = 7,
361 VIDEODB_ID_MUSICVIDEO_PLOT = 8,
362 VIDEODB_ID_MUSICVIDEO_ALBUM = 9,
363 VIDEODB_ID_MUSICVIDEO_ARTIST = 10,
364 VIDEODB_ID_MUSICVIDEO_GENRE = 11,
365 VIDEODB_ID_MUSICVIDEO_TRACK = 12,
366 VIDEODB_ID_MUSICVIDEO_BASEPATH = 13,
367 VIDEODB_ID_MUSICVIDEO_PARENTPATHID = 14,
368 VIDEODB_ID_MUSICVIDEO_IDENT_ID = 15,
369 VIDEODB_ID_MUSICVIDEO_MAX
370 } VIDEODB_MUSICVIDEO_IDS;
374 { VIDEODB_TYPE_STRING, my_offsetof(
class CVideoInfoTag,m_strTitle) },
375 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPictureURL.m_data) },
376 { VIDEODB_TYPE_UNUSED, 0 },
377 { VIDEODB_TYPE_UNUSED, 0 },
379 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_director) },
380 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_studio) },
381 { VIDEODB_TYPE_UNUSED, 0 },
382 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strPlot) },
383 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_strAlbum) },
384 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_artist) },
385 { VIDEODB_TYPE_STRINGARRAY, my_offsetof(
CVideoInfoTag,m_genre) },
387 { VIDEODB_TYPE_STRING, my_offsetof(
CVideoInfoTag,m_basePath) },
388 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_parentPathID) },
389 { VIDEODB_TYPE_INT, my_offsetof(
CVideoInfoTag,m_iIdUniqueID)}
392 #define COMPARE_PERCENTAGE 0.90f // 90% 393 #define COMPARE_PERCENTAGE_MIN 0.50f // 50% 412 std::vector<std::string> genre;
423 DatabaseResults results;
429 bool Open()
override;
430 bool CommitTransaction()
override;
466 int GetPlayCount(
const std::string& strFilenameAndPath);
473 CDateTime GetLastPlayed(
const std::string& strFilenameAndPath);
489 bool GetPlayCounts(
const std::string &path,
CFileItemList &items);
491 void UpdateMovieTitle(
int idMovie,
492 const std::string& strNewMovieTitle,
493 VideoDbContentType iType = VideoDbContentType::MOVIES);
494 bool UpdateVideoSortTitle(
int idDb,
495 const std::string& strNewSortTitle,
496 VideoDbContentType iType = VideoDbContentType::MOVIES);
498 bool HasMovieInfo(
const std::string& strFilenameAndPath);
499 bool HasTvShowInfo(
const std::string& strFilenameAndPath);
500 bool HasEpisodeInfo(
const std::string& strFilenameAndPath);
501 bool HasMusicVideoInfo(
const std::string& strFilenameAndPath);
503 void GetFilePathById(
int idMovie, std::string& filePath, VideoDbContentType iType);
504 std::string GetGenreById(
int id);
505 std::string GetCountryById(
int id);
506 std::string GetSetById(
int id);
507 std::string GetTagById(
int id);
508 std::string GetPersonById(
int id);
509 std::string GetStudioById(
int id);
510 std::string GetTvShowTitleById(
int id);
511 std::string GetMusicVideoAlbumById(
int id);
512 int GetTvShowForEpisode(
int idEpisode);
513 int GetSeasonForEpisode(
int idEpisode);
515 bool LoadVideoInfo(
const std::string& strFilenameAndPath,
CVideoInfoTag& details,
int getDetails = VideoDbDetailsAll);
516 bool GetMovieInfo(
const std::string& strFilenameAndPath,
CVideoInfoTag& details,
int idMovie = -1,
int getDetails = VideoDbDetailsAll);
517 bool GetTvShowInfo(
const std::string& strPath,
CVideoInfoTag& details,
int idTvShow = -1,
CFileItem* item = NULL,
int getDetails = VideoDbDetailsAll);
520 bool GetSeasonInfo(
int idSeason,
CVideoInfoTag& details,
bool allDetails =
true);
521 bool GetEpisodeBasicInfo(
const std::string& strFilenameAndPath,
CVideoInfoTag& details,
int idEpisode = -1);
522 bool GetEpisodeInfo(
const std::string& strFilenameAndPath,
CVideoInfoTag& details,
int idEpisode = -1,
int getDetails = VideoDbDetailsAll);
523 bool GetMusicVideoInfo(
const std::string& strFilenameAndPath,
CVideoInfoTag& details,
int idMVideo = -1,
int getDetails = VideoDbDetailsAll);
525 bool GetFileInfo(
const std::string& strFilenameAndPath,
CVideoInfoTag& details,
int idFile = -1);
527 int GetPathId(
const std::string& strPath);
528 int GetTvShowId(
const std::string& strPath);
529 int GetEpisodeId(
const std::string& strFilenameAndPath,
int idEpisode=-1,
int idSeason=-1);
530 int GetSeasonId(
int idShow,
int season);
532 void GetEpisodesByFile(
const std::string& strFilenameAndPath, std::vector<CVideoInfoTag>& episodes);
534 int SetDetailsForItem(
CVideoInfoTag& details,
const std::map<std::string, std::string> &artwork);
535 int SetDetailsForItem(
int id,
const MediaType& mediaType,
CVideoInfoTag& details,
const std::map<std::string, std::string> &artwork);
538 const std::map<std::string, std::string>& artwork,
540 int SetDetailsForMovieSet(
const CVideoInfoTag& details,
const std::map<std::string, std::string> &artwork,
int idSet = -1);
552 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);
553 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);
554 int SetDetailsForSeason(
const CVideoInfoTag& details,
const std::map<std::string, std::string> &artwork,
int idShow,
int idSeason = -1);
556 const std::map<std::string, std::string>& artwork,
560 const std::map<std::string, std::string>& artwork,
562 void SetStreamDetailsForFile(
const CStreamDetails& details,
const std::string &strFileNameAndPath);
563 void SetStreamDetailsForFileId(
const CStreamDetails& details,
int idFile);
565 bool SetSingleValue(VideoDbContentType type,
int dbId,
int dbField,
const std::string& strValue);
566 bool SetSingleValue(VideoDbContentType type,
569 const std::string& strValue);
570 bool SetSingleValue(
const std::string &table,
const std::string &fieldName,
const std::string &strValue,
571 const std::string &conditionName =
"",
int conditionValue = -1);
573 int UpdateDetailsForMovie(
int idMovie,
CVideoInfoTag& details,
const std::map<std::string, std::string> &artwork,
const std::set<std::string> &updatedDetails);
575 void DeleteMovie(
int idMovie,
bool bKeepId =
false);
576 void DeleteTvShow(
int idTvShow,
bool bKeepId =
false);
577 void DeleteTvShow(
const std::string& strPath);
578 void DeleteSeason(
int idSeason,
bool bKeepId =
false);
579 void DeleteEpisode(
int idEpisode,
bool bKeepId =
false);
580 void DeleteMusicVideo(
int idMusicVideo,
bool bKeepId =
false);
581 void DeleteDetailsForTvShow(
int idTvShow);
582 void DeleteStreamDetails(
int idFile);
583 void RemoveContentForPath(
const std::string& strPath,
CGUIDialogProgress *progress = NULL);
584 void UpdateFanart(
const CFileItem& item, VideoDbContentType type);
585 void DeleteSet(
int idSet);
586 void DeleteTag(
int idTag, VideoDbContentType mediaType);
607 bool GetVideoSettings(
const std::string &filePath,
CVideoSettings &settings);
619 void SetVideoSettings(
int idFile,
const CVideoSettings &settings);
625 void EraseVideoSettings(
const CFileItem &item);
630 void EraseAllVideoSettings();
636 void EraseAllVideoSettings(
const std::string& path);
642 void EraseAllForPath(
const std::string& path);
644 bool GetStackTimes(
const std::string &filePath, std::vector<uint64_t> ×);
645 void SetStackTimes(
const std::string &filePath,
const std::vector<uint64_t> ×);
647 void GetBookMarksForFile(
const std::string& strFilenameAndPath, VECBOOKMARKS& bookmarks, CBookmark::EType type = CBookmark::STANDARD,
bool bAppend=
false,
long partNumber=0);
648 void AddBookMarkToFile(
const std::string& strFilenameAndPath,
const CBookmark &bookmark, CBookmark::EType type = CBookmark::STANDARD);
649 bool GetResumeBookMark(
const std::string& strFilenameAndPath,
CBookmark &bookmark);
650 void DeleteResumeBookMark(
const CFileItem& item);
651 void ClearBookMarkOfFile(
const std::string& strFilenameAndPath,
CBookmark& bookmark, CBookmark::EType type = CBookmark::STANDARD);
652 void ClearBookMarksOfFile(
const std::string& strFilenameAndPath, CBookmark::EType type = CBookmark::STANDARD);
653 void ClearBookMarksOfFile(
int idFile, CBookmark::EType type = CBookmark::STANDARD);
660 bool GetDetailsByTypeAndId(
CFileItem& item, VideoDbContentType type,
int id);
661 CVideoInfoTag GetDetailsByTypeAndId(VideoDbContentType type,
int id);
664 void SetScraperForPath(
const std::string& filePath,
const ADDON::ScraperPtr& info,
const VIDEO::SScanSettings& settings);
665 ADDON::ScraperPtr GetScraperForPath(
const std::string& strPath);
666 ADDON::ScraperPtr GetScraperForPath(
const std::string& strPath,
VIDEO::SScanSettings& settings);
676 ADDON::ScraperPtr GetScraperForPath(
const std::string& strPath,
VIDEO::SScanSettings& settings,
bool& foundDirectly);
686 std::string GetContentForPath(
const std::string& strPath);
694 bool GetItemsForPath(
const std::string &content,
const std::string &path,
CFileItemList &items);
700 bool ScraperInUse(
const std::string &scraperID)
const;
703 bool SetPathHash(
const std::string &path,
const std::string &hash);
704 bool GetPathHash(
const std::string &path, std::string &hash);
705 bool GetPaths(std::set<std::string> &paths);
706 bool GetPathsForTvShow(
int idShow, std::set<int>& paths);
713 bool GetPathsLinkedToTvShow(
int idShow, std::vector<std::string> &paths);
720 bool GetSubPaths(
const std::string& basepath, std::vector< std::pair<int, std::string> >& subpaths);
722 bool GetSourcePath(
const std::string &path, std::string &sourcePath);
723 bool GetSourcePath(
const std::string &path, std::string &sourcePath,
VIDEO::SScanSettings& settings);
726 int GetMatchingMusicVideo(
const std::string& strArtist,
const std::string& strAlbum =
"",
const std::string& strTitle =
"");
729 void GetMoviesByActor(
const std::string& strActor,
CFileItemList& items);
730 void GetTvShowsByActor(
const std::string& strActor,
CFileItemList& items);
731 void GetEpisodesByActor(
const std::string& strActor,
CFileItemList& items);
733 void GetMusicVideosByArtist(
const std::string& strArtist,
CFileItemList& items);
734 void GetMusicVideosByAlbum(
const std::string& strAlbum,
CFileItemList& items);
736 void GetMovieGenresByName(
const std::string& strSearch,
CFileItemList& items);
737 void GetTvShowGenresByName(
const std::string& strSearch,
CFileItemList& items);
738 void GetMusicVideoGenresByName(
const std::string& strSearch,
CFileItemList& items);
740 void GetMovieCountriesByName(
const std::string& strSearch,
CFileItemList& items);
742 void GetMusicVideoAlbumsByName(
const std::string& strSearch,
CFileItemList& items);
744 void GetMovieActorsByName(
const std::string& strSearch,
CFileItemList& items);
745 void GetTvShowsActorsByName(
const std::string& strSearch,
CFileItemList& items);
746 void GetMusicVideoArtistsByName(
const std::string& strSearch,
CFileItemList& items);
748 void GetMovieDirectorsByName(
const std::string& strSearch,
CFileItemList& items);
749 void GetTvShowsDirectorsByName(
const std::string& strSearch,
CFileItemList& items);
750 void GetMusicVideoDirectorsByName(
const std::string& strSearch,
CFileItemList& items);
752 void GetMoviesByName(
const std::string& strSearch,
CFileItemList& items);
753 void GetTvShowsByName(
const std::string& strSearch,
CFileItemList& items);
754 void GetEpisodesByName(
const std::string& strSearch,
CFileItemList& items);
755 void GetMusicVideosByName(
const std::string& strSearch,
CFileItemList& items);
757 void GetEpisodesByPlot(
const std::string& strSearch,
CFileItemList& items);
758 void GetMoviesByPlot(
const std::string& strSearch,
CFileItemList& items);
760 bool LinkMovieToTvshow(
int idMovie,
int idShow,
bool bRemove);
761 bool IsLinkedToTvshow(
int idMovie);
762 bool GetLinksToTvShow(
int idMovie, std::vector<int>& ids);
765 bool GetGenresNav(
const std::string& strBaseDir,
767 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
769 bool countOnly =
false);
770 bool GetCountriesNav(
const std::string& strBaseDir,
772 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
774 bool countOnly =
false);
775 bool GetStudiosNav(
const std::string& strBaseDir,
777 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
779 bool countOnly =
false);
780 bool GetYearsNav(
const std::string& strBaseDir,
782 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
784 bool GetActorsNav(
const std::string& strBaseDir,
786 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
788 bool countOnly =
false);
789 bool GetDirectorsNav(
const std::string& strBaseDir,
791 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
793 bool countOnly =
false);
794 bool GetWritersNav(
const std::string& strBaseDir,
796 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
798 bool countOnly =
false);
799 bool GetSetsNav(
const std::string& strBaseDir,
801 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
803 bool ignoreSingleMovieSets =
false);
804 bool GetTagsNav(
const std::string& strBaseDir,
806 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
808 bool countOnly =
false);
809 bool GetMusicVideoAlbumsNav(
const std::string& strBaseDir,
CFileItemList& items,
int idArtist,
const Filter &filter =
Filter(),
bool countOnly =
false);
811 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);
812 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);
813 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);
814 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);
815 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);
817 bool GetRecentlyAddedMoviesNav(
const std::string& strBaseDir,
CFileItemList& items,
unsigned int limit=0,
int getDetails = VideoDbDetailsNone);
818 bool GetRecentlyAddedEpisodesNav(
const std::string& strBaseDir,
CFileItemList& items,
unsigned int limit=0,
int getDetails = VideoDbDetailsNone);
819 bool GetRecentlyAddedMusicVideosNav(
const std::string& strBaseDir,
CFileItemList& items,
unsigned int limit=0,
int getDetails = VideoDbDetailsNone);
820 bool GetInProgressTvShowsNav(
const std::string& strBaseDir,
CFileItemList& items,
unsigned int limit=0,
int getDetails = VideoDbDetailsNone);
823 bool HasContent(VideoDbContentType type);
824 bool HasSets()
const;
826 void CleanDatabase(
CGUIDialogProgressBarHandle* handle = NULL,
const std::set<int>& paths = std::set<int>(),
bool showProgress =
true);
837 int AddFile(
const std::string& url,
838 const std::string& parentPath =
"",
856 int AddFile(
const CVideoInfoTag& details,
const std::string& parentPath =
"");
865 int AddPath(
const std::string& strPath,
const std::string &parentPath =
"",
const CDateTime& dateAdded =
CDateTime());
873 void ExportToXML(
const std::string &path,
bool singleFile =
true,
bool images=
false,
bool actorThumbs=
false,
bool overwrite=
false);
874 void ExportActorThumbs(
const std::string &path,
const CVideoInfoTag& tag,
bool singleFiles,
bool overwrite=
false);
875 void ImportFromXML(
const std::string &path);
876 void DumpToDummyFiles(
const std::string &path);
877 bool ImportArtFromXML(
const TiXmlNode *node, std::map<std::string, std::string> &artwork);
881 bool GetSetsByWhere(
const std::string& strBaseDir,
const Filter &filter,
CFileItemList& items,
bool ignoreSingleMovieSets =
false);
893 bool GetItems(
const std::string& strBaseDir,
894 VideoDbContentType mediaType,
895 const std::string& itemType,
899 std::string GetItemById(
const std::string &itemType,
int id);
907 unsigned int GetRandomMusicVideoIDs(
const std::string& strWhere, std::vector<std::pair<int, int> > &songIDs);
909 static void VideoContentTypeToString(VideoDbContentType type, std::string& out)
913 case VideoDbContentType::MOVIES:
914 out = MediaTypeMovie;
916 case VideoDbContentType::TVSHOWS:
917 out = MediaTypeTvShow;
919 case VideoDbContentType::EPISODES:
920 out = MediaTypeEpisode;
922 case VideoDbContentType::MUSICVIDEOS:
923 out = MediaTypeMusicVideo;
930 void SetArtForItem(
int mediaId,
const MediaType &mediaType,
const std::string &artType,
const std::string &url);
931 void SetArtForItem(
int mediaId,
const MediaType &mediaType,
const std::map<std::string, std::string> &art);
932 bool GetArtForItem(
int mediaId,
const MediaType &mediaType, std::map<std::string, std::string> &art);
933 std::string GetArtForItem(
int mediaId,
const MediaType &mediaType,
const std::string &artType);
934 bool HasArtForItem(
int mediaId,
const MediaType &mediaType);
935 bool RemoveArtForItem(
int mediaId,
const MediaType &mediaType,
const std::string &artType);
936 bool RemoveArtForItem(
int mediaId,
const MediaType &mediaType,
const std::set<std::string> &artTypes);
937 bool GetTvShowSeasons(
int showId, std::map<int, int> &seasons);
938 bool GetTvShowNamedSeasons(
int showId, std::map<int, std::string> &seasons);
946 std::string GetTvShowNamedSeasonById(
int tvshowId,
int seasonId);
948 bool GetTvShowSeasonArt(
int mediaId, std::map<
int, std::map<std::string, std::string> > &seasonArt);
949 bool GetArtTypes(
const MediaType &mediaType, std::vector<std::string> &artTypes);
957 std::vector<std::string> GetAvailableArtTypesForItem(
int mediaId,
const MediaType& mediaType);
966 std::vector<CScraperUrl::SUrlEntry> GetAvailableArtForItem(
967 int mediaId,
const MediaType& mediaType,
const std::string& artType);
969 int AddTag(
const std::string &tag);
970 void AddTagToItem(
int idItem,
int idTag,
const std::string &type);
971 void RemoveTagFromItem(
int idItem,
int idTag,
const std::string &type);
972 void RemoveTagsFromItem(
int idItem,
const std::string &type);
981 int AddSeason(
int showID,
int season,
const std::string& name =
"");
982 int AddSet(
const std::string& strSet,
const std::string& strOverview =
"");
983 void ClearMovieSet(
int idMovie);
984 void SetMovieSet(
int idMovie,
int idSet);
985 bool SetVideoUserRating(
int dbId,
int rating,
const MediaType& mediaType);
986 bool GetUseAllExternalAudioForVideo(
const std::string& videoPath);
992 int GetMovieId(
const std::string& strFilenameAndPath);
993 int GetMusicVideoId(
const std::string& strFilenameAndPath);
1013 int GetFileId(
const std::string& url);
1015 int AddToTable(
const std::string& table,
const std::string& firstField,
const std::string& secondField,
const std::string& value);
1016 int UpdateRatings(
int mediaId,
const char *mediaType,
const RatingMap& values,
const std::string& defaultRating);
1017 int AddRatings(
int mediaId,
const char *mediaType,
const RatingMap& values,
const std::string& defaultRating);
1018 int UpdateUniqueIDs(
int mediaId,
const char *mediaType,
const CVideoInfoTag& details);
1019 int AddUniqueIDs(
int mediaId,
const char *mediaType,
const CVideoInfoTag& details);
1020 int AddActor(
const std::string& strActor,
const std::string& thumbURL,
const std::string &thumb =
"");
1031 bool AddPathToTvShow(
int idShow,
const std::string &path,
const std::string &parentPath,
const CDateTime& dateAdded =
CDateTime());
1041 void AddLinkToActor(
int mediaId,
const char *mediaType,
int actorId,
const std::string &role,
int order);
1042 void AddToLinkTable(
int mediaId,
const std::string& mediaType,
const std::string& table,
int valueId,
const char *foreignKey = NULL);
1043 void RemoveFromLinkTable(
int mediaId,
const std::string& mediaType,
const std::string& table,
int valueId,
const char *foreignKey = NULL);
1045 void AddLinksToItem(
int mediaId,
const std::string& mediaType,
const std::string& field,
const std::vector<std::string>& values);
1046 void UpdateLinksToItem(
int mediaId,
const std::string& mediaType,
const std::string& field,
const std::vector<std::string>& values);
1047 void AddActorLinksToItem(
int mediaId,
const std::string& mediaType,
const std::string& field,
const std::vector<std::string>& values);
1048 void UpdateActorLinksToItem(
int mediaId,
const std::string& mediaType,
const std::string& field,
const std::vector<std::string>& values);
1050 void AddCast(
int mediaId,
const char *mediaType,
const std::vector<SActorInfo> &cast);
1052 CVideoInfoTag GetDetailsForMovie(std::unique_ptr<dbiplus::Dataset> &pDS,
int getDetails = VideoDbDetailsNone);
1053 CVideoInfoTag GetDetailsForMovie(
const dbiplus::sql_record*
const record,
int getDetails = VideoDbDetailsNone);
1054 CVideoInfoTag GetDetailsForTvShow(std::unique_ptr<dbiplus::Dataset> &pDS,
int getDetails = VideoDbDetailsNone,
CFileItem* item = NULL);
1055 CVideoInfoTag GetDetailsForTvShow(
const dbiplus::sql_record*
const record,
int getDetails = VideoDbDetailsNone,
CFileItem* item = NULL);
1056 CVideoInfoTag GetBasicDetailsForEpisode(std::unique_ptr<dbiplus::Dataset> &pDS);
1057 CVideoInfoTag GetBasicDetailsForEpisode(
const dbiplus::sql_record*
const record);
1058 CVideoInfoTag GetDetailsForEpisode(std::unique_ptr<dbiplus::Dataset> &pDS,
int getDetails = VideoDbDetailsNone);
1059 CVideoInfoTag GetDetailsForEpisode(
const dbiplus::sql_record*
const record,
int getDetails = VideoDbDetailsNone);
1060 CVideoInfoTag GetDetailsForMusicVideo(std::unique_ptr<dbiplus::Dataset> &pDS,
int getDetails = VideoDbDetailsNone);
1061 CVideoInfoTag GetDetailsForMusicVideo(
const dbiplus::sql_record*
const record,
int getDetails = VideoDbDetailsNone);
1062 bool GetPeopleNav(
const std::string& strBaseDir,
1065 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
1067 bool countOnly =
false);
1068 bool GetNavCommon(
const std::string& strBaseDir,
1071 VideoDbContentType idContent = VideoDbContentType::UNKNOWN,
1073 bool countOnly =
false);
1074 void GetCast(
int media_id,
const std::string &media_type, std::vector<SActorInfo> &cast);
1075 void GetTags(
int media_id,
const std::string &media_type, std::vector<std::string> &tags);
1076 void GetRatings(
int media_id,
const std::string &media_type, RatingMap &ratings);
1077 void GetUniqueIDs(
int media_id,
const std::string &media_type,
CVideoInfoTag& details);
1079 void GetDetailsFromDB(std::unique_ptr<dbiplus::Dataset> &pDS,
int min,
int max,
const SDbTableOffsets *offsets,
CVideoInfoTag &details,
int idxOffset = 2);
1080 void GetDetailsFromDB(
const dbiplus::sql_record*
const record,
int min,
int max,
const SDbTableOffsets *offsets,
CVideoInfoTag &details,
int idxOffset = 2);
1084 void CreateTables()
override;
1085 void CreateAnalytics()
override;
1086 void UpdateTables(
int version)
override;
1087 void CreateLinkIndex(
const char *table);
1088 void CreateForeignLinkIndex(
const char *table,
const char *foreignkey);
1093 virtual void CreateViews();
1100 int GetDbId(
const std::string &query);
1107 int RunQuery(
const std::string &sql);
1109 void AppendIdLinkFilter(
const char* field,
const char *table,
const MediaType& mediaType,
const char *view,
const char *viewKey,
const CUrlOptions::UrlOptions& options,
Filter &filter);
1110 void AppendLinkFilter(
const char* field,
const char *table,
const MediaType& mediaType,
const char *view,
const char *viewKey,
const CUrlOptions::UrlOptions& options,
Filter &filter);
1116 bool LookupByFolders(
const std::string &path,
bool shows =
false);
1123 int GetPlayCount(
int iFileId);
1134 int GetMinSchemaVersion()
const override {
return 75; }
1135 int GetSchemaVersion()
const override;
1136 virtual int GetExportVersion()
const {
return 1; }
1137 const char* GetBaseDBName()
const override {
return "MyVideos"; }
1139 void ConstructPath(std::string& strDest,
const std::string& strPath,
const std::string& strFileName);
1140 void SplitPath(
const std::string& strFileNameAndPath, std::string& strPath, std::string& strFileName);
1141 void InvalidatePathHash(
const std::string& strPath);
1148 std::string GetSafeFile(
const std::string &dir,
const std::string &name)
const;
1150 std::vector<int> CleanMediaType(
const std::string &mediaType,
const std::string &cleanableFileIDs,
1151 std::map<int, bool> &pathsDeleteDecisions, std::string &deletedFileIDs,
bool silent);
1153 static void AnnounceRemove(
const std::string& content,
int id,
bool scanning =
false);
1154 static void AnnounceUpdate(
const std::string& content,
int id);
Definition: VideoInfoScanner.h:28
Definition: VideoDatabase.h:408
Definition: VideoDatabase.h:399
Represents a list of files.
Definition: FileItem.h:721
Definition: Database.h:29
Definition: VideoDatabase.h:395
Definition: Bookmark.h:14
Definition: Database.h:11
Definition: StreamDetails.h:92
Definition: Application.h:74
Definition: TestNfsFile.cpp:22
Definition: VideoDatabase.h:418
Definition: Database.h:26
DateTime class, which uses FileTime as it's base.
Definition: XBDateTime.h:63
Definition: settings.py:1
Definition: GUIDialogExtendedProgressBar.h:16
Definition: GUIDialogProgress.h:16
Definition: VideoDatabase.h:199
Definition: SortUtils.h:176
Definition: VideoInfoTag.h:51
Definition: VideoSettings.h:194
Represents a file on a share.
Definition: FileItem.h:102