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

#include <videometadata.h>

Collaboration diagram for VideoMetadata:
Collaboration graph
[legend]

Public Types

typedef std::pair< int, QString > genre_entry
 
typedef std::pair< int, QString > country_entry
 
typedef std::pair< int, QString > cast_entry
 
typedef std::vector< genre_entrygenre_list
 
typedef std::vector< country_entrycountry_list
 
typedef std::vector< cast_entrycast_list
 

Public Member Functions

 VideoMetadata (const QString &filename=QString(), const QString &sortFilename=QString(), const QString &hash=QString(), const QString &trailer=QString(), const QString &coverfile=QString(), const QString &screenshot=QString(), const QString &banner=QString(), const QString &fanart=QString(), const QString &title=QString(), const QString &sortTitle=QString(), const QString &subtitle=QString(), const QString &sortSubtitle=QString(), const QString &tagline=QString(), int year=VIDEO_YEAR_DEFAULT, const QDate &releasedate=QDate(), const QString &inetref=QString(), int collectionref=0, const QString &homepage=QString(), const QString &director=QString(), const QString &studio=QString(), const QString &plot=QString(), float userrating=0.0, const QString &rating=QString(), int length=0, int playcount=0, int season=0, int episode=0, const QDate &insertdate=QDate(), int id=0, ParentalLevel::Level showlevel=ParentalLevel::plLowest, int categoryID=0, int childID=-1, bool browse=true, bool watched=false, const QString &playcommand=QString(), const QString &category=QString(), const genre_list &genres=genre_list(), const country_list &countries=country_list(), const cast_list &cast=cast_list(), const QString &host="", bool processed=false, VideoContentType contenttype=kContentUnknown)
 
 ~VideoMetadata ()
 
 VideoMetadata (MSqlQuery &query)
 
 VideoMetadata (const VideoMetadata &rhs)
 
VideoMetadataoperator= (const VideoMetadata &rhs)
 
bool sortBefore (const VideoMetadata &rhs) const
 
void toMap (InfoMap &metadataMap)
 
void GetStateMap (InfoMap &stateMap)
 
void GetImageMap (InfoMap &imageMap)
 
const QString & GetPrefix () const
 
void SetPrefix (const QString &prefix)
 
const QString & GetTitle () const
 
const QString & GetSortTitle () const
 
void SetTitle (const QString &title, const QString &sortTitle="")
 
const QString & GetSubtitle () const
 
const QString & GetSortSubtitle () const
 
void SetSubtitle (const QString &subtitle, const QString &sortSubtitle="")
 
const QString & GetTagline () const
 
void SetTagline (const QString &tagline)
 
int GetYear () const
 
void SetYear (int year)
 
QDate GetReleaseDate () const
 
void SetReleaseDate (QDate releasedate)
 
const QString & GetInetRef () const
 
void SetInetRef (const QString &inetRef)
 
int GetCollectionRef () const
 
void SetCollectionRef (int collectionref)
 
const QString & GetHomepage () const
 
void SetHomepage (const QString &homepage)
 
const QString & GetDirector () const
 
void SetDirector (const QString &director)
 
const QString & GetStudio () const
 
void SetStudio (const QString &studio)
 
const QString & GetPlot () const
 
void SetPlot (const QString &plot)
 
float GetUserRating () const
 
void SetUserRating (float userRating)
 
const QString & GetRating () const
 
void SetRating (const QString &rating)
 
int GetLength () const
 
void SetLength (int length)
 
int GetSeason () const
 
void SetSeason (int season)
 
int GetEpisode () const
 
void SetEpisode (int episode)
 
QDate GetInsertdate () const
 
void SetInsertdate (QDate date)
 
unsigned int GetID () const
 
void SetID (int id)
 
int GetChildID () const
 
void SetChildID (int childID)
 
bool GetBrowse () const
 
void SetBrowse (bool browse)
 
bool GetWatched () const
 
void SetWatched (bool watched)
 
bool GetProcessed () const
 
void SetProcessed (bool processed)
 
VideoContentType GetContentType () const
 
void SetContentType (VideoContentType contenttype)
 
const QString & GetPlayCommand () const
 
void SetPlayCommand (const QString &playCommand)
 
unsigned int GetPlayCount () const
 
