Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
|
#include <VideoDatabase.h>
Classes | |
class | CActor |
class | CSeason |
class | CSetInfo |
Public Member Functions | |
CVideoDatabase (void) | |
~CVideoDatabase (void) override | |
bool | Open () override |
bool | CommitTransaction () override |
int | AddNewEpisode (int idShow, CVideoInfoTag &details) |
CDateTime | SetPlayCount (const CFileItem &item, int count, const CDateTime &date=CDateTime()) |
Set the playcount of an item, update last played time Sets the playcount and last played date to a given value. | |
CDateTime | IncrementPlayCount (const CFileItem &item) |
Increment the playcount of an item Increments the playcount and updates the last played date. | |
int | GetPlayCount (const CFileItem &item) |
Get the playcount of an item. | |
int | GetPlayCount (const std::string &strFilenameAndPath) |
Get the playcount of a filename and path. | |
CDateTime | GetLastPlayed (const std::string &strFilenameAndPath) |
Get the last played time of a filename and path. | |
CDateTime | UpdateLastPlayed (const CFileItem &item) |
Update the last played time of an item Updates the last played date. | |
bool | GetPlayCounts (const std::string &path, CFileItemList &items) |
Get the playcount and resume point of a list of items Note that if the resume point is already set on an item, it won't be overridden. | |
void | UpdateMovieTitle (int idMovie, const std::string &strNewMovieTitle, VideoDbContentType iType=VideoDbContentType::MOVIES) |
bool | UpdateVideoSortTitle (int idDb, const std::string &strNewSortTitle, VideoDbContentType iType=VideoDbContentType::MOVIES) |
bool | HasMovieInfo (const std::string &strFilenameAndPath) |
bool | HasTvShowInfo (const std::string &strFilenameAndPath) |
bool | HasEpisodeInfo (const std::string &strFilenameAndPath) |
bool | HasMusicVideoInfo (const std::string &strFilenameAndPath) |
void | GetFilePathById (int idMovie, std::string &filePath, VideoDbContentType iType) |
std::string | GetGenreById (int id) |
std::string | GetCountryById (int id) |
std::string | GetSetById (int id) |
std::string | GetTagById (int id) |
std::string | GetPersonById (int id) |
std::string | GetStudioById (int id) |
std::string | GetTvShowTitleById (int id) |
std::string | GetMusicVideoAlbumById (int id) |
int | GetTvShowForEpisode (int idEpisode) |
int | GetSeasonForEpisode (int idEpisode) |
bool | LoadVideoInfo (const std::string &strFilenameAndPath, CVideoInfoTag &details, int getDetails=VideoDbDetailsAll) |
bool | GetMovieInfo (const std::string &strFilenameAndPath, CVideoInfoTag &details, int idMovie=-1, int idVersion=-1, int getDetails=VideoDbDetailsAll) |
bool | GetTvShowInfo (const std::string &strPath, CVideoInfoTag &details, int idTvShow=-1, CFileItem *item=NULL, int getDetails=VideoDbDetailsAll) |
bool | GetSeasonInfo (const std::string &path, int season, CVideoInfoTag &details, CFileItem *item) |
bool | GetSeasonInfo (int idSeason, CVideoInfoTag &details, CFileItem *item) |
bool | GetSeasonInfo (int idSeason, CVideoInfoTag &details, bool allDetails=true) |
bool | GetEpisodeBasicInfo (const std::string &strFilenameAndPath, CVideoInfoTag &details, int idEpisode=-1) |
bool | GetEpisodeInfo (const std::string &strFilenameAndPath, CVideoInfoTag &details, int idEpisode=-1, int getDetails=VideoDbDetailsAll) |
bool | GetMusicVideoInfo (const std::string &strFilenameAndPath, CVideoInfoTag &details, int idMVideo=-1, int getDetails=VideoDbDetailsAll) |
bool | GetSetInfo (int idSet, CVideoInfoTag &details, CFileItem *item=nullptr) |
bool | GetFileInfo (const std::string &strFilenameAndPath, CVideoInfoTag &details, int idFile=-1) |
int | GetPathId (const std::string &strPath) |
int | GetTvShowId (const std::string &strPath) |
int | GetEpisodeId (const std::string &strFilenameAndPath, int idEpisode=-1, int idSeason=-1) |
int | GetSeasonId (int idShow, int season) |
void | GetEpisodesByFile (const std::string &strFilenameAndPath, std::vector< CVideoInfoTag > &episodes) |
int | SetDetailsForItem (CVideoInfoTag &details, const std::map< std::string, std::string > &artwork) |
int | SetDetailsForItem (int id, const MediaType &mediaType, CVideoInfoTag &details, const std::map< std::string, std::string > &artwork) |
int | SetDetailsForMovie (CVideoInfoTag &details, const std::map< std::string, std::string > &artwork, int idMovie=-1) |
int | SetDetailsForMovieSet (const CVideoInfoTag &details, const std::map< std::string, std::string > &artwork, int idSet=-1) |
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) |
add a tvshow to the library, setting metadata detail First checks for whether this TV Show is already in the database (based on idTvShow, or via GetMatchingTvShow) and if present adds the paths to the show. If not present, we add a new show and set the show metadata. | |
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) |
int | SetDetailsForSeason (const CVideoInfoTag &details, const std::map< std::string, std::string > &artwork, int idShow, int idSeason=-1) |
int | SetDetailsForEpisode (CVideoInfoTag &details, const std::map< std::string, std::string > &artwork, int idShow, int idEpisode=-1) |
bool | SetFileForEpisode (const std::string &fileAndPath, int idEpisode, int idFile) |
bool | SetFileForMovie (const std::string &fileAndPath, int idMovie, int idFile) |
int | SetDetailsForMusicVideo (CVideoInfoTag &details, const std::map< std::string, std::string > &artwork, int idMVideo=-1) |
int | SetStreamDetailsForFile (const CStreamDetails &details, const std::string &strFileNameAndPath) |
bool | SetStreamDetailsForFileId (const CStreamDetails &details, int idFile) |
Clear any existing stream details and add the new provided details to a file. | |
bool | SetSingleValue (VideoDbContentType type, int dbId, int dbField, const std::string &strValue) |
bool | SetSingleValue (VideoDbContentType type, int dbId, Field dbField, const std::string &strValue) |
bool | SetSingleValue (const std::string &table, const std::string &fieldName, const std::string &strValue, const std::string &conditionName="", int conditionValue=-1) |
int | UpdateDetailsForMovie (int idMovie, CVideoInfoTag &details, const std::map< std::string, std::string > &artwork, const std::set< std::string > &updatedDetails) |
bool | DeleteMovie (int idMovie, DeleteMovieCascadeAction action=DeleteMovieCascadeAction::ALL_ASSETS, DeleteMovieHashAction hashAction=DeleteMovieHashAction::HASH_DELETE) |
Remove a movie from the library. | |
void | DeleteTvShow (int idTvShow, bool bKeepId=false) |
void | DeleteTvShow (const std::string &strPath) |
void | DeleteSeason (int idSeason, bool bKeepId=false) |
void | DeleteEpisode (int idEpisode, bool bKeepId=false) |
void | DeleteMusicVideo (int idMusicVideo, bool bKeepId=false) |
void | DeleteDetailsForTvShow (int idTvShow) |
void | DeleteStreamDetails (int idFile) |
void | RemoveContentForPath (const std::string &strPath, CGUIDialogProgress *progress=NULL) |
void | UpdateFanart (const CFileItem &item, VideoDbContentType type) |
void | DeleteSet (int idSet) |
void | DeleteTag (int idTag, VideoDbContentType mediaType) |
bool | GetVideoSettings (int idFile, CVideoSettings &settings) |
Get video settings for the specified file id. | |
bool | GetVideoSettings (const CFileItem &item, CVideoSettings &settings) |
Get video settings for the specified file item. | |
bool | GetVideoSettings (const std::string &filePath, CVideoSettings &settings) |
Get video settings for the specified file path. | |
void | SetVideoSettings (const CFileItem &item, const CVideoSettings &settings) |
Set video settings for the specified file path. | |
void | SetVideoSettings (int idFile, const CVideoSettings &settings) |
Set video settings for the specified file path. | |
void | EraseVideoSettings (const CFileItem &item) |
EraseVideoSettings() Erases the videoSettings table and reconstructs it. | |
void | EraseAllVideoSettings () |
void | EraseAllVideoSettings (const std::string &path) |
void | EraseAllForPath (const std::string &path) |
void | EraseAllForFile (const std::string &fileNameAndPath) |
bool | GetStackTimes (const std::string &filePath, std::vector< uint64_t > ×) |
GetStackTimes() obtains any saved video times for the stacked file. | |
void | SetStackTimes (const std::string &filePath, const std::vector< uint64_t > ×) |
Sets the stack times for a particular video file. | |
void | GetBookMarksForFile (const std::string &strFilenameAndPath, VECBOOKMARKS &bookmarks, CBookmark::EType type=CBookmark::STANDARD, bool bAppend=false, long partNumber=0) |
void | AddBookMarkToFile (const std::string &strFilenameAndPath, const CBookmark &bookmark, CBookmark::EType type=CBookmark::STANDARD) |
bool | GetResumeBookMark (const std::string &strFilenameAndPath, CBookmark &bookmark) |
void | DeleteResumeBookMark (const CFileItem &item) |
void | ClearBookMarkOfFile (const std::string &strFilenameAndPath, const CBookmark &bookmark, CBookmark::EType type=CBookmark::STANDARD) |
void | ClearBookMarksOfFile (const std::string &strFilenameAndPath, CBookmark::EType type=CBookmark::STANDARD) |
void | ClearBookMarksOfFile (int idFile, CBookmark::EType type=CBookmark::STANDARD) |
bool | GetBookMarkForEpisode (const CVideoInfoTag &tag, CBookmark &bookmark) |
void | AddBookMarkForEpisode (const CVideoInfoTag &tag, const CBookmark &bookmark) |
void | DeleteBookMarkForEpisode (const CVideoInfoTag &tag) |
bool | GetResumePoint (CVideoInfoTag &tag) |
bool | GetStreamDetails (CFileItem &item) |
bool | GetStreamDetails (CVideoInfoTag &tag) |
bool | GetStreamDetails (const std::string &filenameAndPath, CStreamDetails &details) |
bool | GetDetailsByTypeAndId (CFileItem &item, VideoDbContentType type, int id) |
CVideoInfoTag | GetDetailsByTypeAndId (VideoDbContentType type, int id) |
void | SetScraperForPath (const std::string &filePath, const ADDON::ScraperPtr &info, const KODI::VIDEO::SScanSettings &settings) |
ADDON::ScraperPtr | GetScraperForPath (const std::string &strPath) |
ADDON::ScraperPtr | GetScraperForPath (const std::string &strPath, KODI::VIDEO::SScanSettings &settings) |
ADDON::ScraperPtr | GetScraperForPath (const std::string &strPath, KODI::VIDEO::SScanSettings &settings, bool &foundDirectly) |
Retrieve the scraper and settings we should use for the specified path If the scraper is not set on this particular path, we'll recursively check parent folders. | |
std::string | GetContentForPath (const std::string &strPath) |
Retrieve the content type of videos in the given path If content is set on the folder, we return the given content type, except in the case of tvshows, where we first check for whether we have episodes directly in the path (thus return episodes) or whether we've found a scraper directly (shows). Any folders inbetween are treated as seasons (regardless of whether they actually are seasons). Note that any subfolders in movies will be treated as movies. | |
bool | GetItemsForPath (const std::string &content, const std::string &path, CFileItemList &items) |
Get videos of the given content type from the given path. | |
bool | ScraperInUse (const std::string &scraperID) const |
Check whether a given scraper is in use. | |
bool | SetPathHash (const std::string &path, const std::string &hash) |
bool | GetPathHash (const std::string &path, std::string &hash) |
bool | GetPaths (std::set< std::string > &paths) |
bool | GetPathsForTvShow (int idShow, std::set< int > &paths) |
bool | GetPathsLinkedToTvShow (int idShow, std::vector< std::string > &paths) |
return the paths linked to a tvshow. | |
bool | GetSubPaths (const std::string &basepath, std::vector< std::pair< int, std::string > > &subpaths) |
retrieve subpaths of a given path. Assumes a hierarchical folder structure | |
bool | GetSourcePath (const std::string &path, std::string &sourcePath) |
bool | GetSourcePath (const std::string &path, std::string &sourcePath, KODI::VIDEO::SScanSettings &settings) |
int | GetMatchingMusicVideo (const std::string &strArtist, const std::string &strAlbum="", const std::string &strTitle="") |
void | GetMoviesByActor (const std::string &strActor, CFileItemList &items) |
void | GetTvShowsByActor (const std::string &strActor, CFileItemList &items) |
void | GetEpisodesByActor (const std::string &strActor, CFileItemList &items) |
void | GetMusicVideosByArtist (const std::string &strArtist, CFileItemList &items) |
void | GetMusicVideosByAlbum (const std::string &strAlbum, CFileItemList &items) |
void | GetMovieGenresByName (const std::string &strSearch, CFileItemList &items) |
void | GetTvShowGenresByName (const std::string &strSearch, CFileItemList &items) |
void | GetMusicVideoGenresByName (const std::string &strSearch, CFileItemList &items) |
void | GetMovieCountriesByName (const std::string &strSearch, CFileItemList &items) |
void | GetMusicVideoAlbumsByName (const std::string &strSearch, CFileItemList &items) |
void | GetMovieActorsByName (const std::string &strSearch, CFileItemList &items) |
void | GetTvShowsActorsByName (const std::string &strSearch, CFileItemList &items) |
void | GetMusicVideoArtistsByName (const std::string &strSearch, CFileItemList &items) |
void | GetMovieDirectorsByName (const std::string &strSearch, CFileItemList &items) |
void | GetTvShowsDirectorsByName (const std::string &strSearch, CFileItemList &items) |
void | GetMusicVideoDirectorsByName (const std::string &strSearch, CFileItemList &items) |
void | GetMoviesByName (const std::string &strSearch, CFileItemList &items) |
void | GetTvShowsByName (const std::string &strSearch, CFileItemList &items) |
void | GetEpisodesByName (const std::string &strSearch, CFileItemList &items) |
void | GetMusicVideosByName (const std::string &strSearch, CFileItemList &items) |
void | GetEpisodesByPlot (const std::string &strSearch, CFileItemList &items) |
void | GetMoviesByPlot (const std::string &strSearch, CFileItemList &items) |
bool | LinkMovieToTvshow (int idMovie, int idShow, bool bRemove) |
bool | IsLinkedToTvshow (int idMovie) |
bool | GetLinksToTvShow (int idMovie, std::vector< int > &ids) |
bool | GetGenresNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter(), bool countOnly=false) |
bool | GetCountriesNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter(), bool countOnly=false) |
bool | GetStudiosNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter(), bool countOnly=false) |
bool | GetYearsNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter()) |
bool | GetActorsNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter(), bool countOnly=false) |
bool | GetDirectorsNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter(), bool countOnly=false) |
bool | GetWritersNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter(), bool countOnly=false) |
bool | GetSetsNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter(), bool ignoreSingleMovieSets=false) |
bool | GetTagsNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter(), bool countOnly=false) |
bool | GetMusicVideoAlbumsNav (const std::string &strBaseDir, CFileItemList &items, int idArtist, const Filter &filter=Filter(), bool countOnly=false) |
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) |
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) |
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) |
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) |
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) |
bool | GetRecentlyAddedMoviesNav (const std::string &strBaseDir, CFileItemList &items, unsigned int limit=0, int getDetails=VideoDbDetailsNone) |
bool | GetRecentlyAddedEpisodesNav (const std::string &strBaseDir, CFileItemList &items, unsigned int limit=0, int getDetails=VideoDbDetailsNone) |
bool | GetRecentlyAddedMusicVideosNav (const std::string &strBaseDir, CFileItemList &items, unsigned int limit=0, int getDetails=VideoDbDetailsNone) |
bool | GetInProgressTvShowsNav (const std::string &strBaseDir, CFileItemList &items, unsigned int limit=0, int getDetails=VideoDbDetailsNone) |
bool | HasContent () |
bool | HasContent (VideoDbContentType type) |
bool | HasSets () const |
void | CleanDatabase (CGUIDialogProgressBarHandle *handle=NULL, const std::set< int > &paths=std::set< int >(), bool showProgress=true) |
int | AddFile (const std::string &url, const std::string &parentPath="", const CDateTime &dateAdded=CDateTime(), int playcount=0, const CDateTime &lastPlayed=CDateTime()) |
Add a file to the database, if necessary If the file is already in the database, we simply return its id. | |
int | AddFile (const CFileItem &item) |
Add a file to the database, if necessary Works for both videodb:// items and normal fileitems. | |
int | AddFile (const CVideoInfoTag &details, const std::string &parentPath="") |
Add a file to the database, if necessary Works for both videodb:// items and normal fileitems. | |
int | AddPath (const std::string &strPath, const std::string &parentPath="", const CDateTime &dateAdded=CDateTime()) |
Add a path to the database, if necessary If the path is already in the database, we simply return its id. | |
void | UpdateFileDateAdded (CVideoInfoTag &details) |
Updates the dateAdded field in the files table for the file with the given idFile and the given path based on the files modification date. | |
void | ExportToXML (const std::string &path, bool singleFile=true, bool images=false, bool actorThumbs=false, bool overwrite=false) |
void | ExportActorThumbs (const std::string &path, const CVideoInfoTag &tag, bool singleFiles, bool overwrite=false) |
void | ImportFromXML (const std::string &path) |
void | DumpToDummyFiles (const std::string &path) |
bool | ImportArtFromXML (const TiXmlNode *node, std::map< std::string, std::string > &artwork) |
bool | GetMoviesByWhere (const std::string &strBaseDir, const Filter &filter, CFileItemList &items, const SortDescription &sortDescription=SortDescription(), int getDetails=VideoDbDetailsNone) |
bool | GetSetsByWhere (const std::string &strBaseDir, const Filter &filter, CFileItemList &items, bool ignoreSingleMovieSets=false) |
bool | GetTvShowsByWhere (const std::string &strBaseDir, const Filter &filter, CFileItemList &items, const SortDescription &sortDescription=SortDescription(), int getDetails=VideoDbDetailsNone) |
bool | GetSeasonsByWhere (const std::string &strBaseDir, const Filter &filter, CFileItemList &items, bool appendFullShowPath=true, const SortDescription &sortDescription=SortDescription()) |
bool | GetEpisodesByWhere (const std::string &strBaseDir, const Filter &filter, CFileItemList &items, bool appendFullShowPath=true, const SortDescription &sortDescription=SortDescription(), int getDetails=VideoDbDetailsNone) |
bool | GetMusicVideosByWhere (const std::string &baseDir, const Filter &filter, CFileItemList &items, bool checkLocks=true, const SortDescription &sortDescription=SortDescription(), int getDetails=VideoDbDetailsNone) |
bool | GetSortedVideos (const MediaType &mediaType, const std::string &strBaseDir, const SortDescription &sortDescription, CFileItemList &items, const Filter &filter=Filter()) |
bool | GetItems (const std::string &strBaseDir, CFileItemList &items, const Filter &filter=Filter(), const SortDescription &sortDescription=SortDescription()) |
bool | GetItems (const std::string &strBaseDir, const std::string &mediaType, const std::string &itemType, CFileItemList &items, const Filter &filter=Filter(), const SortDescription &sortDescription=SortDescription()) |
bool | GetItems (const std::string &strBaseDir, VideoDbContentType mediaType, const std::string &itemType, CFileItemList &items, const Filter &filter=Filter(), const SortDescription &sortDescription=SortDescription()) |
std::string | GetItemById (const std::string &itemType, int id) |
unsigned int | GetRandomMusicVideoIDs (const std::string &strWhere, std::vector< std::pair< int, int > > &songIDs) |
Gets music video IDs in random order that match the where clause. | |
bool | SetArtForItem (int mediaId, const MediaType &mediaType, const std::string &artType, const std::string &url) |
bool | SetArtForItem (int mediaId, const MediaType &mediaType, const std::map< std::string, std::string > &art) |
bool | GetArtForItem (int mediaId, const MediaType &mediaType, std::map< std::string, std::string > &art) |
std::string | GetArtForItem (int mediaId, const MediaType &mediaType, const std::string &artType) |
void | UpdateArtForItem (int mediaId, const MediaType &mediaType) |
bool | GetArtForAsset (int assetId, ArtFallbackOptions fallback, std::map< std::string, std::string > &art) |
Retrieve all art for the given video asset, with optional fallback to the art of the parent/owner of the asset. | |
bool | HasArtForItem (int mediaId, const MediaType &mediaType) |
bool | RemoveArtForItem (int mediaId, const MediaType &mediaType, const std::string &artType) |
bool | RemoveArtForItem (int mediaId, const MediaType &mediaType, const std::set< std::string > &artTypes) |
bool | GetTvShowSeasons (int showId, std::map< int, int > &seasons) |
bool | GetTvShowNamedSeasons (int showId, std::map< int, std::string > &seasons) |
std::string | GetTvShowNamedSeasonById (int tvshowId, int seasonId) |
Get the custom named season. | |
bool | GetTvShowSeasonArt (int mediaId, std::map< int, std::map< std::string, std::string > > &seasonArt) |
bool | GetArtTypes (const MediaType &mediaType, std::vector< std::string > &artTypes) |
std::vector< std::string > | GetAvailableArtTypesForItem (int mediaId, const MediaType &mediaType) |
Fetch the distinct types of available-but-unassigned art held in the database for a specific media item. | |
std::vector< CScraperUrl::SUrlEntry > | GetAvailableArtForItem (int mediaId, const MediaType &mediaType, const std::string &artType) |
Fetch the list of available-but-unassigned art URLs held in the database for a specific media item and art type. | |
int | AddTag (const std::string &tag) |
void | AddTagToItem (int idItem, int idTag, const std::string &type) |
void | RemoveTagFromItem (int idItem, int idTag, const std::string &type) |
void | RemoveTagsFromItem (int idItem, const std::string &type) |
bool | GetFilter (CDbUrl &videoUrl, Filter &filter, SortDescription &sorting) override |
int | AddSeason (int showID, int season, const std::string &name="") |
Will check if the season exists and if that is not the case add it to the database. | |
int | AddSet (const std::string &strSet, const std::string &strOverview="", const bool updateOverview=true) |
void | ClearMovieSet (int idMovie) |
void | SetMovieSet (int idMovie, int idSet) |
bool | SetVideoUserRating (int dbId, int rating, const MediaType &mediaType) |
bool | GetUseAllExternalAudioForVideo (const std::string &videoPath) |
std::string | GetSetByNameLike (const std::string &nameLike) const |
std::string | GetVideoItemTitle (VideoDbContentType itemType, int dbId) |
std::string | GetVideoVersionById (int id) |
void | GetVideoVersions (VideoDbContentType itemType, int dbId, CFileItemList &items, VideoAssetType videoAssetType) |
void | GetDefaultVideoVersion (VideoDbContentType itemType, int dbId, CFileItem &item) |
bool | ConvertVideoToVersion (VideoDbContentType itemType, int dbIdSource, int dbIdTarget, int idVideoVersion, VideoAssetType assetType) |
Remove a video from the library and transfer all of its assets to another video of the same type. | |
void | SetDefaultVideoVersion (VideoDbContentType itemType, int dbId, int idFile) |
void | SetVideoVersion (int idFile, int idVideoVersion) |
int | AddVideoVersionType (const std::string &typeVideoVersion, VideoAssetTypeOwner owner, VideoAssetType assetType) |
bool | AddVideoAsset (VideoDbContentType itemType, int dbId, int idVideoAsset, VideoAssetType videoAssetType, CFileItem &item) |
Create a new video asset from the provided item and type and attach it to an owner A file record is created for items with a path new to the database. | |
bool | DeleteVideoAsset (int idFile) |
bool | IsDefaultVideoVersion (int idFile) |
bool | GetVideoVersionTypes (VideoDbContentType idContent, VideoAssetType asset, CFileItemList &items) |
bool | SetVideoVersionDefaultArt (int dbId, int idFrom, VideoDbContentType type) |
void | InitializeVideoVersionTypeTable (int schemaVersion) |
void | UpdateVideoVersionTypeTable () |
bool | GetVideoVersionsNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter()) |
VideoAssetInfo | GetVideoVersionInfo (const std::string &filenameAndPath) |
bool | GetAssetsForVideo (VideoDbContentType itemType, int mediaId, VideoAssetType assetType, CFileItemList &items) |
bool | GetDefaultVersionForVideo (VideoDbContentType itemType, int mediaId, CFileItem &item) |
bool | UpdateAssetsOwner (const std::string &mediaType, int dbIdSource, int dbIdTarget) |
int | GetMovieId (const std::string &strFilenameAndPath) |
std::string | GetMovieTitle (int idMovie) |
void | GetSameVideoItems (const CFileItem &item, CFileItemList &items) |
int | GetFileIdByMovie (int idMovie) |
std::string | GetFileBasePathById (int idFile) |
std::vector< std::string > | GetUsedImages (const std::vector< std::string > &imagesToCheck) |
Check the passed in list of images if used in this database. Used to clean the image cache. | |
Public Member Functions inherited from CDatabase | |
CDatabase () | |
virtual | ~CDatabase (void) |
bool | IsOpen () |
virtual void | Close () |
bool | Compress (bool bForce=true) |
void | Interrupt () |
bool | Open (const DatabaseSettings &db) |
void | BeginTransaction () |
void | RollbackTransaction () |
void | CopyDB (const std::string &latestDb) |
void | DropAnalytics () |
std::string | PrepareSQL (std::string strStmt,...) const |
std::string | GetSingleValue (const std::string &strTable, const std::string &strColumn, const std::string &strWhereClause=std::string(), const std::string &strOrderBy=std::string()) const |
Get a single value from a table. | |
std::string | GetSingleValue (const std::string &query) const |
std::string | GetSingleValue (const std::string &query, const std::unique_ptr< dbiplus::Dataset > &ds) const |
Get a single value from a query on a dataset. | |
int | GetSingleValueInt (const std::string &strTable, const std::string &strColumn, const std::string &strWhereClause=std::string(), const std::string &strOrderBy=std::string()) const |
Get a single integer value from a table. | |
int | GetSingleValueInt (const std::string &query) const |
int | GetSingleValueInt (const std::string &query, const std::unique_ptr< dbiplus::Dataset > &ds) const |
Get a single integer value from a query on a dataset. | |
bool | DeleteValues (const std::string &strTable, const Filter &filter=Filter()) |
Delete values from a table. | |
bool | ExecuteQuery (const std::string &strQuery) |
Execute a query that does not return any result. Note that if BeginMultipleExecute() has been called, the query will be queued until CommitMultipleExecute() is called. | |
bool | ResultQuery (const std::string &strQuery) const |
Execute a query that returns a result. | |
bool | BeginMultipleExecute () |
Start a multiple execution queue. Any ExecuteQuery() function following this call will be queued rather than executed until CommitMultipleExecute() is performed. NOTE: Queries that rely on any queued execute query will not function as expected during this period! | |
bool | CommitMultipleExecute () |
Commit the multiple execution queue to the database. Queries are performed within a transaction, and the transaction is rolled back should any one query fail. | |
bool | QueueInsertQuery (const std::string &strQuery) |
Put an INSERT or REPLACE query in the queue. | |
bool | CommitInsertQueries () |
Commit all queries in the queue. | |
size_t | GetInsertQueriesCount () |
Get the number of INSERT queries in the queue. | |
bool | QueueDeleteQuery (const std::string &strQuery) |
Put a DELETE query in the queue. | |
bool | CommitDeleteQueries () |
Commit all queued DELETE queries. | |
size_t | GetDeleteQueriesCount () |
Get the number of DELETE queries in the queue. | |
virtual bool | BuildSQL (const std::string &strBaseDir, const std::string &strQuery, Filter &filter, std::string &strSQL, CDbUrl &dbUrl) |
virtual bool | BuildSQL (const std::string &strBaseDir, const std::string &strQuery, Filter &filter, std::string &strSQL, CDbUrl &dbUrl, SortDescription &sorting) |
bool | Connect (const std::string &dbName, const DatabaseSettings &db, bool create) |
Static Public Member Functions | |
static void | VideoContentTypeToString (VideoDbContentType type, std::string &out) |
Protected Member Functions | |
int | AddNewMovie (CVideoInfoTag &details) |
int | AddNewMusicVideo (CVideoInfoTag &details) |
int | GetMusicVideoId (const std::string &strFilenameAndPath) |
int | GetFileId (const CFileItem &item) |
Get the id of this fileitem Works for both videodb:// items and normal fileitems. | |
int | GetFileId (const CVideoInfoTag &details) |
int | GetAndFillFileId (CVideoInfoTag &details) |
Get the id of the file of this item and store it in the item. | |
int | GetFileId (const std::string &url) |
Get the id of a file from path. | |
int | AddToTable (const std::string &table, const std::string &firstField, const std::string &secondField, const std::string &value) |
int | UpdateRatings (int mediaId, const char *mediaType, const RatingMap &values, const std::string &defaultRating) |
int | AddRatings (int mediaId, const char *mediaType, const RatingMap &values, const std::string &defaultRating) |
int | UpdateUniqueIDs (int mediaId, const char *mediaType, const CVideoInfoTag &details) |
int | AddUniqueIDs (int mediaId, const char *mediaType, const CVideoInfoTag &details) |
int | AddActor (const std::string &strActor, const std::string &thumbURL, const std::string &thumb="") |
int | AddTvShow () |
bool | AddPathToTvShow (int idShow, const std::string &path, const std::string &parentPath, const CDateTime &dateAdded=CDateTime()) |
Adds a path to the tvshow link table. | |
int | GetMatchingTvShow (const CVideoInfoTag &show) |
Check whether a show is already in the library. Matches on unique identifier or matching title and premiered date. | |
void | AddLinkToActor (int mediaId, const char *mediaType, int actorId, const std::string &role, int order) |
void | AddToLinkTable (int mediaId, const std::string &mediaType, const std::string &table, int valueId, const char *foreignKey=NULL) |
void | RemoveFromLinkTable (int mediaId, const std::string &mediaType, const std::string &table, int valueId, const char *foreignKey=NULL) |
void | AddLinksToItem (int mediaId, const std::string &mediaType, const std::string &field, const std::vector< std::string > &values) |
void | UpdateLinksToItem (int mediaId, const std::string &mediaType, const std::string &field, const std::vector< std::string > &values) |
void | AddActorLinksToItem (int mediaId, const std::string &mediaType, const std::string &field, const std::vector< std::string > &values) |
void | UpdateActorLinksToItem (int mediaId, const std::string &mediaType, const std::string &field, const std::vector< std::string > &values) |
void | AddCast (int mediaId, const char *mediaType, const std::vector< SActorInfo > &cast) |
CVideoInfoTag | GetDetailsForMovie (std::unique_ptr< dbiplus::Dataset > &pDS, int getDetails=VideoDbDetailsNone) |
CVideoInfoTag | GetDetailsForMovie (const dbiplus::sql_record *const record, int getDetails=VideoDbDetailsNone) |
CVideoInfoTag | GetDetailsForTvShow (std::unique_ptr< dbiplus::Dataset > &pDS, int getDetails=VideoDbDetailsNone, CFileItem *item=NULL) |
CVideoInfoTag | GetDetailsForTvShow (const dbiplus::sql_record *const record, int getDetails=VideoDbDetailsNone, CFileItem *item=NULL) |
CVideoInfoTag | GetBasicDetailsForEpisode (std::unique_ptr< dbiplus::Dataset > &pDS) |
CVideoInfoTag | GetBasicDetailsForEpisode (const dbiplus::sql_record *const record) |
CVideoInfoTag | GetDetailsForEpisode (std::unique_ptr< dbiplus::Dataset > &pDS, int getDetails=VideoDbDetailsNone) |
CVideoInfoTag | GetDetailsForEpisode (const dbiplus::sql_record *const record, int getDetails=VideoDbDetailsNone) |
CVideoInfoTag | GetDetailsForMusicVideo (std::unique_ptr< dbiplus::Dataset > &pDS, int getDetails=VideoDbDetailsNone) |
CVideoInfoTag | GetDetailsForMusicVideo (const dbiplus::sql_record *const record, int getDetails=VideoDbDetailsNone) |
bool | GetPeopleNav (const std::string &strBaseDir, CFileItemList &items, const char *type, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter(), bool countOnly=false) |
bool | GetNavCommon (const std::string &strBaseDir, CFileItemList &items, const char *type, VideoDbContentType idContent=VideoDbContentType::UNKNOWN, const Filter &filter=Filter(), bool countOnly=false) |
void | GetCast (int media_id, const std::string &media_type, std::vector< SActorInfo > &cast) |
void | GetTags (int media_id, const std::string &media_type, std::vector< std::string > &tags) |
void | GetRatings (int media_id, const std::string &media_type, RatingMap &ratings) |
void | GetUniqueIDs (int media_id, const std::string &media_type, CVideoInfoTag &details) |
void | GetDetailsFromDB (std::unique_ptr< dbiplus::Dataset > &pDS, int min, int max, const SDbTableOffsets *offsets, CVideoInfoTag &details, int idxOffset=2) |
void | GetDetailsFromDB (const dbiplus::sql_record *const record, int min, int max, const SDbTableOffsets *offsets, CVideoInfoTag &details, int idxOffset=2) |
std::string | GetValueString (const CVideoInfoTag &details, int min, int max, const SDbTableOffsets *offsets) const |
Protected Member Functions inherited from CDatabase | |
void | Split (const std::string &strFileNameAndPath, std::string &strPath, std::string &strFileName) |
bool | CreateDatabase () |
Create database tables and analytics as needed. Calls CreateTables() and CreateAnalytics() on child classes. | |
int | GetDBVersion () |
bool | BuildSQL (const std::string &strQuery, const Filter &filter, std::string &strSQL) const |
Additional Inherited Members | |
Protected Attributes inherited from CDatabase | |
bool | m_sqlite |
whether we use sqlite (defaults to true) | |
std::unique_ptr< dbiplus::Database > | m_pDB |
std::unique_ptr< dbiplus::Dataset > | m_pDS |
std::unique_ptr< dbiplus::Dataset > | m_pDS2 |
const CProfileManager & | m_profileManager |
|
default |
|
overridedefault |
|
protected |
|
protected |
void CVideoDatabase::AddBookMarkForEpisode | ( | const CVideoInfoTag & | tag, |
const CBookmark & | bookmark ) |
void CVideoDatabase::AddBookMarkToFile | ( | const std::string & | strFilenameAndPath, |
const CBookmark & | bookmark, | ||
CBookmark::EType | type = CBookmark::STANDARD ) |
|
protected |
Add a file to the database, if necessary Works for both videodb:// items and normal fileitems.
item | CFileItem to add. |
int CVideoDatabase::AddFile | ( | const CVideoInfoTag & | details, |
const std::string & | parentPath = "" ) |
Add a file to the database, if necessary Works for both videodb:// items and normal fileitems.
url | full path of the file to add. |
details | details of the item to add. |
int CVideoDatabase::AddFile | ( | const std::string & | url, |
const std::string & | parentPath = "", | ||
const CDateTime & | dateAdded = CDateTime(), | ||
int | playcount = 0, | ||
const CDateTime & | lastPlayed = CDateTime() ) |
Add a file to the database, if necessary If the file is already in the database, we simply return its id.
url | - full path of the file to add. |
parentPath | the parent path of the path to add. If empty, URIUtils::GetParentPath() will determine the path. |
dateAdded | datetime when the file was added to the filesystem/database |
playcount | the playcount of the file to add. |
lastPlayed | the date and time when the file to add was last played. |
|
protected |
|
protected |
int CVideoDatabase::AddNewEpisode | ( | int | idShow, |
CVideoInfoTag & | details ) |
|
protected |
|
protected |
int CVideoDatabase::AddPath | ( | const std::string & | strPath, |
const std::string & | parentPath = "", | ||
const CDateTime & | dateAdded = CDateTime() ) |
Add a path to the database, if necessary If the path is already in the database, we simply return its id.
strPath | the path to add |
parentPath | the parent path of the path to add. If empty, URIUtils::GetParentPath() will determine the path. |
dateAdded | datetime when the path was added to the filesystem/database |
|
protected |
Adds a path to the tvshow link table.
idShow | the id of the show. |
path | the path to add. |
parentPath | the parent path of the path to add. |
dateAdded | date/time when the path was added |
|
protected |
Will check if the season exists and if that is not the case add it to the database.
showID | The id of the show in question. |
season | The season number we want to add. |
int CVideoDatabase::AddSet | ( | const std::string & | strSet, |
const std::string & | strOverview = "", | ||
const bool | updateOverview = true ) |
int CVideoDatabase::AddTag | ( | const std::string & | tag | ) |
|
protected |
|
protected |
|
protected |
|
protected |
bool CVideoDatabase::AddVideoAsset | ( | VideoDbContentType | itemType, |
int | dbId, | ||
int | idVideoAsset, | ||
VideoAssetType | videoAssetType, | ||
CFileItem & | item ) |
Create a new video asset from the provided item and type and attach it to an owner A file record is created for items with a path new to the database.
[in] | itemType | Parent's type |
[in] | dbId | Parent's id |
[in] | idVideoAsset | Video asset identifier / name |
[in] | videoAssetType | Type of the video asset |
[in] | item | Item to be made into a video asset |
int CVideoDatabase::AddVideoVersionType | ( | const std::string & | typeVideoVersion, |
VideoAssetTypeOwner | owner, | ||
VideoAssetType | assetType ) |
void CVideoDatabase::CleanDatabase | ( | CGUIDialogProgressBarHandle * | handle = NULL, |
const std::set< int > & | paths = std::set<int>(), | ||
bool | showProgress = true ) |
void CVideoDatabase::ClearBookMarkOfFile | ( | const std::string & | strFilenameAndPath, |
const CBookmark & | bookmark, | ||
CBookmark::EType | type = CBookmark::STANDARD ) |
void CVideoDatabase::ClearBookMarksOfFile | ( | const std::string & | strFilenameAndPath, |
CBookmark::EType | type = CBookmark::STANDARD ) |
void CVideoDatabase::ClearBookMarksOfFile | ( | int | idFile, |
CBookmark::EType | type = CBookmark::STANDARD ) |
bool CVideoDatabase::ConvertVideoToVersion | ( | VideoDbContentType | itemType, |
int | dbIdSource, | ||
int | dbIdTarget, | ||
int | idVideoVersion, | ||
VideoAssetType | assetType ) |
Remove a video from the library and transfer all of its assets to another video of the same type.
itemType | Type of the video being converted |
dbIdSource | id of the video being converted |
dbIdTarget | id that the video will be attached to |
idVideoVersion | new versiontype of the default version of the video |
assetType | new asset type of the default version of the video |
void CVideoDatabase::DeleteBookMarkForEpisode | ( | const CVideoInfoTag & | tag | ) |
bool CVideoDatabase::DeleteMovie | ( | int | idMovie, |
DeleteMovieCascadeAction | action = DeleteMovieCascadeAction::ALL_ASSETS, | ||
DeleteMovieHashAction | hashAction = DeleteMovieHashAction::HASH_DELETE ) |
Remove a movie from the library.
[in] | idMovie | The id of the movie |
[in] | action | Versions of the movie to be deleted |
[in] | hashAction | Preserve or invalidate the hash of the movie path |
void CVideoDatabase::DeleteTag | ( | int | idTag, |
VideoDbContentType | mediaType ) |
void CVideoDatabase::DeleteTvShow | ( | const std::string & | strPath | ) |
void CVideoDatabase::DumpToDummyFiles | ( | const std::string & | path | ) |
void CVideoDatabase::EraseAllForFile | ( | const std::string & | fileNameAndPath | ) |
Erases all entries for the given file, including path entry if no longer used
fileNameAndPath | The name and path of the file to erase db entries for |
void CVideoDatabase::EraseAllForPath | ( | const std::string & | path | ) |
Erases all entries for files starting with path, including the files and path entries
path | pattern |
void CVideoDatabase::EraseAllVideoSettings | ( | ) |
Erases all video settings
void CVideoDatabase::EraseAllVideoSettings | ( | const std::string & | path | ) |
Erases video settings for files starting with path
path | pattern |
EraseVideoSettings() Erases the videoSettings table and reconstructs it.
Erases video settings for file item
fileitem |
void CVideoDatabase::ExportActorThumbs | ( | const std::string & | path, |
const CVideoInfoTag & | tag, | ||
bool | singleFiles, | ||
bool | overwrite = false ) |
void CVideoDatabase::ExportToXML | ( | const std::string & | path, |
bool | singleFile = true, | ||
bool | images = false, | ||
bool | actorThumbs = false, | ||
bool | overwrite = false ) |
bool CVideoDatabase::GetActorsNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
VideoDbContentType | idContent = VideoDbContentType::UNKNOWN, | ||
const Filter & | filter = Filter(), | ||
bool | countOnly = false ) |
|
protected |
Get the id of the file of this item and store it in the item.
details | CVideoInfoTag for which to get and store the id of the file |
bool CVideoDatabase::GetArtForAsset | ( | int | assetId, |
ArtFallbackOptions | fallback, | ||
std::map< std::string, std::string > & | art ) |
Retrieve all art for the given video asset, with optional fallback to the art of the parent/owner of the asset.
assetId | id of the file of the asset |
fallback | optionally request fallback to the art of the parent/owner for each art type that is not defined for the asset |
art | collection of the retrieved art |
std::string CVideoDatabase::GetArtForItem | ( | int | mediaId, |
const MediaType & | mediaType, | ||
const std::string & | artType ) |
bool CVideoDatabase::GetArtForItem | ( | int | mediaId, |
const MediaType & | mediaType, | ||
std::map< std::string, std::string > & | art ) |
bool CVideoDatabase::GetArtTypes | ( | const MediaType & | mediaType, |
std::vector< std::string > & | artTypes ) |
bool CVideoDatabase::GetAssetsForVideo | ( | VideoDbContentType | itemType, |
int | mediaId, | ||
VideoAssetType | assetType, | ||
CFileItemList & | items ) |
std::vector< CScraperUrl::SUrlEntry > CVideoDatabase::GetAvailableArtForItem | ( | int | mediaId, |
const MediaType & | mediaType, | ||
const std::string & | artType ) |
Fetch the list of available-but-unassigned art URLs held in the database for a specific media item and art type.
mediaId | the id in the media table. |
mediaType | corresponds to the table the item resides in. |
artType | e.g. "thumb", "fanart", etc. |
std::vector< std::string > CVideoDatabase::GetAvailableArtTypesForItem | ( | int | mediaId, |
const MediaType & | mediaType ) |
Fetch the distinct types of available-but-unassigned art held in the database for a specific media item.
mediaId | the id in the media table. |
mediaType | the type of media, which corresponds to the table the item resides in. |
|
protected |
|
protected |
bool CVideoDatabase::GetBookMarkForEpisode | ( | const CVideoInfoTag & | tag, |
CBookmark & | bookmark ) |
void CVideoDatabase::GetBookMarksForFile | ( | const std::string & | strFilenameAndPath, |
VECBOOKMARKS & | bookmarks, | ||
CBookmark::EType | type = CBookmark::STANDARD, | ||
bool | bAppend = false, | ||
long | partNumber = 0 ) |
|
protected |
std::string CVideoDatabase::GetContentForPath | ( | const std::string & | strPath | ) |
Retrieve the content type of videos in the given path If content is set on the folder, we return the given content type, except in the case of tvshows, where we first check for whether we have episodes directly in the path (thus return episodes) or whether we've found a scraper directly (shows). Any folders inbetween are treated as seasons (regardless of whether they actually are seasons). Note that any subfolders in movies will be treated as movies.
strPath | path to start searching in. |
bool CVideoDatabase::GetCountriesNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
VideoDbContentType | idContent = VideoDbContentType::UNKNOWN, | ||
const Filter & | filter = Filter(), | ||
bool | countOnly = false ) |
std::string CVideoDatabase::GetCountryById | ( | int | id | ) |
bool CVideoDatabase::GetDefaultVersionForVideo | ( | VideoDbContentType | itemType, |
int | mediaId, | ||
CFileItem & | item ) |
void CVideoDatabase::GetDefaultVideoVersion | ( | VideoDbContentType | itemType, |
int | dbId, | ||
CFileItem & | item ) |
bool CVideoDatabase::GetDetailsByTypeAndId | ( | CFileItem & | item, |
VideoDbContentType | type, | ||
int | id ) |
CVideoInfoTag CVideoDatabase::GetDetailsByTypeAndId | ( | VideoDbContentType | type, |
int | id ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
bool CVideoDatabase::GetDirectorsNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
VideoDbContentType | idContent = VideoDbContentType::UNKNOWN, | ||
const Filter & | filter = Filter(), | ||
bool | countOnly = false ) |
bool CVideoDatabase::GetEpisodeBasicInfo | ( | const std::string & | strFilenameAndPath, |
CVideoInfoTag & | details, | ||
int | idEpisode = -1 ) |
int CVideoDatabase::GetEpisodeId | ( | const std::string & | strFilenameAndPath, |
int | idEpisode = -1, | ||
int | idSeason = -1 ) |
bool CVideoDatabase::GetEpisodeInfo | ( | const std::string & | strFilenameAndPath, |
CVideoInfoTag & | details, | ||
int | idEpisode = -1, | ||
int | getDetails = VideoDbDetailsAll ) |
void CVideoDatabase::GetEpisodesByActor | ( | const std::string & | strActor, |
CFileItemList & | items ) |
void CVideoDatabase::GetEpisodesByFile | ( | const std::string & | strFilenameAndPath, |
std::vector< CVideoInfoTag > & | episodes ) |
void CVideoDatabase::GetEpisodesByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
void CVideoDatabase::GetEpisodesByPlot | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
bool CVideoDatabase::GetEpisodesByWhere | ( | const std::string & | strBaseDir, |
const Filter & | filter, | ||
CFileItemList & | items, | ||
bool | appendFullShowPath = true, | ||
const SortDescription & | sortDescription = SortDescription(), | ||
int | getDetails = VideoDbDetailsNone ) |
bool CVideoDatabase::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 ) |
std::string CVideoDatabase::GetFileBasePathById | ( | int | idFile | ) |
Get the id of this fileitem Works for both videodb:// items and normal fileitems.
item | CFileItem to grab the fileid of |
|
protected |
|
protected |
Get the id of a file from path.
url | full path to the file |
bool CVideoDatabase::GetFileInfo | ( | const std::string & | strFilenameAndPath, |
CVideoInfoTag & | details, | ||
int | idFile = -1 ) |
void CVideoDatabase::GetFilePathById | ( | int | idMovie, |
std::string & | filePath, | ||
VideoDbContentType | iType ) |
|
overridevirtual |
Reimplemented from CDatabase.
std::string CVideoDatabase::GetGenreById | ( | int | id | ) |
bool CVideoDatabase::GetGenresNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
VideoDbContentType | idContent = VideoDbContentType::UNKNOWN, | ||
const Filter & | filter = Filter(), | ||
bool | countOnly = false ) |
bool CVideoDatabase::GetInProgressTvShowsNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
unsigned int | limit = 0, | ||
int | getDetails = VideoDbDetailsNone ) |
std::string CVideoDatabase::GetItemById | ( | const std::string & | itemType, |
int | id ) |
bool CVideoDatabase::GetItems | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
const Filter & | filter = Filter(), | ||
const SortDescription & | sortDescription = SortDescription() ) |
bool CVideoDatabase::GetItems | ( | const std::string & | strBaseDir, |
const std::string & | mediaType, | ||
const std::string & | itemType, | ||
CFileItemList & | items, | ||
const Filter & | filter = Filter(), | ||
const SortDescription & | sortDescription = SortDescription() ) |
bool CVideoDatabase::GetItems | ( | const std::string & | strBaseDir, |
VideoDbContentType | mediaType, | ||
const std::string & | itemType, | ||
CFileItemList & | items, | ||
const Filter & | filter = Filter(), | ||
const SortDescription & | sortDescription = SortDescription() ) |
bool CVideoDatabase::GetItemsForPath | ( | const std::string & | content, |
const std::string & | path, | ||
CFileItemList & | items ) |
Get videos of the given content type from the given path.
content | the content type to fetch. |
path | the path to fetch videos from. |
items | the returned items |
CDateTime CVideoDatabase::GetLastPlayed | ( | const std::string & | strFilenameAndPath | ) |
Get the last played time of a filename and path.
strFilenameAndPath | filename and path to get the last played time for |
int CVideoDatabase::GetMatchingMusicVideo | ( | const std::string & | strArtist, |
const std::string & | strAlbum = "", | ||
const std::string & | strTitle = "" ) |
|
protected |
Check whether a show is already in the library. Matches on unique identifier or matching title and premiered date.
show | the details of the show to check for. |
void CVideoDatabase::GetMovieActorsByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
void CVideoDatabase::GetMovieCountriesByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
void CVideoDatabase::GetMovieDirectorsByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
void CVideoDatabase::GetMovieGenresByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
int CVideoDatabase::GetMovieId | ( | const std::string & | strFilenameAndPath | ) |
bool CVideoDatabase::GetMovieInfo | ( | const std::string & | strFilenameAndPath, |
CVideoInfoTag & | details, | ||
int | idMovie = -1, | ||
int | idVersion = -1, | ||
int | getDetails = VideoDbDetailsAll ) |
void CVideoDatabase::GetMoviesByActor | ( | const std::string & | strActor, |
CFileItemList & | items ) |
void CVideoDatabase::GetMoviesByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
void CVideoDatabase::GetMoviesByPlot | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
bool CVideoDatabase::GetMoviesByWhere | ( | const std::string & | strBaseDir, |
const Filter & | filter, | ||
CFileItemList & | items, | ||
const SortDescription & | sortDescription = SortDescription(), | ||
int | getDetails = VideoDbDetailsNone ) |
bool CVideoDatabase::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 ) |
std::string CVideoDatabase::GetMovieTitle | ( | int | idMovie | ) |
std::string CVideoDatabase::GetMusicVideoAlbumById | ( | int | id | ) |
void CVideoDatabase::GetMusicVideoAlbumsByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
bool CVideoDatabase::GetMusicVideoAlbumsNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
int | idArtist, | ||
const Filter & | filter = Filter(), | ||
bool | countOnly = false ) |
void CVideoDatabase::GetMusicVideoArtistsByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
void CVideoDatabase::GetMusicVideoDirectorsByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
void CVideoDatabase::GetMusicVideoGenresByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
|
protected |
bool CVideoDatabase::GetMusicVideoInfo | ( | const std::string & | strFilenameAndPath, |
CVideoInfoTag & | details, | ||
int | idMVideo = -1, | ||
int | getDetails = VideoDbDetailsAll ) |
void CVideoDatabase::GetMusicVideosByAlbum | ( | const std::string & | strAlbum, |
CFileItemList & | items ) |
void CVideoDatabase::GetMusicVideosByArtist | ( | const std::string & | strArtist, |
CFileItemList & | items ) |
void CVideoDatabase::GetMusicVideosByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
bool CVideoDatabase::GetMusicVideosByWhere | ( | const std::string & | baseDir, |
const Filter & | filter, | ||
CFileItemList & | items, | ||
bool | checkLocks = true, | ||
const SortDescription & | sortDescription = SortDescription(), | ||
int | getDetails = VideoDbDetailsNone ) |
bool CVideoDatabase::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 ) |
|
protected |
bool CVideoDatabase::GetPathHash | ( | const std::string & | path, |
std::string & | hash ) |
int CVideoDatabase::GetPathId | ( | const std::string & | strPath | ) |
bool CVideoDatabase::GetPaths | ( | std::set< std::string > & | paths | ) |
return the paths linked to a tvshow.
idShow | the id of the tvshow. |
paths | [out] the list of paths associated with the show. |
|
protected |
std::string CVideoDatabase::GetPersonById | ( | int | id | ) |
Get the playcount of an item.
item | CFileItem to get the playcount for |
int CVideoDatabase::GetPlayCount | ( | const std::string & | strFilenameAndPath | ) |
Get the playcount of a filename and path.
strFilenameAndPath | filename and path to get the playcount for |
bool CVideoDatabase::GetPlayCounts | ( | const std::string & | path, |
CFileItemList & | items ) |
Get the playcount and resume point of a list of items Note that if the resume point is already set on an item, it won't be overridden.
path | the path to fetch videos from |
items | CFileItemList to fetch the playcounts for |
unsigned int CVideoDatabase::GetRandomMusicVideoIDs | ( | const std::string & | strWhere, |
std::vector< std::pair< int, int > > & | songIDs ) |
Gets music video IDs in random order that match the where clause.
strWhere | the SQL where clause to apply in the query |
songIDs | a vector of <2, id> pairs suited to party mode use |
|
protected |
bool CVideoDatabase::GetRecentlyAddedEpisodesNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
unsigned int | limit = 0, | ||
int | getDetails = VideoDbDetailsNone ) |
bool CVideoDatabase::GetRecentlyAddedMoviesNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
unsigned int | limit = 0, | ||
int | getDetails = VideoDbDetailsNone ) |
bool CVideoDatabase::GetRecentlyAddedMusicVideosNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
unsigned int | limit = 0, | ||
int | getDetails = VideoDbDetailsNone ) |
bool CVideoDatabase::GetResumeBookMark | ( | const std::string & | strFilenameAndPath, |
CBookmark & | bookmark ) |
bool CVideoDatabase::GetResumePoint | ( | CVideoInfoTag & | tag | ) |
void CVideoDatabase::GetSameVideoItems | ( | const CFileItem & | item, |
CFileItemList & | items ) |
ScraperPtr CVideoDatabase::GetScraperForPath | ( | const std::string & | strPath | ) |
ScraperPtr CVideoDatabase::GetScraperForPath | ( | const std::string & | strPath, |
KODI::VIDEO::SScanSettings & | settings ) |
ScraperPtr CVideoDatabase::GetScraperForPath | ( | const std::string & | strPath, |
KODI::VIDEO::SScanSettings & | settings, | ||
bool & | foundDirectly ) |
Retrieve the scraper and settings we should use for the specified path If the scraper is not set on this particular path, we'll recursively check parent folders.
strPath | path to start searching in. |
settings | [out] scan settings for this folder. |
foundDirectly | [out] true if a scraper was found directly for strPath, false if it was in a parent path. |
bool CVideoDatabase::GetSeasonInfo | ( | const std::string & | path, |
int | season, | ||
CVideoInfoTag & | details, | ||
CFileItem * | item ) |
bool CVideoDatabase::GetSeasonInfo | ( | int | idSeason, |
CVideoInfoTag & | details, | ||
bool | allDetails = true ) |
bool CVideoDatabase::GetSeasonInfo | ( | int | idSeason, |
CVideoInfoTag & | details, | ||
CFileItem * | item ) |
bool CVideoDatabase::GetSeasonsByWhere | ( | const std::string & | strBaseDir, |
const Filter & | filter, | ||
CFileItemList & | items, | ||
bool | appendFullShowPath = true, | ||
const SortDescription & | sortDescription = SortDescription() ) |
bool CVideoDatabase::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 ) |
std::string CVideoDatabase::GetSetById | ( | int | id | ) |
std::string CVideoDatabase::GetSetByNameLike | ( | const std::string & | nameLike | ) | const |
bool CVideoDatabase::GetSetInfo | ( | int | idSet, |
CVideoInfoTag & | details, | ||
CFileItem * | item = nullptr ) |
bool CVideoDatabase::GetSetsByWhere | ( | const std::string & | strBaseDir, |
const Filter & | filter, | ||
CFileItemList & | items, | ||
bool | ignoreSingleMovieSets = false ) |
bool CVideoDatabase::GetSetsNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
VideoDbContentType | idContent = VideoDbContentType::UNKNOWN, | ||
const Filter & | filter = Filter(), | ||
bool | ignoreSingleMovieSets = false ) |
bool CVideoDatabase::GetSortedVideos | ( | const MediaType & | mediaType, |
const std::string & | strBaseDir, | ||
const SortDescription & | sortDescription, | ||
CFileItemList & | items, | ||
const Filter & | filter = Filter() ) |
bool CVideoDatabase::GetSourcePath | ( | const std::string & | path, |
std::string & | sourcePath ) |
bool CVideoDatabase::GetSourcePath | ( | const std::string & | path, |
std::string & | sourcePath, | ||
KODI::VIDEO::SScanSettings & | settings ) |
bool CVideoDatabase::GetStackTimes | ( | const std::string & | filePath, |
std::vector< uint64_t > & | times ) |
GetStackTimes() obtains any saved video times for the stacked file.
Returns | true if the stack times exist, false otherwise. |
bool CVideoDatabase::GetStreamDetails | ( | const std::string & | filenameAndPath, |
CStreamDetails & | details ) |
bool CVideoDatabase::GetStreamDetails | ( | CVideoInfoTag & | tag | ) |
std::string CVideoDatabase::GetStudioById | ( | int | id | ) |
bool CVideoDatabase::GetStudiosNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
VideoDbContentType | idContent = VideoDbContentType::UNKNOWN, | ||
const Filter & | filter = Filter(), | ||
bool | countOnly = false ) |
bool CVideoDatabase::GetSubPaths | ( | const std::string & | basepath, |
std::vector< std::pair< int, std::string > > & | subpaths ) |
retrieve subpaths of a given path. Assumes a hierarchical folder structure
basepath | the root path to retrieve subpaths for |
subpaths | the returned subpaths |
std::string CVideoDatabase::GetTagById | ( | int | id | ) |
|
protected |
bool CVideoDatabase::GetTagsNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
VideoDbContentType | idContent = VideoDbContentType::UNKNOWN, | ||
const Filter & | filter = Filter(), | ||
bool | countOnly = false ) |
void CVideoDatabase::GetTvShowGenresByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
int CVideoDatabase::GetTvShowId | ( | const std::string & | strPath | ) |
bool CVideoDatabase::GetTvShowInfo | ( | const std::string & | strPath, |
CVideoInfoTag & | details, | ||
int | idTvShow = -1, | ||
CFileItem * | item = NULL, | ||
int | getDetails = VideoDbDetailsAll ) |
Get the custom named season.
tvshowId | The tv show id relative to the season. |
seasonId | The season id for which to search the named title. |
void CVideoDatabase::GetTvShowsActorsByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
void CVideoDatabase::GetTvShowsByActor | ( | const std::string & | strActor, |
CFileItemList & | items ) |
void CVideoDatabase::GetTvShowsByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
bool CVideoDatabase::GetTvShowsByWhere | ( | const std::string & | strBaseDir, |
const Filter & | filter, | ||
CFileItemList & | items, | ||
const SortDescription & | sortDescription = SortDescription(), | ||
int | getDetails = VideoDbDetailsNone ) |
void CVideoDatabase::GetTvShowsDirectorsByName | ( | const std::string & | strSearch, |
CFileItemList & | items ) |
bool CVideoDatabase::GetTvShowSeasonArt | ( | int | mediaId, |
std::map< int, std::map< std::string, std::string > > & | seasonArt ) |
bool CVideoDatabase::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 ) |
std::string CVideoDatabase::GetTvShowTitleById | ( | int | id | ) |
|
protected |
bool CVideoDatabase::GetUseAllExternalAudioForVideo | ( | const std::string & | videoPath | ) |
std::vector< std::string > CVideoDatabase::GetUsedImages | ( | const std::vector< std::string > & | imagesToCheck | ) |
Check the passed in list of images if used in this database. Used to clean the image cache.
imagesToCheck |
|
protected |
std::string CVideoDatabase::GetVideoItemTitle | ( | VideoDbContentType | itemType, |
int | dbId ) |
bool CVideoDatabase::GetVideoSettings | ( | const CFileItem & | item, |
CVideoSettings & | settings ) |
Get video settings for the specified file item.
item | item to get the settings for |
bool CVideoDatabase::GetVideoSettings | ( | const std::string & | filePath, |
CVideoSettings & | settings ) |
Get video settings for the specified file path.
GetVideoSettings() obtains any saved video settings for the current file.
filePath | filepath to get the settings for |
Returns | true if the settings exist, false otherwise. |
bool CVideoDatabase::GetVideoSettings | ( | int | idFile, |
CVideoSettings & | settings ) |
Get video settings for the specified file id.
idFile | file id to get the settings for |
std::string CVideoDatabase::GetVideoVersionById | ( | int | id | ) |
VideoAssetInfo CVideoDatabase::GetVideoVersionInfo | ( | const std::string & | filenameAndPath | ) |
void CVideoDatabase::GetVideoVersions | ( | VideoDbContentType | itemType, |
int | dbId, | ||
CFileItemList & | items, | ||
VideoAssetType | videoAssetType ) |
bool CVideoDatabase::GetVideoVersionsNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
VideoDbContentType | idContent = VideoDbContentType::UNKNOWN, | ||
const Filter & | filter = Filter() ) |
bool CVideoDatabase::GetVideoVersionTypes | ( | VideoDbContentType | idContent, |
VideoAssetType | asset, | ||
CFileItemList & | items ) |
bool CVideoDatabase::GetWritersNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
VideoDbContentType | idContent = VideoDbContentType::UNKNOWN, | ||
const Filter & | filter = Filter(), | ||
bool | countOnly = false ) |
bool CVideoDatabase::GetYearsNav | ( | const std::string & | strBaseDir, |
CFileItemList & | items, | ||
VideoDbContentType | idContent = VideoDbContentType::UNKNOWN, | ||
const Filter & | filter = Filter() ) |
bool CVideoDatabase::HasContent | ( | ) |
bool CVideoDatabase::HasContent | ( | VideoDbContentType | type | ) |
bool CVideoDatabase::HasEpisodeInfo | ( | const std::string & | strFilenameAndPath | ) |
bool CVideoDatabase::HasMovieInfo | ( | const std::string & | strFilenameAndPath | ) |
bool CVideoDatabase::HasMusicVideoInfo | ( | const std::string & | strFilenameAndPath | ) |
bool CVideoDatabase::HasSets | ( | ) | const |
bool CVideoDatabase::HasTvShowInfo | ( | const std::string & | strFilenameAndPath | ) |
bool CVideoDatabase::ImportArtFromXML | ( | const TiXmlNode * | node, |
std::map< std::string, std::string > & | artwork ) |
void CVideoDatabase::ImportFromXML | ( | const std::string & | path | ) |
Increment the playcount of an item Increments the playcount and updates the last played date.
item | CFileItem to increment the playcount for |
bool CVideoDatabase::LoadVideoInfo | ( | const std::string & | strFilenameAndPath, |
CVideoInfoTag & | details, | ||
int | getDetails = VideoDbDetailsAll ) |
bool CVideoDatabase::RemoveArtForItem | ( | int | mediaId, |
const MediaType & | mediaType, | ||
const std::set< std::string > & | artTypes ) |
bool CVideoDatabase::RemoveArtForItem | ( | int | mediaId, |
const MediaType & | mediaType, | ||
const std::string & | artType ) |
void CVideoDatabase::RemoveContentForPath | ( | const std::string & | strPath, |
CGUIDialogProgress * | progress = NULL ) |
|
protected |
bool CVideoDatabase::ScraperInUse | ( | const std::string & | scraperID | ) | const |
Check whether a given scraper is in use.
scraperID | the scraper to check for. |
bool CVideoDatabase::SetArtForItem | ( | int | mediaId, |
const MediaType & | mediaType, | ||
const std::map< std::string, std::string > & | art ) |
bool CVideoDatabase::SetArtForItem | ( | int | mediaId, |
const MediaType & | mediaType, | ||
const std::string & | artType, | ||
const std::string & | url ) |
void CVideoDatabase::SetDefaultVideoVersion | ( | VideoDbContentType | itemType, |
int | dbId, | ||
int | idFile ) |
int CVideoDatabase::SetDetailsForEpisode | ( | CVideoInfoTag & | details, |
const std::map< std::string, std::string > & | artwork, | ||
int | idShow, | ||
int | idEpisode = -1 ) |
int CVideoDatabase::SetDetailsForItem | ( | CVideoInfoTag & | details, |
const std::map< std::string, std::string > & | artwork ) |
int CVideoDatabase::SetDetailsForItem | ( | int | id, |
const MediaType & | mediaType, | ||
CVideoInfoTag & | details, | ||
const std::map< std::string, std::string > & | artwork ) |
int CVideoDatabase::SetDetailsForMovie | ( | CVideoInfoTag & | details, |
const std::map< std::string, std::string > & | artwork, | ||
int | idMovie = -1 ) |
int CVideoDatabase::SetDetailsForMovieSet | ( | const CVideoInfoTag & | details, |
const std::map< std::string, std::string > & | artwork, | ||
int | idSet = -1 ) |
int CVideoDatabase::SetDetailsForMusicVideo | ( | CVideoInfoTag & | details, |
const std::map< std::string, std::string > & | artwork, | ||
int | idMVideo = -1 ) |
int CVideoDatabase::SetDetailsForSeason | ( | const CVideoInfoTag & | details, |
const std::map< std::string, std::string > & | artwork, | ||
int | idShow, | ||
int | idSeason = -1 ) |
int CVideoDatabase::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 ) |
add a tvshow to the library, setting metadata detail First checks for whether this TV Show is already in the database (based on idTvShow, or via GetMatchingTvShow) and if present adds the paths to the show. If not present, we add a new show and set the show metadata.
paths | a vector<string,string> list of the path(s) and parent path(s) for the show. |
details | a CVideoInfoTag filled with the metadata for the show. |
artwork | the artwork map for the show. |
seasonArt | the artwork map for seasons. |
idTvShow | the database id of the tvshow if known (defaults to -1) |
bool CVideoDatabase::SetFileForEpisode | ( | const std::string & | fileAndPath, |
int | idEpisode, | ||
int | idFile ) |
bool CVideoDatabase::SetPathHash | ( | const std::string & | path, |
const std::string & | hash ) |
CDateTime CVideoDatabase::SetPlayCount | ( | const CFileItem & | item, |
int | count, | ||
const CDateTime & | date = CDateTime() ) |
Set the playcount of an item, update last played time Sets the playcount and last played date to a given value.
item | CFileItem to set the playcount for |
count | The playcount to set. |
date | The date the file was last viewed (does not denote the video was watched to completion). If empty we use current datetime (if count > 0) or never viewed (if count = 0). |
void CVideoDatabase::SetScraperForPath | ( | const std::string & | filePath, |
const ADDON::ScraperPtr & | info, | ||
const KODI::VIDEO::SScanSettings & | settings ) |
bool CVideoDatabase::SetSingleValue | ( | const std::string & | table, |
const std::string & | fieldName, | ||
const std::string & | strValue, | ||
const std::string & | conditionName = "", | ||
int | conditionValue = -1 ) |
bool CVideoDatabase::SetSingleValue | ( | VideoDbContentType | type, |
int | dbId, | ||
Field | dbField, | ||
const std::string & | strValue ) |
bool CVideoDatabase::SetSingleValue | ( | VideoDbContentType | type, |
int | dbId, | ||
int | dbField, | ||
const std::string & | strValue ) |
void CVideoDatabase::SetStackTimes | ( | const std::string & | filePath, |
const std::vector< uint64_t > & | times ) |
Sets the stack times for a particular video file.
int CVideoDatabase::SetStreamDetailsForFile | ( | const CStreamDetails & | details, |
const std::string & | strFileNameAndPath ) |
bool CVideoDatabase::SetStreamDetailsForFileId | ( | const CStreamDetails & | details, |
int | idFile ) |
Clear any existing stream details and add the new provided details to a file.
[in] | details | New stream details |
[in] | idFile | Identifier of the file |
void CVideoDatabase::SetVideoSettings | ( | const CFileItem & | item, |
const CVideoSettings & | settings ) |
Set video settings for the specified file path.
fileItem | to set the settings for |
void CVideoDatabase::SetVideoSettings | ( | int | idFile, |
const CVideoSettings & | settings ) |
Set video settings for the specified file path.
Sets the settings for a particular video file.
fileId | to set the settings for |
bool CVideoDatabase::SetVideoVersionDefaultArt | ( | int | dbId, |
int | idFrom, | ||
VideoDbContentType | type ) |
|
protected |
bool CVideoDatabase::UpdateAssetsOwner | ( | const std::string & | mediaType, |
int | dbIdSource, | ||
int | dbIdTarget ) |
int CVideoDatabase::UpdateDetailsForMovie | ( | int | idMovie, |
CVideoInfoTag & | details, | ||
const std::map< std::string, std::string > & | artwork, | ||
const std::set< std::string > & | updatedDetails ) |
bool CVideoDatabase::UpdateDetailsForTvShow | ( | int | idTvShow, |
CVideoInfoTag & | details, | ||
const std::map< std::string, std::string > & | artwork, | ||
const std::map< int, std::map< std::string, std::string > > & | seasonArt ) |
void CVideoDatabase::UpdateFanart | ( | const CFileItem & | item, |
VideoDbContentType | type ) |
void CVideoDatabase::UpdateFileDateAdded | ( | CVideoInfoTag & | details | ) |
Updates the dateAdded field in the files table for the file with the given idFile and the given path based on the files modification date.
details | details of the video file |
Update the last played time of an item Updates the last played date.
item | CFileItem to update the last played time for |
|
protected |
void CVideoDatabase::UpdateMovieTitle | ( | int | idMovie, |
const std::string & | strNewMovieTitle, | ||
VideoDbContentType | iType = VideoDbContentType::MOVIES ) |
|
protected |
|
protected |
bool CVideoDatabase::UpdateVideoSortTitle | ( | int | idDb, |
const std::string & | strNewSortTitle, | ||
VideoDbContentType | iType = VideoDbContentType::MOVIES ) |
void CVideoDatabase::UpdateVideoVersionTypeTable | ( | ) |
|
inlinestatic |