xbmc
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
CScraperUrl Class Reference

Classes

struct  SUrlEntry
 

Public Types

enum  UrlType { General = 1, Season = 2 }
 

Public Member Functions

 CScraperUrl (const std::string &strUrl)
 
 CScraperUrl (const TiXmlElement *element)
 
void Clear ()
 
bool HasData () const
 
const std::string & GetData () const
 
void SetData (std::string data)
 
const std::string & GetTitle () const
 
void SetTitle (std::string title)
 
const std::string & GetId () const
 
void SetId (std::string id)
 
double GetRelevance () const
 
void SetRelevance (double relevance)
 
bool HasUrls () const
 
const std::vector< SUrlEntry > & GetUrls () const
 
void SetUrls (std::vector< SUrlEntry > urls)
 
void AppendUrl (SUrlEntry url)
 
const SUrlEntry GetFirstUrlByType (const std::string &type="") const
 
const SUrlEntry GetSeasonUrl (int season, const std::string &type="") const
 
unsigned int GetMaxSeasonUrl () const
 
std::string GetFirstThumbUrl () const
 
void GetThumbUrls (std::vector< std::string > &thumbs, const std::string &type="", int season=-1, bool unique=false) const
 fetch the full URLs (including referrer) of thumbs More...
 
bool Parse ()
 
bool ParseFromData (const std::string &data)
 
bool ParseAndAppendUrl (const TiXmlElement *element)
 
bool ParseAndAppendUrlsFromEpisodeGuide (const std::string &episodeGuide)
 
void AddParsedUrl (const std::string &url, const std::string &aspect="", const std::string &preview="", const std::string &referrer="", const std::string &cache="", bool post=false, bool isgz=false, int season=-1)
 

Static Public Member Functions

static std::string GetThumbUrl (const CScraperUrl::SUrlEntry &entry)
 fetch the full URL (including referrer) of a thumb More...
 
static bool Get (const SUrlEntry &scrURL, std::string &strHTML, XFILE::CCurlFile &http, const std::string &cacheContext)
 

Public Attributes

std::string m_data
 

Member Function Documentation

◆ GetThumbUrl()

std::string CScraperUrl::GetThumbUrl ( const CScraperUrl::SUrlEntry entry)
static

fetch the full URL (including referrer) of a thumb

Parameters
URLentry to use to create the full URL
Returns
the full URL, including referrer

◆ GetThumbUrls()

void CScraperUrl::GetThumbUrls ( std::vector< std::string > &  thumbs,
const std::string &  type = "",
int  season = -1,
bool  unique = false 
) const

fetch the full URLs (including referrer) of thumbs

Parameters
thumbs[out] vector of thumb URLs to fill
typethe type of thumb URLs to fetch, if empty (the default) picks any
seasonnumber of season that we want thumbs for, -1 indicates no season (the default)
uniqueavoid adding duplicate URLs when adding to a thumbs vector with existing items

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