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);
130 const QString &bindValue)
134 QString BaseMetadataQuery(
135 "SELECT title, director, studio, plot, rating, year, releasedate,"
136 "userrating, length, playcount, filename, hash, showlevel, "
137 "coverfile, inetref, collectionref, homepage, childid, browse, watched, "
138 "playcommand, category, intid, trailer, screenshot, banner, fanart, "
139 "subtitle, tagline, season, episode, host, insertdate, processed, "
140 "contenttype FROM videometadata ");
143 BaseMetadataQuery.append(sql);
145 query.
prepare(BaseMetadataQuery);
146 if (!bindValue.isEmpty())
147 query.
bindValue(
":BINDVALUE", bindValue);
212 if (
p.startsWith(
"myth://"))
215 m_fqPath = ((!
p.isEmpty() &&
p[0] !=
'/') ?
"/" :
"") +
p;
255 QString host, QString
prefix,
257 :
meta_node(parent, is_path_root), m_path(path), m_name(name),
258 m_host(std::move(host)), m_prefix(std::move(
prefix)), m_data(std::move(data))
339 const QVariant &data)
354 const QVariant &data)
358 if (entry && (subdir == entry->getPath()))
377 entry->setParent(
this);
447 if (subdir ==
nullptr)
449 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.
QString doPathname(const QString &pathname) const
Create the sortable form of an item.
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)
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.