void SetPlayCount (int count)
 
ParentalLevel::Level GetShowLevel () const
 
void SetShowLevel (ParentalLevel::Level showLevel)
 
const QString & GetHost () const
 
void SetHost (const QString &host)
 
const QString & GetFilename () const
 
const QString & GetSortFilename () const
 
void SetFilename (const QString &filename, const QString &sortFilename="")
 
const QString & GetHash () const
 
void SetHash (const QString &hash)
 
const QString & GetTrailer () const
 
void SetTrailer (const QString &trailer)
 
const QString & GetCoverFile () const
 
void SetCoverFile (const QString &coverFile)
 
const QString & GetScreenshot () const
 
void SetScreenshot (const QString &screenshot)
 
const QString & GetBanner () const
 
void SetBanner (const QString &banner)
 
const QString & GetFanart () const
 
void SetFanart (const QString &fanart)
 
const QString & GetCategory () const
 
const genre_listGetGenres () const
 
void SetGenres (const genre_list &genres)
 
const cast_listGetCast () const
 
void SetCast (const cast_list &cast)
 
const country_listGetCountries () const
 
void SetCountries (const country_list &countries)
 
int GetCategoryID () const
 
void SetCategoryID (int id)
 
void SaveToDatabase ()
 
void UpdateDatabase ()
 
bool DeleteFromDatabase ()
 
bool FillDataFromFilename (const VideoMetadataListManager &cache)
 
bool DeleteFile ()
 
void Reset ()
 Resets to default metadata. More...
 
bool IsHostSet () const
 

Static Public Member Functions

static int UpdateHashedDBRecord (const QString &hash, const QString &file_name, const QString &host)
 
static QString VideoFileHash (const QString &file_name, const QString &host)
 
static QString FilenameToMeta (const QString &file_name, int position)
 
static QString TrimTitle (const QString &title, bool ignore_case)
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (VideoMetadata)
 

Private Attributes

class VideoMetadataImpm_imp
 

Detailed Description

Definition at line 24 of file videometadata.h.

Member Typedef Documentation

◆ genre_entry

typedef std::pair<int, QString> VideoMetadata::genre_entry

Definition at line 29 of file videometadata.h.

◆ country_entry

typedef std::pair<int, QString> VideoMetadata::country_entry

Definition at line 30 of file videometadata.h.

◆ cast_entry

typedef std::pair<int, QString> VideoMetadata::cast_entry

Definition at line 31 of file videometadata.h.

◆ genre_list

typedef std::vector<genre_entry> VideoMetadata::genre_list

Definition at line 32 of file videometadata.h.

◆ country_list

Definition at line 33 of file videometadata.h.

◆ cast_list

typedef std::vector<cast_entry> VideoMetadata::cast_list

Definition at line 34 of file videometadata.h.

Constructor & Destructor Documentation

◆ VideoMetadata() [1/3]

VideoMetadata::VideoMetadata ( const QString &  filename = QString(),
const QString &  sortFilename = QString(),
const QString &  hash = QString(),
const QString &  trailer = QString(),
const QString &  coverfile = QString(),
const QString &  screenshot = QString(),
const QString &  banner = QString(),
const QString &  fanart = QString(),
const QString &  title = QString(),
const QString &  sortTitle = QString(),
const QString &  subtitle = QString(),
const QString &  sortSubtitle = QString(),
const QString &  tagline = QString(),
int  year = VIDEO_YEAR_DEFAULT,
const QDate &  releasedate = QDate(),
const QString &  inetref = QString(),
int  collectionref = 0,
const QString &  homepage = QString(),
const QString &  director = QString(),
const QString &  studio = QString(),
const QString &  plot = QString(),
float  userrating = 0.0,
const QString &  rating = QString(),
int  length = 0,
int  playcount = 0,
int  season = 0,
int  episode = 0,
const QDate &  insertdate = QDate(),
int  id = 0,
ParentalLevel::Level  showlevel = ParentalLevel::plLowest,
int  categoryID = 0,
int  childID = -1,
bool  browse = true,
bool  watched = false,
const QString &  playcommand = QString(),
const QString &  category = QString(),
const genre_list genres = genre_list(),
const country_list countries = country_list(),
const cast_list cast = cast_list(),
const QString &  host = "",
bool  processed = false,
VideoContentType  contenttype = kContentUnknown 
)

