MythTV  master
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
MetaGrabberScript Class Reference

#include <metadatagrabber.h>

Public Member Functions

 MetaGrabberScript ()=default
 
 MetaGrabberScript (const QDomElement &dom)
 
 MetaGrabberScript (const QString &path)
 
 MetaGrabberScript (QString path, const QDomElement &dom)
 
 MetaGrabberScript (const MetaGrabberScript &)=default
 
MetaGrabberScriptoperator= (const MetaGrabberScript &other)
 
bool IsValid (void) const
 
QString GetCommand (void) const
 
QString GetRelPath (void) const
 
QString GetPath (void) const
 
QString GetName (void) const
 
QString GetAuthor (void) const
 
QString GetThumbnail (void) const
 
GrabberType GetType (void) const
 
QString GetTypeString (void) const
 
QString GetDescription (void) const
 
bool Accepts (const QString &tag) const
 
void toMap (InfoMap &metadataMap) const
 
bool Test (void)
 
MetadataLookupList Search (const QString &title, MetadataLookup *lookup, bool passseas=true)
 
MetadataLookupList SearchSubtitle (const QString &title, const QString &subtitle, MetadataLookup *lookup, bool passseas=true)
 
MetadataLookupList SearchSubtitle (const QString &inetref, const QString &title, const QString &subtitle, MetadataLookup *lookup, bool passseas=true)
 
MetadataLookupList LookupData (const QString &inetref, MetadataLookup *lookup, bool passseas=true)
 
MetadataLookupList LookupData (const QString &inetref, int season, int episode, MetadataLookup *lookup, bool passseas=true)
 
MetadataLookupList LookupCollection (const QString &collectionref, MetadataLookup *lookup, bool passseas=true)
 

Static Public Member Functions

static GrabberList GetList (bool refresh=false)
 
static GrabberList GetList (const QString &type, bool refresh=false)
 
static GrabberList GetList (GrabberType type, bool refresh=false)
 
static MetaGrabberScript GetGrabber (GrabberType defaultType, const MetadataLookup *lookup=nullptr)
 
static MetaGrabberScript GetType (const QString &type)
 
static MetaGrabberScript GetType (GrabberType type)
 
static MetaGrabberScript FromTag (const QString &tag, bool absolute=false)
 
static MetaGrabberScript FromInetref (const QString &inetref, bool absolute=false)
 
static QString CleanedInetref (const QString &inetref)
 

Private Member Functions

void ParseGrabberVersion (const QDomElement &item)
 
MetadataLookupList RunGrabber (const QStringList &args, MetadataLookup *lookup, bool passseas)
 

Static Private Member Functions

static void SetDefaultArgs (QStringList &args)
 

Private Attributes

QString m_name
 
QString m_author
 
QString m_thumbnail
 
QString m_fullcommand
 
QString m_command
 
GrabberType m_type {kGrabberInvalid}
 
QString m_typestring
 
QString m_description
 
QStringList m_accepts
 
float m_version {0.0}
 
bool m_valid {false}
 

Detailed Description

Definition at line 29 of file metadatagrabber.h.

Constructor & Destructor Documentation

◆ MetaGrabberScript() [1/5]

MetaGrabberScript::MetaGrabberScript ( )
default

Referenced by FromInetref(), FromTag(), and GetType().

◆ MetaGrabberScript() [2/5]

MetaGrabberScript::MetaGrabberScript ( const QDomElement &  dom)
explicit

Definition at line 277 of file metadatagrabber.cpp.

◆ MetaGrabberScript() [3/5]

MetaGrabberScript::MetaGrabberScript ( const QString &  path)
explicit

Definition at line 282 of file metadatagrabber.cpp.

◆ MetaGrabberScript() [4/5]

MetaGrabberScript::MetaGrabberScript ( QString  path,
const QDomElement &  dom 
)

Definition at line 271 of file metadatagrabber.cpp.

◆ MetaGrabberScript() [5/5]

MetaGrabberScript::MetaGrabberScript ( const MetaGrabberScript )
default

Member Function Documentation

◆ operator=()

MetaGrabberScript & MetaGrabberScript::operator= ( const MetaGrabberScript other)

Definition at line 317 of file metadatagrabber.cpp.

◆ GetList() [1/3]

