blob: e53ac0e6f615fb1ebe58ec36a5636e4a04aedf61 (
plain)
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
|
#pragma once
#include "sources/metadatasource.h"
#include "track/trackmetadatataglib.h"
namespace mixxx {
// Universal default implementation of IMetadataSource using TagLib.
class MetadataSourceTagLib : public MetadataSource {
public:
explicit MetadataSourceTagLib(
QString fileName)
: m_fileName(fileName),
m_fileType(taglib::getFileTypeFromFileName(fileName)) {
}
MetadataSourceTagLib(
QString fileName,
taglib::FileType fileType)
: m_fileName(fileName),
m_fileType(fileType) {
}
std::pair<ImportResult, QDateTime> importTrackMetadataAndCoverImage(
TrackMetadata* pTrackMetadata,
QImage* pCoverArt) const override;
std::pair<ExportResult, QDateTime> exportTrackMetadata(
const TrackMetadata& trackMetadata) const override;
private:
std::pair<ImportResult, QDateTime> afterImport(ImportResult importResult) const;
std::pair<ExportResult, QDateTime> afterExport(ExportResult exportResult) const;
QString m_fileName;
taglib::FileType m_fileType;
};
} //namespace mixxx
|