Definition at line 1160 of file videometadata.cpp.

◆ ~VideoMetadata()

VideoMetadata::~VideoMetadata ( )

Definition at line 1187 of file videometadata.cpp.

◆ VideoMetadata() [2/3]

VideoMetadata::VideoMetadata ( MSqlQuery query)
explicit

Definition at line 1192 of file videometadata.cpp.

◆ VideoMetadata() [3/3]

VideoMetadata::VideoMetadata ( const VideoMetadata rhs)

Definition at line 1197 of file videometadata.cpp.

Member Function Documentation

◆ Q_DECLARE_TR_FUNCTIONS()

VideoMetadata::Q_DECLARE_TR_FUNCTIONS ( VideoMetadata  )
private

◆ UpdateHashedDBRecord()

int VideoMetadata::UpdateHashedDBRecord ( const QString &  hash,
const QString &  file_name,
const QString &  host 
)
static

Definition at line 1005 of file videometadata.cpp.

Referenced by VideoScannerThread::updateDB().

◆ VideoFileHash()

QString VideoMetadata::VideoFileHash ( const QString &  file_name,
const QString &  host 
)
static

◆ FilenameToMeta()

QString VideoMetadata::FilenameToMeta ( const QString &  file_name,
int  position 
)
static

◆ TrimTitle()

static QString VideoMetadata::TrimTitle ( const QString &  title,
bool  ignore_case 
)
static

◆ operator=()

VideoMetadata & VideoMetadata::operator= ( const VideoMetadata rhs)

Definition at line 1202 of file videometadata.cpp.

◆ sortBefore()

bool VideoMetadata::sortBefore ( const VideoMetadata rhs) const

Definition at line 1807 of file videometadata.cpp.

Referenced by VideoFilterSettings::meta_less_than().

◆ toMap()

void VideoMetadata::toMap ( InfoMap metadataMap)

◆ GetStateMap()

void VideoMetadata::GetStateMap ( InfoMap stateMap)

Definition at line 1271 of file videometadata.cpp.

Referenced by AddFileNode(), and toMap().

◆ GetImageMap()

void VideoMetadata::GetImageMap ( InfoMap imageMap)

Definition at line 1280 of file videometadata.cpp.

Referenced by AddFileNode(), and toMap().

◆ GetPrefix()

const QString & VideoMetadata::GetPrefix ( ) const

Definition at line 1329 of file videometadata.cpp.

Referenced by AddMetadataToDir().

◆ SetPrefix()

void VideoMetadata::SetPrefix ( const QString &  prefix)

Definition at line 1334 of file videometadata.cpp.

◆ GetTitle()

const QString & VideoMetadata::GetTitle ( void  ) const

◆ GetSortTitle()

const QString & VideoMetadata::GetSortTitle ( void  ) const

Definition at line 1344 of file videometadata.cpp.

Referenced by toMap().

◆ SetTitle()

void VideoMetadata::SetTitle ( const QString &  title,
const QString &  sortTitle = "" 
)

◆ GetSubtitle()

const QString & VideoMetadata::GetSubtitle ( void  ) const

◆ GetSortSubtitle()

const QString & VideoMetadata::GetSortSubtitle ( void  ) const

Definition at line 1359 of file videometadata.cpp.

Referenced by toMap().

◆ SetSubtitle()

void VideoMetadata::SetSubtitle ( const QString &  subtitle,
const QString &  sortSubtitle = "" 
)

◆ GetTagline()

const QString & VideoMetadata::GetTagline ( ) const

◆ SetTagline()

void VideoMetadata::SetTagline ( const QString &  tagline)

◆ GetYear()

int VideoMetadata::GetYear ( ) const

◆ SetYear()

void VideoMetadata::SetYear ( int  year)

◆ GetReleaseDate()

QDate VideoMetadata::GetReleaseDate ( ) const

◆ SetReleaseDate()

void VideoMetadata::SetReleaseDate ( QDate  releasedate)

◆ GetInetRef()

const QString & VideoMetadata::GetInetRef ( void  ) const

◆ SetInetRef()

void VideoMetadata::SetInetRef ( const QString &  inetRef)

◆ GetCollectionRef()

