MythTV  master
Functions
netutils.cpp File Reference
#include "netutils.h"
#include <QDir>
#include <QFileInfo>
#include "libmythbase/mythcorecontext.h"
#include "libmythbase/mythdate.h"
#include "libmythbase/mythdb.h"
#include "libmythbase/mythdirs.h"
Include dependency graph for netutils.cpp:

Go to the source code of this file.

Functions

bool findTreeGrabberInDB (const QString &commandline, ArticleType type)
 
bool findSearchGrabberInDB (const QString &commandline, ArticleType type)
 
GrabberScriptfindTreeGrabberByCommand (const QString &commandline, ArticleType type)
 
GrabberScriptfindSearchGrabberByCommand (const QString &commandline, ArticleType type)
 
GrabberScript::scriptList findAllDBTreeGrabbers ()
 
GrabberScript::scriptList findAllDBTreeGrabbersByHost (ArticleType type)
 
GrabberScript::scriptList findAllDBSearchGrabbers (ArticleType type)
 
bool insertSearchInDB (GrabberScript *script, ArticleType type)
 
bool insertTreeInDB (GrabberScript *script, ArticleType type)
 
bool insertGrabberInDB (const QString &name, const QString &thumbnail, ArticleType type, const QString &author, const QString &description, const QString &commandline, const double version, bool search, bool tree, bool podcast)
 
bool removeTreeFromDB (GrabberScript *script)
 
bool removeSearchFromDB (GrabberScript *script)
 
bool removeGrabberFromDB (const QString &commandline, const bool search)
 
bool markTreeUpdated (GrabberScript *script, const QDateTime &curTime)
 
bool needsUpdate (GrabberScript *script, std::chrono::hours updateFreq)
 
QDateTime lastUpdate (GrabberScript *script)
 
bool clearTreeItems (const QString &feedcommand)
 
bool isTreeInUse (const QString &feedcommand)
 
bool insertTreeArticleInDB (const QString &feedtitle, const QString &path, const QString &paththumb, ResultItem *item, ArticleType type)
 
QMultiMap< QPair< QString, QString >, ResultItem * > getTreeArticles (const QString &feedtitle, ArticleType type)
 
bool findInDB (const QString &url, ArticleType type)
 
RSSSitefindByURL (const QString &url, ArticleType type)
 
RSSSite::rssList findAllDBRSSByType (ArticleType type)
 
RSSSite::rssList findAllDBRSS ()
 
bool insertInDB (RSSSite *site)
 
bool insertInDB (const QString &name, [[maybe_unused]] const QString &sortname, const QString &thumbnail, const QString &description, const QString &url, const QString &author, const bool download, const QDateTime &updated, ArticleType type)
 
bool removeFromDB (RSSSite *site)
 
bool removeFromDB (const QString &url, ArticleType type)
 
void markUpdated (RSSSite *site)
 
bool clearRSSArticles (const QString &feedtitle, ArticleType type)
 
bool insertRSSArticleInDB (const QString &feedtitle, ResultItem *item, ArticleType type)
 
ResultItem::resultList getRSSArticles (const QString &feedtitle, ArticleType type)
 
QString GetDownloadFilename (const QString &title, const QString &url)
 

Function Documentation

◆ findTreeGrabberInDB()

bool findTreeGrabberInDB ( const QString &  commandline,
ArticleType  type 
)

Definition at line 11 of file netutils.cpp.

Referenced by TreeEditor::FindGrabberInDB().

◆ findSearchGrabberInDB()

bool findSearchGrabberInDB ( const QString &  commandline,
ArticleType  type 
)

Definition at line 31 of file netutils.cpp.

Referenced by SearchEditor::FindGrabberInDB().

◆ findTreeGrabberByCommand()

GrabberScript* findTreeGrabberByCommand ( const QString &  commandline,
ArticleType  type 
)

Definition at line 51 of file netutils.cpp.

◆ findSearchGrabberByCommand()

GrabberScript* findSearchGrabberByCommand ( const QString &  commandline,
ArticleType  type 
)

Definition at line 83 of file netutils.cpp.

◆ findAllDBTreeGrabbers()

GrabberScript::scriptList findAllDBTreeGrabbers ( )

Definition at line 115 of file netutils.cpp.

Referenced by GrabberDownloadThread::run(), and NetTree::TreeRefresh().

◆ findAllDBTreeGrabbersByHost()

GrabberScript::scriptList findAllDBTreeGrabbersByHost ( ArticleType  type)

Definition at line 149 of file netutils.cpp.

Referenced by NetTree::Load().

◆ findAllDBSearchGrabbers()

GrabberScript::scriptList findAllDBSearchGrabbers ( ArticleType  type)

Definition at line 184 of file netutils.cpp.

Referenced by NetSearch::DoListRefresh(), and NetSearch::Load().

◆ insertSearchInDB()

bool insertSearchInDB ( GrabberScript script,
ArticleType  type 
)

Definition at line 219 of file netutils.cpp.

Referenced by SearchEditor::InsertInDB().

◆ insertTreeInDB()

