xbmc
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
CVideoInfoDownloader Class Reference
Inheritance diagram for CVideoInfoDownloader:
Inheritance graph
[legend]
Collaboration diagram for CVideoInfoDownloader:
Collaboration graph
[legend]

Public Member Functions

 CVideoInfoDownloader (const ADDON::ScraperPtr &scraper)
 
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)
 
void Create (bool bAutoDelete=false)
 
template<typename Rep , typename Period >
void Sleep (std::chrono::duration< Rep, Period > duration)
 
bool IsAutoDelete () const
 
virtual void StopThread (bool bWait=true)
 
bool IsRunning () const
 
bool IsCurrentThread () const
 
bool Join (std::chrono::milliseconds duration)
 
bool SetPriority (const ThreadPriority &priority)
 Set the threads priority. This uses the platforms native threading library to do so.
 
virtual void OnException ()
 

Static Public Member Functions

static void ShowErrorDialog (const ADDON::CScraperError &sce)
 
- Static Public Member Functions inherited from CThread
static const std::thread::id GetCurrentThreadId ()
 
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, std::chrono::milliseconds duration=std::chrono::milliseconds(-1))
 This call will wait on a CEvent in an interruptible way such that if stop is called on the thread the wait will return with a response indicating what happened.
 

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 Function Documentation

◆ 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.

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