int VideoMetadata::GetCollectionRef ( ) const

Definition at line 1409 of file videometadata.cpp.

◆ SetCollectionRef()

void VideoMetadata::SetCollectionRef ( int  collectionref)

Definition at line 1414 of file videometadata.cpp.

◆ GetHomepage()

const QString & VideoMetadata::GetHomepage ( ) const

◆ SetHomepage()

void VideoMetadata::SetHomepage ( const QString &  homepage)

◆ GetDirector()

const QString & VideoMetadata::GetDirector ( ) const

◆ SetDirector()

void VideoMetadata::SetDirector ( const QString &  director)

◆ GetStudio()

const QString & VideoMetadata::GetStudio ( ) const

◆ SetStudio()

void VideoMetadata::SetStudio ( const QString &  studio)

◆ GetPlot()

const QString & VideoMetadata::GetPlot ( ) const

◆ SetPlot()

void VideoMetadata::SetPlot ( const QString &  plot)

◆ GetUserRating()

float VideoMetadata::GetUserRating ( ) const

◆ SetUserRating()

void VideoMetadata::SetUserRating ( float  userRating)

◆ GetRating()

const QString & VideoMetadata::GetRating ( ) const

◆ SetRating()

void VideoMetadata::SetRating ( const QString &  rating)

◆ GetLength()

int VideoMetadata::GetLength ( ) const

◆ SetLength()

void VideoMetadata::SetLength ( int  length)

◆ GetSeason()

int VideoMetadata::GetSeason ( void  ) const

◆ SetSeason()

void VideoMetadata::SetSeason ( int  season)

◆ GetEpisode()

int VideoMetadata::GetEpisode ( void  ) const

◆ SetEpisode()

void VideoMetadata::SetEpisode ( int  episode)

◆ GetInsertdate()

QDate VideoMetadata::GetInsertdate ( ) const

◆ SetInsertdate()

void VideoMetadata::SetInsertdate ( QDate  date)

Definition at line 1524 of file videometadata.cpp.

◆ GetID()

unsigned int VideoMetadata::GetID ( ) const

◆ SetID()

void VideoMetadata::SetID ( int  id)

Definition at line 1534 of file videometadata.cpp.

◆ GetChildID()

int VideoMetadata::GetChildID ( ) const

Definition at line 1539 of file videometadata.cpp.

Referenced by EditMetadataDialog::fillWidgets(), and toMap().

◆ SetChildID()

void VideoMetadata::SetChildID ( int  childID)

Definition at line 1544 of file videometadata.cpp.

Referenced by EditMetadataDialog::SetChild().

◆ GetBrowse()

bool VideoMetadata::GetBrowse ( ) const

◆ SetBrowse()

void VideoMetadata::SetBrowse ( bool  browse)

Definition at line 1554 of file videometadata.cpp.

◆ GetWatched()

bool VideoMetadata::GetWatched ( ) const

◆ SetWatched()

void VideoMetadata::SetWatched ( bool  watched)

Definition at line 1564 of file videometadata.cpp.

Referenced by VideoDialog::ToggleWatched().

◆ GetProcessed()

bool VideoMetadata::GetProcessed ( ) const

◆ SetProcessed()

void VideoMetadata::SetProcessed ( bool  processed)

◆ GetContentType()

VideoContentType VideoMetadata::GetContentType ( ) const

Definition at line 1579 of file videometadata.cpp.

◆ SetContentType()

void VideoMetadata::SetContentType ( VideoContentType  contenttype)

Definition at line 1584 of file videometadata.cpp.

◆ GetPlayCommand()

const QString & VideoMetadata::GetPlayCommand ( ) const

◆ SetPlayCommand()

void VideoMetadata::SetPlayCommand ( const QString &  playCommand)

Definition at line 1594 of file videometadata.cpp.

Referenced by EditMetadataDialog::SetPlayer().

◆ GetPlayCount()

unsigned int VideoMetadata::GetPlayCount ( ) const

Definition at line 1489 of file videometadata.cpp.

Referenced by toMap().

◆ SetPlayCount()

void VideoMetadata::SetPlayCount ( int  count)

Definition at line 1494 of file videometadata.cpp.

◆ GetShowLevel()

ParentalLevel::Level VideoMetadata::GetShowLevel ( ) const

