Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
VideoLibrary.h File Reference
#include "utils/log.h"
#include "video/VideoDatabase.h"
#include <chrono>
#include <set>
#include <source_location>
#include <string>
#include <string_view>
#include <type_traits>
#include <utility>
#include <vector>

Namespaces

namespace  KODI
 
namespace  KODI::VIDEO
 
namespace  KODI::VIDEO::LIBRARY
 

Functions

template<typename Work >
auto KODI::VIDEO::LIBRARY::WithDatabase (Work &&work, const std::source_location &caller=std::source_location::current()) -> std::invoke_result_t< Work, CVideoDatabase & >
 Run work on a video database connection of its own, opened for it and closed after.
 
void KODI::VIDEO::LIBRARY::AddBookMarkForEpisode (const CVideoInfoTag &tag, const CBookmark &bookmark)
 
bool KODI::VIDEO::LIBRARY::AddBookMarkToFile (const std::string &strFilenameAndPath, const CBookmark &bookmark, CBookmark::EType type)
 
int KODI::VIDEO::LIBRARY::AddSetForMovie (const std::string &name, int idMovie)
 
int KODI::VIDEO::LIBRARY::AddTag (const std::string &tag)
 
bool KODI::VIDEO::LIBRARY::AddTagToItems (int idTag, const std::vector< int > &idItems, KODI::MEDIA::TYPE type)
 
bool KODI::VIDEO::LIBRARY::ClearAllBookMarksOfFile (const std::string &strFilenameAndPath)
 
bool KODI::VIDEO::LIBRARY::DeleteItem (VideoDbContentType type, int id)
 
void KODI::VIDEO::LIBRARY::DeleteTag (int idTag, VideoDbContentType mediaType)
 
void KODI::VIDEO::LIBRARY::EraseVideoSettings (const CFileItem &item)
 
void KODI::VIDEO::LIBRARY::ExportToXML (const std::string &path, bool singleFile, bool images, bool actorThumbs, bool overwrite)
 
bool KODI::VIDEO::LIBRARY::GetArtForItem (int mediaId, KODI::MEDIA::TYPE mediaType, KODI::ART::Artwork &art)
 
std::string KODI::VIDEO::LIBRARY::GetArtForItem (int mediaId, const std::string &mediaType, const std::string &artType)
 
CVideoInfoTag KODI::VIDEO::LIBRARY::GetDetailsByTypeAndId (VideoDbContentType type, int id)
 
bool KODI::VIDEO::LIBRARY::GetDetailsOfItem (const CVideoInfoTag &item, CVideoInfoTag &details, int getDetails)
 
bool KODI::VIDEO::LIBRARY::GetDiscResumeBookMark (const std::string &discId, CBookmark &bookmark)
 
bool KODI::VIDEO::LIBRARY::GetEpisodeMap (int idShow, EpisodeFileMap &fileMap, int idFile)
 
void KODI::VIDEO::LIBRARY::GetEpisodesByBasePath (const std::string &path, std::vector< CVideoInfoTag > &episodes, int idShow)
 
void KODI::VIDEO::LIBRARY::GetEpisodesByBlurayPath (const std::string &path, std::vector< CVideoInfoTag > &episodes)
 
void KODI::VIDEO::LIBRARY::GetEpisodesByFile (const std::string &strFilenameAndPath, std::vector< CVideoInfoTag > &episodes)
 
bool KODI::VIDEO::LIBRARY::GetFileInfo (const std::string &strFilenameAndPath, CVideoInfoTag &details, int idFile)
 
void KODI::VIDEO::LIBRARY::GetFilePathById (int idMovie, std::string &filePath, VideoDbContentType iType)
 
bool KODI::VIDEO::LIBRARY::GetGenresNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent)
 
int KODI::VIDEO::LIBRARY::GetMatchingMusicVideo (const std::string &strArtist, const std::string &strAlbum="", const std::string &strTitle="")
 -1 when the database cannot be opened
 
bool KODI::VIDEO::LIBRARY::GetMoviesNav (const std::string &strBaseDir, CFileItemList &items, int idGenre, int idYear, int idActor, int idDirector, int idStudio, int idCountry, int idSet, int idTag, const SortDescription &sortDescription, int getDetails)
 
bool KODI::VIDEO::LIBRARY::GetPathsForCleaning (const std::string &directory, const std::string &content, std::set< int > &paths)
 
