Go to the documentation of this file.
14 using int_to_meta = std::map<unsigned int, metadata_list::iterator>;
26 m_idMap.insert(int_to_meta::value_type((*p)->GetID(),
p));
28 string_to_meta::value_type((*p)->GetFilename(),
p));
41 string_to_meta::const_iterator
p =
m_fileMap.find(file_name);
52 int_to_meta::const_iterator
p =
m_idMap.find(db_id);
75 auto im =
m_idMap.find(metadata->GetID());
79 auto mdi = im->second;
80 (*mdi)->DeleteFromDatabase();
83 auto sm =
m_fileMap.find(metadata->GetFilename());
113 QString sql = QString(
"WHERE intid = %1 LIMIT 1").arg(
id);
133 QString BaseMetadataQuery(
134 "SELECT title, director, studio, plot, rating, year, releasedate,"
135 "userrating, length, playcount, filename, hash, showlevel, "
136 "coverfile, inetref, collectionref, homepage, childid, browse, watched, "
137 "playcommand, category, intid, trailer, screenshot, banner, fanart, "
138 "subtitle, tagline, season, episode, host, insertdate, processed, "
139 "contenttype FROM videometadata ");
142 BaseMetadataQuery.append(sql);
144 query.
prepare(BaseMetadataQuery);
209 if (
p.startsWith(
"myth://"))
212 m_fqPath = ((!
p.isEmpty() &&
p[0] !=
'/') ?
"/" :
"") +
p;
252 QString host, QString
prefix,
254 :
meta_node(parent, is_path_root), m_path(path), m_name(name),
255 m_host(
std::move(host)), m_prefix(
std::move(
prefix)), m_data(
std::move(data))
336 const QVariant &data)
351 const QVariant &data)
355 if (entry && (subdir == entry->getPath()))
374 entry->setParent(
this);
444 if (subdir ==
nullptr)
446 ret = subdir->has_entries();
bool isActive(void) const
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
QSqlQuery wrapper that fetches a DB connection from the connection pool.
std::shared_ptr< MythSortHelper > getMythSortHelper(void)
Get a pointer to the MythSortHelper singleton.
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
static void DBError(const QString &where, const MSqlQuery &query)
void setForwardOnly(bool f)
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.