◆ SetShowLevel()

void VideoMetadata::SetShowLevel ( ParentalLevel::Level  showLevel)

◆ GetHost()

const QString & VideoMetadata::GetHost ( ) const

◆ SetHost()

void VideoMetadata::SetHost ( const QString &  host)

Definition at line 1634 of file videometadata.cpp.

Referenced by Video::AddVideo(), and VideoScannerThread::updateDB().

◆ GetFilename()

const QString & VideoMetadata::GetFilename ( ) const

◆ GetSortFilename()

const QString & VideoMetadata::GetSortFilename ( ) const

◆ SetFilename()

void VideoMetadata::SetFilename ( const QString &  filename,
const QString &  sortFilename = "" 
)

Definition at line 1639 of file videometadata.cpp.

◆ GetHash()

const QString & VideoMetadata::GetHash ( ) const

◆ SetHash()

void VideoMetadata::SetHash ( const QString &  hash)

Definition at line 1624 of file videometadata.cpp.

◆ GetTrailer()

const QString & VideoMetadata::GetTrailer ( ) const

◆ SetTrailer()

void VideoMetadata::SetTrailer ( const QString &  trailer)

Definition at line 1649 of file videometadata.cpp.

Referenced by EditMetadataDialog::SetTrailer().

◆ GetCoverFile()

const QString & VideoMetadata::GetCoverFile ( ) const

◆ SetCoverFile()

void VideoMetadata::SetCoverFile ( const QString &  coverFile)

◆ GetScreenshot()

const QString & VideoMetadata::GetScreenshot ( ) const

◆ SetScreenshot()

void VideoMetadata::SetScreenshot ( const QString &  screenshot)

◆ GetBanner()

const QString & VideoMetadata::GetBanner ( ) const

◆ SetBanner()

void VideoMetadata::SetBanner ( const QString &  banner)

◆ GetFanart()

const QString & VideoMetadata::GetFanart ( ) const

◆ SetFanart()

void VideoMetadata::SetFanart ( const QString &  fanart)

◆ GetCategory()

const QString & VideoMetadata::GetCategory ( void  ) const

Definition at line 1694 of file videometadata.cpp.

Referenced by VideoListImp::buildGroupList(), and toMap().

◆ GetGenres()

const VideoMetadata::genre_list & VideoMetadata::GetGenres ( ) const

◆ SetGenres()

void VideoMetadata::SetGenres ( const genre_list genres)

◆ GetCast()

const VideoMetadata::cast_list & VideoMetadata::GetCast ( ) const

◆ SetCast()

void VideoMetadata::SetCast ( const cast_list cast)

◆ GetCountries()

const VideoMetadata::country_list & VideoMetadata::GetCountries ( ) const

Definition at line 1724 of file videometadata.cpp.

Referenced by GetDisplayCountries(), and VideoFilterSettings::matches_filter().

◆ SetCountries()

void VideoMetadata::SetCountries ( const country_list countries)

◆ GetCategoryID()

int VideoMetadata::GetCategoryID ( ) const

◆ SetCategoryID()

void VideoMetadata::SetCategoryID ( int  id)

◆ SaveToDatabase()

void VideoMetadata::SaveToDatabase ( )

Definition at line 1744 of file videometadata.cpp.

Referenced by Video::AddVideo(), and VideoScannerThread::updateDB().

◆ UpdateDatabase()

void VideoMetadata::UpdateDatabase ( )

◆ DeleteFromDatabase()

bool VideoMetadata::DeleteFromDatabase ( )

Definition at line 1754 of file videometadata.cpp.

◆ FillDataFromFilename()

bool VideoMetadata::FillDataFromFilename ( const VideoMetadataListManager cache)

Definition at line 1776 of file videometadata.cpp.

◆ DeleteFile()

bool VideoMetadata::DeleteFile ( )

Definition at line 1792 of file videometadata.cpp.

◆ Reset()

void VideoMetadata::Reset ( void  )

Resets to default metadata.

Definition at line 1797 of file videometadata.cpp.

Referenced by VideoDialog::ResetMetadata().

◆ IsHostSet()

bool VideoMetadata::IsHostSet ( ) const

Member Data Documentation

◆ m_imp

class VideoMetadataImp* VideoMetadata::m_imp
private

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