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_fq_path = ((
p.length() &&
p[0] !=
'/') ?
"/" :
"") +
p;
252 QString host, QString
prefix,
255 m_host(std::move(host)), m_prefix(std::move(
prefix)), m_data(std::move(data))
336 const QVariant &data)
351 const QVariant &data)
353 for (meta_dir_list::const_iterator
p =
m_subdirs.begin();
356 if (subdir == (*p)->getPath())
375 entry->setParent(
this);
445 ret = (*p)->has_entries();
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
QSqlQuery wrapper that fetches a DB connection from the connection pool.
bool isActive(void) const
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
static void DBError(const QString &where, const MSqlQuery &query)
void setForwardOnly(bool f)
std::shared_ptr< MythSortHelper > getMythSortHelper(void)
Get a pointer to the MythSortHelper singleton.