GrabberList MetaGrabberScript::GetList ( bool  refresh = false)
static

Definition at line 55 of file metadatagrabber.cpp.

Referenced by FromTag(), GetList(), GetType(), and GrabberSettings::Load().

◆ GetList() [2/3]

GrabberList MetaGrabberScript::GetList ( const QString &  type,
bool  refresh = false 
)
static

Definition at line 60 of file metadatagrabber.cpp.

◆ GetList() [3/3]

GrabberList MetaGrabberScript::GetList ( GrabberType  type,
bool  refresh = false 
)
static

Definition at line 70 of file metadatagrabber.cpp.

◆ GetGrabber()

MetaGrabberScript MetaGrabberScript::GetGrabber ( GrabberType  defaultType,
const MetadataLookup lookup = nullptr 
)
static

◆ GetType() [1/3]

MetaGrabberScript MetaGrabberScript::GetType ( const QString &  type)
static

Definition at line 152 of file metadatagrabber.cpp.

Referenced by GuessLookupType().

◆ GetType() [2/3]

MetaGrabberScript MetaGrabberScript::GetType ( GrabberType  type)
static

Definition at line 162 of file metadatagrabber.cpp.

◆ FromTag()

MetaGrabberScript MetaGrabberScript::FromTag ( const QString &  tag,
bool  absolute = false 
)
static

Definition at line 196 of file metadatagrabber.cpp.

Referenced by FromInetref().

◆ FromInetref()

MetaGrabberScript MetaGrabberScript::FromInetref ( const QString &  inetref,
bool  absolute = false 
)
static

Definition at line 226 of file metadatagrabber.cpp.

Referenced by GetGrabber(), and GuessLookupType().

◆ CleanedInetref()

QString MetaGrabberScript::CleanedInetref ( const QString &  inetref)
static

Definition at line 255 of file metadatagrabber.cpp.

Referenced by GuessLookupType(), LookupCollection(), LookupData(), and SearchSubtitle().

◆ IsValid()

bool MetaGrabberScript::IsValid ( void  ) const
inline

Definition at line 55 of file metadatagrabber.h.

Referenced by FromInetref(), GetGrabber(), GetList(), GetType(), and GuessLookupType().

◆ GetCommand()

QString MetaGrabberScript::GetCommand ( void  ) const
inline

Definition at line 57 of file metadatagrabber.h.

◆ GetRelPath()

QString MetaGrabberScript::GetRelPath ( void  ) const

Definition at line 421 of file metadatagrabber.cpp.

◆ GetPath()

QString MetaGrabberScript::GetPath ( void  ) const
inline

Definition at line 59 of file metadatagrabber.h.

◆ GetName()

QString MetaGrabberScript::GetName ( void  ) const
inline

Definition at line 61 of file metadatagrabber.h.

◆ GetAuthor()

QString MetaGrabberScript::GetAuthor ( void  ) const
inline

Definition at line 62 of file metadatagrabber.h.

◆ GetThumbnail()

QString MetaGrabberScript::GetThumbnail ( void  ) const
inline

Definition at line 63 of file metadatagrabber.h.

◆ GetType() [3/3]

GrabberType MetaGrabberScript::GetType ( void  ) const
inline

◆ GetTypeString()

QString MetaGrabberScript::GetTypeString ( void  ) const
inline

Definition at line 65 of file metadatagrabber.h.

◆ GetDescription()

QString MetaGrabberScript::GetDescription ( void  ) const
inline

Definition at line 66 of file metadatagrabber.h.

◆ Accepts()

bool MetaGrabberScript::Accepts ( const QString &  tag) const
inline

Definition at line 68 of file metadatagrabber.h.

◆ toMap()

void MetaGrabberScript::toMap ( InfoMap metadataMap) const

Definition at line 430 of file metadatagrabber.cpp.

◆ Test()

bool MetaGrabberScript::Test ( void  )

Definition at line 364 of file metadatagrabber.cpp.

Referenced by MetadataDownload::runGrabberTest().

◆ Search()

MetadataLookupList MetaGrabberScript::Search ( const QString &  title,
MetadataLookup lookup,
bool  passseas = true 
)

◆ SearchSubtitle() [1/2]

MetadataLookupList MetaGrabberScript::SearchSubtitle ( const QString &  title,
const QString &  subtitle,
MetadataLookup lookup,
bool  passseas = true 
)

