-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsqlreader.h
More file actions
49 lines (41 loc) · 1.69 KB
/
sqlreader.h
File metadata and controls
49 lines (41 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/////////////////////////////////////////////////////////////////////////////
// Name: sqlreader.h
// Purpose: Access local Emby dump DB
// Author: Jan Buchholz
// Created: 2026-05-16
// Changed: 2026-05-21
/////////////////////////////////////////////////////////////////////////////
#pragma once
#include <QObject>
#include <QSqlDatabase>
#include <QSqlQuery>
#include "globals.h"
#include "sqlreturntypes.h"
class SqlReader : public QObject {
Q_OBJECT
public:
explicit SqlReader(QObject* parent = nullptr);
~SqlReader();
ErrorCode openAndCheckDB(QString fileName);
void closeDBConnection();
EmbyCollectionResult loadCollections();
ByteArrayResult loadImage(const QString& parentId);
MoviesDataImp loadMovies(const QString& collectionId);
SeriesDataImp loadSeries(const QString& collectionId);
HomeVideosDataImp loadHomeVideos(const QString& collectionId);
MusicVideosDataImp loadMusicVideos(const QString& collectionId);
MusicDataImp loadMusic(const QString& collectionId);
void shutdownDBConnection();
private:
QString m_dbFile;
QSqlDatabase m_db;
VectorStringResult loadGenres(const QString& collectionId,
const QString& parentId);
VectorStringResult loadStudios(const QString& collectionId,
const QString& parentId);
VectorStringResult loadPeople(const QString& collectionId,
const QString& parentId,
const QString& personType);
FolderDataResult loadFolders(const QString& collectionId);
QString lastDBError(const QSqlQuery& q);
};