bool insertTreeInDB ( GrabberScript script,
ArticleType  type 
)

Definition at line 230 of file netutils.cpp.

Referenced by TreeEditor::InsertInDB().

◆ insertGrabberInDB()

bool insertGrabberInDB ( const QString &  name,
const QString &  thumbnail,
ArticleType  type,
const QString &  author,
const QString &  description,
const QString &  commandline,
const double  version,
bool  search,
bool  tree,
bool  podcast 
)

Definition at line 241 of file netutils.cpp.

Referenced by insertSearchInDB(), and insertTreeInDB().

◆ removeTreeFromDB()

bool removeTreeFromDB ( GrabberScript script)

Definition at line 276 of file netutils.cpp.

Referenced by TreeEditor::RemoveFromDB().

◆ removeSearchFromDB()

bool removeSearchFromDB ( GrabberScript script)

Definition at line 283 of file netutils.cpp.

Referenced by SearchEditor::RemoveFromDB().

◆ removeGrabberFromDB()

bool removeGrabberFromDB ( const QString &  commandline,
const bool  search 
)

Definition at line 290 of file netutils.cpp.

Referenced by removeSearchFromDB(), and removeTreeFromDB().

◆ markTreeUpdated()

bool markTreeUpdated ( GrabberScript script,
const QDateTime &  curTime 
)

Definition at line 314 of file netutils.cpp.

Referenced by GrabberScript::run().

◆ needsUpdate()

bool needsUpdate ( GrabberScript script,
std::chrono::hours  updateFreq 
)

Definition at line 330 of file netutils.cpp.

Referenced by GrabberDownloadThread::run().

◆ lastUpdate()

QDateTime lastUpdate ( GrabberScript script)

Definition at line 338 of file netutils.cpp.

Referenced by needsUpdate(), and MusicMetadata::updateStreamList().

◆ clearTreeItems()

bool clearTreeItems ( const QString &  feedcommand)

Definition at line 360 of file netutils.cpp.

Referenced by TreeEditor::RemoveFromDB(), and GrabberScript::run().

◆ isTreeInUse()

bool isTreeInUse ( const QString &  feedcommand)

Definition at line 379 of file netutils.cpp.

Referenced by TreeEditor::RemoveFromDB().

◆ insertTreeArticleInDB()

bool insertTreeArticleInDB ( const QString &  feedtitle,
const QString &  path,
const QString &  paththumb,
ResultItem item,
ArticleType  type 
)

Definition at line 399 of file netutils.cpp.

Referenced by GrabberScript::parseDBTree().

◆ getTreeArticles()

QMultiMap<QPair<QString,QString>, ResultItem*> getTreeArticles ( const QString &  feedtitle,
ArticleType  type 
)

Definition at line 463 of file netutils.cpp.

Referenced by NetTree::FillTree().

◆ findInDB()

bool findInDB ( const QString &  url,
ArticleType  type 
)

Definition at line 527 of file netutils.cpp.

Referenced by insertInDB(), and MythNewsConfig::populateSites().

◆ findByURL()

RSSSite* findByURL ( const QString &  url,
ArticleType  type 
)

Definition at line 542 of file netutils.cpp.

Referenced by RSSEditPopup::Create().

◆ findAllDBRSSByType()

RSSSite::rssList findAllDBRSSByType ( ArticleType  type)

Definition at line 577 of file netutils.cpp.

◆ findAllDBRSS()

RSSSite::rssList findAllDBRSS ( )

◆ insertInDB() [1/2]

bool insertInDB ( RSSSite site)

◆ insertInDB() [2/2]

bool insertInDB ( const QString &  name,
[[maybe_unused] ] const QString &  sortname,
const QString &  thumbnail,
const QString &  description,
const QString &  url,
const QString &  author,
const bool  download,
const QDateTime &  updated,
ArticleType  type 
)

Definition at line 653 of file netutils.cpp.

◆ removeFromDB() [1/2]

bool removeFromDB ( RSSSite site)

◆ removeFromDB() [2/2]

bool removeFromDB ( const QString &  url,
ArticleType  type 
)

Definition at line 693 of file netutils.cpp.

◆ markUpdated()

void markUpdated ( RSSSite site)

Definition at line 708 of file netutils.cpp.

Referenced by RSSManager::slotRSSRetrieved().

◆ clearRSSArticles()

bool clearRSSArticles ( const QString &  feedtitle,
ArticleType  type 
)

Definition at line 722 of file netutils.cpp.

Referenced by RSSManager::processAndInsertRSS().

◆ insertRSSArticleInDB()

bool insertRSSArticleInDB ( const QString &  feedtitle,
ResultItem item,
ArticleType  type 
)

Definition at line 742 of file netutils.cpp.

Referenced by RSSManager::processAndInsertRSS().

◆ getRSSArticles()

ResultItem::resultList getRSSArticles ( const QString &  feedtitle,
ArticleType  type 
)

Definition at line 797 of file netutils.cpp.

Referenced by NetTree::FillTree().

◆ GetDownloadFilename()

QString GetDownloadFilename ( const QString &  title,
const QString &  url 
)