Definition at line 461 of file metadatagrabber.cpp.

Referenced by MetadataDownload::handleTelevision().

◆ SearchSubtitle() [2/2]

MetadataLookupList MetaGrabberScript::SearchSubtitle ( const QString &  inetref,
const QString &  title,
const QString &  subtitle,
MetadataLookup lookup,
bool  passseas = true 
)

Definition at line 475 of file metadatagrabber.cpp.

◆ LookupData() [1/2]

MetadataLookupList MetaGrabberScript::LookupData ( const QString &  inetref,
MetadataLookup lookup,
bool  passseas = true 
)

◆ LookupData() [2/2]

MetadataLookupList MetaGrabberScript::LookupData ( const QString &  inetref,
int  season,
int  episode,
MetadataLookup lookup,
bool  passseas = true 
)

Definition at line 502 of file metadatagrabber.cpp.

◆ LookupCollection()

MetadataLookupList MetaGrabberScript::LookupCollection ( const QString &  collectionref,
MetadataLookup lookup,
bool  passseas = true 
)

Definition at line 517 of file metadatagrabber.cpp.

Referenced by MetadataDownload::handleTelevision().

◆ ParseGrabberVersion()

void MetaGrabberScript::ParseGrabberVersion ( const QDomElement &  item)
private

Definition at line 338 of file metadatagrabber.cpp.

Referenced by MetaGrabberScript().

◆ RunGrabber()

MetadataLookupList MetaGrabberScript::RunGrabber ( const QStringList &  args,
MetadataLookup lookup,
bool  passseas 
)
private

Definition at line 381 of file metadatagrabber.cpp.

Referenced by LookupCollection(), LookupData(), Search(), and SearchSubtitle().

◆ SetDefaultArgs()

void MetaGrabberScript::SetDefaultArgs ( QStringList &  args)
staticprivate

Definition at line 441 of file metadatagrabber.cpp.

Referenced by LookupCollection(), LookupData(), Search(), and SearchSubtitle().

Member Data Documentation

◆ m_name

QString MetaGrabberScript::m_name
private

Definition at line 81 of file metadatagrabber.h.

Referenced by MetaGrabberScript(), operator=(), ParseGrabberVersion(), and toMap().

◆ m_author

QString MetaGrabberScript::m_author
private

Definition at line 82 of file metadatagrabber.h.

Referenced by operator=(), ParseGrabberVersion(), and toMap().

◆ m_thumbnail

QString MetaGrabberScript::m_thumbnail
private

Definition at line 83 of file metadatagrabber.h.

Referenced by operator=(), ParseGrabberVersion(), and toMap().

◆ m_fullcommand

QString MetaGrabberScript::m_fullcommand
private

Definition at line 84 of file metadatagrabber.h.

Referenced by GetRelPath(), MetaGrabberScript(), operator=(), RunGrabber(), and Test().

◆ m_command

QString MetaGrabberScript::m_command
private

Definition at line 85 of file metadatagrabber.h.

Referenced by GetList(), operator=(), ParseGrabberVersion(), RunGrabber(), and toMap().

◆ m_type

GrabberType MetaGrabberScript::m_type {kGrabberInvalid}
private

Definition at line 86 of file metadatagrabber.h.

Referenced by operator=(), and ParseGrabberVersion().

◆ m_typestring

QString MetaGrabberScript::m_typestring
private

Definition at line 87 of file metadatagrabber.h.

Referenced by operator=(), ParseGrabberVersion(), and toMap().

◆ m_description

QString MetaGrabberScript::m_description
private

Definition at line 88 of file metadatagrabber.h.

Referenced by operator=(), ParseGrabberVersion(), and toMap().

◆ m_accepts

QStringList MetaGrabberScript::m_accepts
private

Definition at line 89 of file metadatagrabber.h.

Referenced by operator=(), and ParseGrabberVersion().

◆ m_version

float MetaGrabberScript::m_version {0.0}
private

Definition at line 90 of file metadatagrabber.h.

Referenced by operator=(), ParseGrabberVersion(), and toMap().

◆ m_valid

bool MetaGrabberScript::m_valid {false}
private

Definition at line 91 of file metadatagrabber.h.

Referenced by MetaGrabberScript(), operator=(), and Test().


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