Kodi Documentation 23.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
LibraryQueryDatabase.cpp File Reference
#include "LibraryQueryDatabase.h"
#include "FileItemList.h"
#include "MediaSource.h"
#include "ServiceBroker.h"
#include "media/LibraryQuery.h"
#include "media/LibraryQueryReferences.h"
#include "music/MusicDatabase.h"
#include "music/MusicDbPaths.h"
#include "music/MusicDbUrl.h"
#include "music/MusicLibraryQuery.h"
#include "settings/MediaSourceSettings.h"
#include "settings/Settings.h"
#include "settings/SettingsComponent.h"
#include "utils/SortUtils.h"
#include "utils/StringUtils.h"
#include "utils/log.h"
#include "video/VideoDatabase.h"
#include "video/VideoDbPaths.h"
#include "video/VideoDbUrl.h"
#include "video/VideoLibraryQuery.h"
#include <cstdlib>
#include <type_traits>
#include <utility>

Namespaces

namespace  KODI
 
namespace  KODI::MEDIA
 
namespace  KODI::MEDIA::LIBRARY_QUERY
 What a library query asks of the libraries it lists from: their databases, paths, settings and media sources.
 

Functions

std::optional< MediaSection > KODI::MEDIA::LIBRARY_QUERY::LibraryOf (std::string_view path)
 The library a library path is in. Nullopt for a path of neither library.
 
std::unique_ptr< CDbUrl > KODI::MEDIA::LIBRARY_QUERY::UrlOf (MediaSection library)
 An empty URL of a library's paths. Null for a section that is not a library.
 
std::string KODI::MEDIA::LIBRARY_QUERY::ListedContentOf (MediaSection library, const CDbUrl &url)
 The content name of what a URL of a library's paths lists: "movies", "genres" and so on.
 
std::optional< std::string_view > KODI::MEDIA::LIBRARY_QUERY::ListingPath (const Source &source, GROUP group)
 The path that lists the items of a source, or the groups of the items a query matches.
 
void KODI::MEDIA::LIBRARY_QUERY::AddSortAttributes (TYPE type, SortDescription &sorting)
 Adds the sort attributes the settings of a type's libraries ask for.
 
std::vector< CMediaSource > KODI::MEDIA::LIBRARY_QUERY::PathSourcesOf (TYPE type)
 The media sources the paths of a type's items are in.
 
bool KODI::MEDIA::LIBRARY_QUERY::ListItems (const Source &source, const std::string &path, const SortDescription &sorting, CFileItemList &items)
 Lists a path of the library a source is listed from.
 
bool KODI::MEDIA::LIBRARY_QUERY::BrowseValues (const Source &source, BROWSE browse, const std::string &baseDir, const CLibraryQuery *query, bool countOnly, CFileItemList &items)
 Lists the values of a kind there are among the items of a source, for a field to be given one.
 
std::optional< std::pair< int, int > > KODI::MEDIA::LIBRARY_QUERY::RangeOf (const Source &source, Field field, const std::string &path)
 The lowest and highest value a field has among the items a path of a source lists.
 
std::optional< std::vector< int > > KODI::MEDIA::LIBRARY_QUERY::IdsOf (const Source &source, const CLibraryQuery *query, const CLibraryQueryReferences *references, const SortDescription &sorting)
 The ids of the items of a source a query matches.
 
bool KODI::MEDIA::LIBRARY_QUERY::ItemsById (const Source &source, const std::vector< int > &ids, CFileItemList &items)
 Adds the items of a source with these ids to items, in no particular order.