Autoformated code
This commit is contained in:
parent
d3a28a40ed
commit
0ff11ee2e0
@ -17,15 +17,6 @@
|
||||
|
||||
#include "tagreader.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDateTime>
|
||||
#include <QFileInfo>
|
||||
#include <QTextCodec>
|
||||
#include <QUrl>
|
||||
#include <QVector>
|
||||
|
||||
#include <aifffile.h>
|
||||
#include <apefile.h>
|
||||
#include <asffile.h>
|
||||
@ -39,6 +30,14 @@
|
||||
#include <mpcfile.h>
|
||||
#include <mpegfile.h>
|
||||
#include <oggfile.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDateTime>
|
||||
#include <QFileInfo>
|
||||
#include <QTextCodec>
|
||||
#include <QUrl>
|
||||
#include <QVector>
|
||||
#include <memory>
|
||||
#ifdef TAGLIB_HAS_OPUS
|
||||
#include <opusfile.h>
|
||||
#endif
|
||||
@ -46,6 +45,7 @@
|
||||
#include <oggflacfile.h>
|
||||
#include <popularimeterframe.h>
|
||||
#include <speexfile.h>
|
||||
#include <sys/stat.h>
|
||||
#include <tag.h>
|
||||
#include <tdebuglistener.h>
|
||||
#include <textidentificationframe.h>
|
||||
@ -56,8 +56,6 @@
|
||||
#include <wavfile.h>
|
||||
#include <wavpackfile.h>
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "core/logging.h"
|
||||
#include "core/messagehandler.h"
|
||||
#include "core/timeconstants.h"
|
||||
@ -156,8 +154,7 @@ void TagReader::GuessArtistAndTitle(pb::tagreader::SongMetadata *song) const {
|
||||
if (rx.indexIn(bn) >= 0) {
|
||||
artist = rx.cap(1);
|
||||
title = rx.cap(2);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
title = WithoutExtension(bn);
|
||||
}
|
||||
|
||||
@ -165,11 +162,16 @@ void TagReader::GuessArtistAndTitle(pb::tagreader::SongMetadata *song) const {
|
||||
title = ReplaceUnderscoresWithSpaces(title);
|
||||
artist = artist.trimmed();
|
||||
title = title.trimmed();
|
||||
if (!artist.isEmpty()) { song->set_artist(artist.toUtf8().data()); }
|
||||
if (!title.isEmpty()) { song->set_title(title.toUtf8().data()); }
|
||||
if (!artist.isEmpty()) {
|
||||
song->set_artist(artist.toUtf8().data());
|
||||
}
|
||||
if (!title.isEmpty()) {
|
||||
song->set_title(title.toUtf8().data());
|
||||
}
|
||||
}
|
||||
|
||||
void TagReader::GuessAlbum(const QFileInfo &info, pb::tagreader::SongMetadata *song) const {
|
||||
void TagReader::GuessAlbum(const QFileInfo& info,
|
||||
pb::tagreader::SongMetadata* song) const {
|
||||
QString album = QString::fromStdString(song->album());
|
||||
if (!album.isEmpty()) return;
|
||||
const QString strDir = info.absoluteDir().absolutePath();
|
||||
@ -186,8 +188,7 @@ void TagReader::GuessAlbum(const QFileInfo &info, pb::tagreader::SongMetadata *s
|
||||
}
|
||||
|
||||
TagReader::TagReader()
|
||||
: factory_(new TagLibFileRefFactory),
|
||||
kEmbeddedCover("(embedded)") {}
|
||||
: factory_(new TagLibFileRefFactory), kEmbeddedCover("(embedded)") {}
|
||||
|
||||
void TagReader::ReadFile(const QString& filename,
|
||||
pb::tagreader::SongMetadata* song) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user