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

#include <ScraperUrl.h>

Classes

struct  SUrlEntry
 

Public Types

enum  URLTYPES { URL_TYPE_GENERAL = 1 , URL_TYPE_SEASON = 2 }
 

Public Member Functions

 CScraperUrl (const std::string &)
 
 CScraperUrl (const TiXmlElement *)
 
 CScraperUrl ()
 
 ~CScraperUrl ()
 
bool Parse ()
 
bool ParseString (std::string)
 
bool ParseElement (const TiXmlElement *)
 
bool ParseEpisodeGuide (std::string strUrls)
 
void AddElement (std::string url, std::string aspect="", std::string referrer="", std::string cache="", bool post=false, bool isgz=false, int season=-1)
 
const SUrlEntry GetFirstThumb (const std::string &type="") const
 
const SUrlEntry GetSeasonThumb (int season, const std::string &type="") const
 
unsigned int GetMaxSeasonThumb () const
 
void GetThumbURLs (std::vector< std::string > &thumbs, const std::string &type="", int season=-1, bool unique=false) const
 fetch the full URL (including referrer) of thumbs More...
 
void Clear ()
 

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 &, std::string &, XFILE::CCurlFile &http, const std::string &cacheContext)
 

Public Attributes

std::string m_xml
 
std::string m_spoof
 
std::string strTitle
 
std::string strId
 
double relevance
 
std::vector< SUrlEntrym_url
 

Member Enumeration Documentation

◆ URLTYPES

Enumerator
URL_TYPE_GENERAL 
URL_TYPE_SEASON 

Constructor & Destructor Documentation

◆ CScraperUrl() [1/3]

CScraperUrl::CScraperUrl ( const std::string &  strUrl)
explicit

◆ CScraperUrl() [2/3]

CScraperUrl::CScraperUrl ( const TiXmlElement *  element)
explicit

◆ CScraperUrl() [3/3]

CScraperUrl::CScraperUrl ( )

◆ ~CScraperUrl()

CScraperUrl::~CScraperUrl ( )
default

Member Function Documentation

◆ AddElement()

void CScraperUrl::AddElement ( std::string  url,
std::string  aspect = "",
std::string  referrer = "",
std::string  cache = "",
bool  post = false,
bool  isgz = false,
int  season = -1 
)

◆ Clear()

void CScraperUrl::Clear ( )

◆ Get()

bool CScraperUrl::Get ( const SUrlEntry scrURL,
std::string &  strHTML,
XFILE::CCurlFile http,
const std::string &  cacheContext 
)
static

◆ GetFirstThumb()

const CScraperUrl::SUrlEntry CScraperUrl::GetFirstThumb ( const std::string &  type = "") const

◆ GetMaxSeasonThumb()

unsigned int CScraperUrl::GetMaxSeasonThumb ( ) const

◆ GetSeasonThumb()

const CScraperUrl::SUrlEntry CScraperUrl::GetSeasonThumb ( int  season,
const std::string &  type = "" 
) const

◆ 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 URL (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

◆ Parse()

bool CScraperUrl::Parse ( )

◆ ParseElement()

bool CScraperUrl::ParseElement ( const TiXmlElement *  element)

◆ ParseEpisodeGuide()

bool CScraperUrl::ParseEpisodeGuide ( std::string  strUrls)

◆ ParseString()

bool CScraperUrl::ParseString ( std::string  strUrl)

Member Data Documentation

◆ m_spoof

std::string CScraperUrl::m_spoof

◆ m_url

std::vector<SUrlEntry> CScraperUrl::m_url

◆ m_xml

std::string CScraperUrl::m_xml

◆ relevance

double CScraperUrl::relevance

◆ strId

std::string CScraperUrl::strId

◆ strTitle

std::string CScraperUrl::strTitle

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