Kodi Documentation 18.0
Kodi is an open source media player and entertainment hub.
CVideoInfoDownloader Class Reference

#include <VideoInfoDownloader.h>

Inheritance diagram for CVideoInfoDownloader:
CThread

Public Member Functions

 CVideoInfoDownloader (const ADDON::ScraperPtr &scraper)
 
 ~CVideoInfoDownloader () override
 
int FindMovie (const std::string &movieTitle, int movieYear, MOVIELIST &movielist, CGUIDialogProgress *pProgress=NULL)
 Do a search for matching media items (possibly asynchronously) with our scraper. More...
 
bool GetArtwork (CVideoInfoTag &details)
 Fetch art URLs for an item with our scraper. More...
 
bool GetDetails (const CScraperUrl &url, CVideoInfoTag &movieDetails, CGUIDialogProgress *pProgress=NULL)
 
bool GetEpisodeDetails (const CScraperUrl &url, CVideoInfoTag &movieDetails, CGUIDialogProgress *pProgress=NULL)
 
bool GetEpisodeList (const CScraperUrl &url, VIDEO::EPISODELIST &details, CGUIDialogProgress *pProgress=NULL)
 
- Public Member Functions inherited from CThread
 CThread (IRunnable *pRunnable, const char *ThreadName)
 
virtual ~CThread ()
 
void Create (bool bAutoDelete=false, unsigned stacksize=0)
 
void Sleep (unsigned int milliseconds)
 
int GetSchedRRPriority (void)
 
bool SetPrioritySched_RR (int iPriority)
 
bool IsAutoDelete () const
 
virtual void StopThread (bool bWait=true)
 
bool IsRunning () const
 
bool IsCurrentThread () const
 
int GetMinPriority (void)
 
int GetMaxPriority (void)
 
int GetNormalPriority (void)
 
int GetPriority (void)
 
bool SetPriority (const int iPriority)
 
bool WaitForThreadExit (unsigned int milliseconds)
 
float GetRelativeUsage ()
 
int64_t GetAbsoluteUsage ()
 
virtual void OnException ()
 

Static Public Member Functions

static void ShowErrorDialog (const ADDON::CScraperError &sce)
 
- Static Public Member Functions inherited from CThread
static bool IsCurrentThread (const ThreadIdentifier tid)
 
static ThreadIdentifier GetCurrentThreadId ()
 
static ThreadIdentifier GetDisplayThreadId (const ThreadIdentifier tid)
 
static CThreadGetCurrentThread ()
 

Protected Types

enum  LOOKUP_STATE {
  DO_NOTHING = 0 , FIND_MOVIE = 1 , GET_DETAILS = 2 , GET_EPISODE_LIST = 3 ,
  GET_EPISODE_DETAILS = 4
}
 
- Protected Types inherited from CThread
enum  WaitResponse { WAIT_INTERRUPTED = -1 , WAIT_SIGNALED = 0 , WAIT_TIMEDOUT = 1 }
 

Protected Member Functions

void Process () override
 
void CloseThread ()
 
int InternalFindMovie (const std::string &movieTitle, int movieYear, MOVIELIST &movielist, bool cleanChars=true)
 
- Protected Member Functions inherited from CThread
 CThread (const char *ThreadName)
 
virtual void OnStartup ()
 
virtual void OnExit ()
 
WaitResponse AbortableWait (CEvent &event, int timeoutMillis=-1)
 

Protected Attributes

XFILE::CCurlFilem_http
 
std::string m_movieTitle
 
int m_movieYear
 
MOVIELIST m_movieList
 
CVideoInfoTag m_movieDetails
 
CScraperUrl m_url
 
VIDEO::EPISODELIST m_episode
 
LOOKUP_STATE m_state
 
int m_found
 
ADDON::ScraperPtr m_info
 
- Protected Attributes inherited from CThread
std::atomic< bool > m_bStop
 

Member Enumeration Documentation

◆ LOOKUP_STATE

Enumerator
DO_NOTHING 
FIND_MOVIE 
GET_DETAILS 
GET_EPISODE_LIST 
GET_EPISODE_DETAILS 

Constructor & Destructor Documentation

◆ CVideoInfoDownloader()

CVideoInfoDownloader::CVideoInfoDownloader ( const ADDON::ScraperPtr scraper)
explicit

◆ ~CVideoInfoDownloader()

CVideoInfoDownloader::~CVideoInfoDownloader ( )
override

Member Function Documentation

◆ CloseThread()

void CVideoInfoDownloader::CloseThread ( )
protected

◆ FindMovie()

int CVideoInfoDownloader::FindMovie ( const std::string &  movieTitle,
int  movieYear,
MOVIELIST movielist,
CGUIDialogProgress pProgress = NULL 
)

Do a search for matching media items (possibly asynchronously) with our scraper.

Parameters
movieTitletitle of the media item to look for
movieYearyear of the media item to look for (-1 if not known)
movielist[out] list of results to fill. May be empty on success.
pProgressprogress bar to update as we go. If NULL we run on thread, if non-NULL we run off thread.
Returns
1 on success, -1 on a scraper-specific error, 0 on some other error

◆ GetArtwork()

bool CVideoInfoDownloader::GetArtwork ( CVideoInfoTag details)

Fetch art URLs for an item with our scraper.

Parameters
detailsthe video info tag structure to fill with art.
Returns
true on success, false on failure.

◆ GetDetails()

bool CVideoInfoDownloader::GetDetails ( const CScraperUrl url,
CVideoInfoTag movieDetails,
CGUIDialogProgress pProgress = NULL 
)

◆ GetEpisodeDetails()

bool CVideoInfoDownloader::GetEpisodeDetails ( const CScraperUrl url,
CVideoInfoTag movieDetails,
CGUIDialogProgress pProgress = NULL 
)

◆ GetEpisodeList()

bool CVideoInfoDownloader::GetEpisodeList ( const CScraperUrl url,
VIDEO::EPISODELIST details,
CGUIDialogProgress pProgress = NULL 
)

◆ InternalFindMovie()

int CVideoInfoDownloader::InternalFindMovie ( const std::string &  movieTitle,
int  movieYear,
MOVIELIST movielist,
bool  cleanChars = true 
)
protected

◆ Process()

void CVideoInfoDownloader::Process ( void  )
overrideprotectedvirtual

Reimplemented from CThread.

◆ ShowErrorDialog()

void CVideoInfoDownloader::ShowErrorDialog ( const ADDON::CScraperError sce)
static

Member Data Documentation

◆ m_episode

VIDEO::EPISODELIST CVideoInfoDownloader::m_episode
protected

◆ m_found

int CVideoInfoDownloader::m_found
protected

◆ m_http

XFILE::CCurlFile* CVideoInfoDownloader::m_http
protected

◆ m_info

ADDON::ScraperPtr CVideoInfoDownloader::m_info
protected

◆ m_movieDetails

CVideoInfoTag CVideoInfoDownloader::m_movieDetails
protected

◆ m_movieList

MOVIELIST CVideoInfoDownloader::m_movieList
protected

◆ m_movieTitle

std::string CVideoInfoDownloader::m_movieTitle
protected

◆ m_movieYear

int CVideoInfoDownloader::m_movieYear
protected

◆ m_state

LOOKUP_STATE CVideoInfoDownloader::m_state
protected

◆ m_url

CScraperUrl CVideoInfoDownloader::m_url
protected

The documentation for this class was generated from the following files: