oopapidocs
2.0
|
Wrapper for Sql Table "MetaData". More...
#include <metadatatable.h>
Signals | |
void | inserted (MetaDataValue v) |
Emitted after a record has been inserted into the database. | |
Public Member Functions | |
int | visit (QString directory) |
Recursively searches for media files to add metadata to the table. | |
bool | clearTable () |
Drops the metadata table, in preparation for a full rescan. | |
QStringList | genres () const |
Sorted list of genres in the metadata table. | |
bool | hasMetaData (QString fileName, bool fetch=false, bool refresh=false) |
Check if there is metadata for this track available in the table. | |
bool | dropMetaData (QString fileName) |
drops row from table | |
MetaDataValue | findRecord (QString fileName) |
Uses database table to find metadata value. | |
Protected Member Functions | |
MetaDataTable (QObject *parent=0) |
Wrapper for Sql Table "MetaData".
Can be used to store metadata for other media files besides MP3. Tested on MySQL. SQLite is almost working too.
Definition at line 21 of file metadatatable.h.
MetaDataTable::MetaDataTable | ( | QObject * | parent = 0 | ) | [protected] |
Definition at line 35 of file metadatatable.cpp.
References Abstract::MetaDataLoader::instance().
bool MetaDataTable::clearTable | ( | ) |
Drops the metadata table, in preparation for a full rescan.
Definition at line 102 of file metadatatable.cpp.
MetaDataValue MetaDataTable::findRecord | ( | QString | fileName | ) |
Uses database table to find metadata value.
Definition at line 168 of file metadatatable.cpp.
Referenced by hasMetaData().
bool MetaDataTable::hasMetaData | ( | QString | fileName, |
bool | fetch = false , |
||
bool | refresh = false |
||
) |
Check if there is metadata for this track available in the table.
Insert (or update) the record in the metadata table for this track.
fetch | if true, and record was not in the table, fetch the metadata and add to table. |
refresh | if true, fetch metadata and update table regardless of returned value |
Definition at line 160 of file metadatatable.cpp.
References findRecord(), and Abstract::MetaDataLoader::get().
Referenced by PlayListDb::addFile(), and visit().
int MetaDataTable::visit | ( | QString | directory | ) |
Recursively searches for media files to add metadata to the table.
Ignores files that were already added previously.
directory | the path to start searching |
Definition at line 218 of file metadatatable.cpp.
References hasMetaData().