std::vector< DiscPlaylist > KODI::VIDEO::LIBRARY::GetPlaylistsByPath (const std::string &path)
 
std::string KODI::VIDEO::LIBRARY::GetRemovableBlurayPath (const std::string &originalPath)
 
bool KODI::VIDEO::LIBRARY::GetResumeBookMark (const std::string &strFilenameAndPath, CBookmark &bookmark)
 
ADDON::ScraperPtr KODI::VIDEO::LIBRARY::GetScraperForPath (const std::string &strPath)
 
bool KODI::VIDEO::LIBRARY::GetSeasonsByWhere (const std::string &strBaseDir, const CDatabase::Filter &filter, CFileItemList &items, bool appendFullShowPath)
 
std::string KODI::VIDEO::LIBRARY::GetSetById (int id)
 
bool KODI::VIDEO::LIBRARY::GetSortedVideos (KODI::MEDIA::TYPE mediaType, const std::string &strBaseDir, const SortDescription &sortDescription, CFileItemList &items)
 
bool KODI::VIDEO::LIBRARY::GetStackTimes (const std::string &filePath, std::vector< std::chrono::milliseconds > &times)
 
bool KODI::VIDEO::LIBRARY::GetTagsNav (const std::string &strBaseDir, CFileItemList &items, VideoDbContentType idContent)
 
bool KODI::VIDEO::LIBRARY::GetTvShowInfo (const std::string &strPath, CVideoInfoTag &details, int idTvShow)
 
bool KODI::VIDEO::LIBRARY::GetTvShowsByWhere (const std::string &strBaseDir, const CDatabase::Filter &filter, CFileItemList &items, const SortDescription &sortDescription, int getDetails)
 
bool KODI::VIDEO::LIBRARY::GetUseAllExternalAudioForVideo (const std::string &videoPath)
 
bool KODI::VIDEO::LIBRARY::GetVideosForTag (KODI::MEDIA::TYPE type, int idTag, bool tagged, CFileItemList &items)
 
bool KODI::VIDEO::LIBRARY::HasContent (VideoDbContentType type)
 
bool KODI::VIDEO::LIBRARY::HasTag (const std::string &name, KODI::MEDIA::TYPE type)
 
bool KODI::VIDEO::LIBRARY::HasVideoInfo (const CFileItem &item)
 
void KODI::VIDEO::LIBRARY::ImportFromXML (const std::string &path)
 
bool KODI::VIDEO::LIBRARY::LoadVideoInfo (const std::string &strFilenameAndPath, CVideoInfoTag &details)
 
bool KODI::VIDEO::LIBRARY::LookupByFolders (const std::string &path, bool shows)
 
bool KODI::VIDEO::LIBRARY::RemoveVideoAsset (int idFile)
 
bool KODI::VIDEO::LIBRARY::RemoveTagFromItems (int idTag, const std::vector< int > &idItems, KODI::MEDIA::TYPE type)
 
bool KODI::VIDEO::LIBRARY::ScraperInUse (const std::string &scraperID)
 
bool KODI::VIDEO::LIBRARY::SetItemTitle (const CVideoInfoTag &item, const std::string &title)
 
bool KODI::VIDEO::LIBRARY::SetPathHash (const std::string &path, const std::string &hash)
 
void KODI::VIDEO::LIBRARY::SetStackTimes (const std::string &filePath, const std::vector< std::chrono::milliseconds > &times)
 
void KODI::VIDEO::LIBRARY::SetTrailerForMovie (int idMovie, const std::string &trailer)
 
void KODI::VIDEO::LIBRARY::SetVideoSettings (const CFileItem &item, const CVideoSettings &settings)
 
bool KODI::VIDEO::LIBRARY::SetVideoUserRating (int dbId, int rating, KODI::MEDIA::TYPE mediaType)
 
CDatabase::GetResult KODI::VIDEO::LIBRARY::TryGetDetailsByTypeAndId (KODI::MEDIA::TYPE type, int id, CVideoInfoTag &details, CFileItem *item, int getDetails, int idVersion, int idFile)
 Error when the database cannot be opened.
 
bool KODI::VIDEO::LIBRARY::UpdateVideoSortTitle (int idDb, const std::string &strNewSortTitle, VideoDbContentType iType)