The SqlDatabase class uses SQLite to store few but useful tables for tracks, playlists, etc.
More...
#include <sqldatabase.h>
|
| SqlDatabase (QObject *parent=nullptr) |
|
| ~SqlDatabase () |
|
void | reset () |
|
uint | insertIntoTablePlaylists (const PlaylistDAO &playlist, const QStringList &tracks, bool isOverwriting) |
|
bool | insertIntoTablePlaylistTracks (uint playlistId, const QStringList &tracks, bool isOverwriting=false) |
|
bool | insertIntoTableTracks (const TrackDAO &track) |
|
bool | insertIntoTableTracks (const std::list< TrackDAO > &tracks) |
|
void | removeCoverForAlbum (bool internalCover, const QString &artistNorm, const QString &albumNorm) |
|
bool | removePlaylist (uint playlistId) |
|
void | removePlaylistsFromHost (const QString &host) |
|
void | removeRecordsFromHost (const QString &host) |
|
Cover * | selectCoverFromURI (const QString &uri) |
|
QStringList | selectPlaylistTracks (uint playlistID, bool withPrefix=true) |
|
PlaylistDAO | selectPlaylist (uint playlistId) |
|
QList< PlaylistDAO > | selectPlaylists () |
|
TrackDAO | selectTrackByURI (const QString &uri) |
|
bool | playlistHasBackgroundImage (uint playlistID) |
|
bool | updateTablePlaylist (const PlaylistDAO &playlist) |
|
void | updateTablePlaylistWithBackgroundImage (uint playlistID, const QString &backgroundImagePath) |
|
void | updateTableAlbumWithCoverImage (const QString &coverPath, const QString &album, const QString &artist) |
|
void | updateTracks (const QStringList &oldPaths, const QStringList &newPaths) |
|
QString | normalizeField (const QString &s) const |
|
The SqlDatabase class uses SQLite to store few but useful tables for tracks, playlists, etc.
- Author
- Matthieu Bachelier
- Copyright
- GNU General Public License v3
◆ SqlDatabase()
SqlDatabase::SqlDatabase |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
TEST Monitor Filesystem
TODO: full rescan <> rebuild which is only for local tracks Remote tracks (like Deezer) are still not synchronized
◆ ~SqlDatabase()
SqlDatabase::~SqlDatabase |
( |
| ) |
|
◆ aboutToUpdateView
void SqlDatabase::aboutToUpdateView |
( |
| ) |
|
|
signal |
◆ insertIntoTablePlaylists()
uint SqlDatabase::insertIntoTablePlaylists |
( |
const PlaylistDAO & |
playlist, |
|
|
const QStringList & |
tracks, |
|
|
bool |
isOverwriting |
|
) |
| |
◆ insertIntoTablePlaylistTracks()
bool SqlDatabase::insertIntoTablePlaylistTracks |
( |
uint |
playlistId, |
|
|
const QStringList & |
tracks, |
|
|
bool |
isOverwriting = false |
|
) |
| |
◆ insertIntoTableTracks() [1/2]
bool SqlDatabase::insertIntoTableTracks |
( |
const TrackDAO & |
track | ) |
|
◆ insertIntoTableTracks() [2/2]
bool SqlDatabase::insertIntoTableTracks |
( |
const std::list< TrackDAO > & |
tracks | ) |
|
◆ normalizeField()
QString SqlDatabase::normalizeField |
( |
const QString & |
s | ) |
const |
◆ playlistHasBackgroundImage()
bool SqlDatabase::playlistHasBackgroundImage |
( |
uint |
playlistID | ) |
|
◆ removeCoverForAlbum()
void SqlDatabase::removeCoverForAlbum |
( |
bool |
internalCover, |
|
|
const QString & |
artistNorm, |
|
|
const QString & |
albumNorm |
|
) |
| |
◆ removePlaylist()
bool SqlDatabase::removePlaylist |
( |
uint |
playlistId | ) |
|
XXX: CASCADE not working?
◆ removePlaylistsFromHost()
void SqlDatabase::removePlaylistsFromHost |
( |
const QString & |
host | ) |
|
◆ removeRecordsFromHost()
void SqlDatabase::removeRecordsFromHost |
( |
const QString & |
host | ) |
|
◆ reset()
void SqlDatabase::reset |
( |
| ) |
|
◆ saveCoverRef
void SqlDatabase::saveCoverRef |
( |
const QString & |
coverPath, |
|
|
const QString & |
track |
|
) |
| |
|
slot |
Reads an external picture which is close to multimedia files (same folder).
◆ saveFileRef
void SqlDatabase::saveFileRef |
( |
const QString & |
absFilePath | ) |
|
|
slot |
Reads a file from the filesystem and adds it into the library.
◆ selectCoverFromURI()
Cover * SqlDatabase::selectCoverFromURI |
( |
const QString & |
uri | ) |
|
◆ selectPlaylist()
PlaylistDAO SqlDatabase::selectPlaylist |
( |
uint |
playlistId | ) |
|
◆ selectPlaylists()
◆ selectPlaylistTracks()
QStringList SqlDatabase::selectPlaylistTracks |
( |
uint |
playlistID, |
|
|
bool |
withPrefix = true |
|
) |
| |
◆ selectTrackByURI()
TrackDAO SqlDatabase::selectTrackByURI |
( |
const QString & |
uri | ) |
|
◆ updateTableAlbumWithCoverImage()
void SqlDatabase::updateTableAlbumWithCoverImage |
( |
const QString & |
coverPath, |
|
|
const QString & |
album, |
|
|
const QString & |
artist |
|
) |
| |
◆ updateTablePlaylist()
bool SqlDatabase::updateTablePlaylist |
( |
const PlaylistDAO & |
playlist | ) |
|
◆ updateTablePlaylistWithBackgroundImage()
void SqlDatabase::updateTablePlaylistWithBackgroundImage |
( |
uint |
playlistID, |
|
|
const QString & |
backgroundImagePath |
|
) |
| |
◆ updateTracks()
void SqlDatabase::updateTracks |
( |
const QStringList & |
oldPaths, |
|
|
const QStringList & |
newPaths |
|
) |
| |
Update a list of tracks. If track name has changed, it will be removed from Library then added right after.
Update a list of tracks. If track name has changed, will be removed from Library then added right after.
The documentation for this class was generated from the following files: