'modified title' is not really required
This commit is contained in:
@@ -841,10 +841,6 @@ Song read(const QString &fileName)
|
||||
readTags(fileref, &song, 0);
|
||||
song.file=fileName;
|
||||
song.time=fileref.audioProperties() ? fileref.audioProperties()->length() : 0;
|
||||
if (!song.albumartist.isEmpty() && song.albumartist != song.artist) {
|
||||
song.modifiedtitle = song.artist + QLatin1String(" - ") + song.title;
|
||||
}
|
||||
|
||||
return song;
|
||||
}
|
||||
|
||||
|
||||
@@ -240,9 +240,6 @@ Song MPDParseUtils::parseSong(const QByteArray &data)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!albumartist.isEmpty() && albumartist != song.artist) {
|
||||
song.modifiedtitle = song.artist + " - " + song.title;
|
||||
}
|
||||
return song;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,13 +40,13 @@ const quint16 Song::constNullKey(0xFFFF);
|
||||
|
||||
Song::Song()
|
||||
: id(-1)
|
||||
, time(0)
|
||||
, track(0)
|
||||
// , pos(0)
|
||||
, disc(0)
|
||||
, time(0)
|
||||
, track(0)
|
||||
, year(0)
|
||||
, size(0)
|
||||
, type(Standard)
|
||||
, size(0)
|
||||
, key(constNullKey)
|
||||
{
|
||||
}
|
||||
@@ -60,7 +60,6 @@ Song & Song::operator=(const Song &s)
|
||||
artist = s.artist;
|
||||
albumartist = s.albumartist;
|
||||
title = s.title;
|
||||
modifiedtitle = s.modifiedtitle;
|
||||
track = s.track;
|
||||
// pos = s.pos;
|
||||
disc = s.disc;
|
||||
|
||||
23
mpd/song.h
23
mpd/song.h
@@ -37,9 +37,9 @@ struct Song
|
||||
static const quint16 constNullKey;
|
||||
|
||||
enum Type {
|
||||
Standard,
|
||||
SingleTracks,
|
||||
MultipleArtists
|
||||
Standard = 0,
|
||||
SingleTracks = 1,
|
||||
MultipleArtists = 2
|
||||
};
|
||||
|
||||
qint32 id;
|
||||
@@ -48,18 +48,17 @@ struct Song
|
||||
QString artist;
|
||||
QString albumartist;
|
||||
QString title;
|
||||
QString modifiedtitle;
|
||||
quint16 time;
|
||||
qint16 track;
|
||||
// quint32 pos;
|
||||
quint16 disc;
|
||||
quint16 year;
|
||||
QString genre;
|
||||
QString name;
|
||||
// quint32 pos;
|
||||
quint16 disc;
|
||||
quint16 time;
|
||||
qint16 track;
|
||||
quint16 year : 14;
|
||||
mutable Type type : 2;
|
||||
mutable qint32 size;
|
||||
mutable Type type;
|
||||
|
||||
// Only used in PlayQueue...
|
||||
// Only used in PlayQueue/PlayLists...
|
||||
quint16 key;
|
||||
|
||||
Song();
|
||||
@@ -77,7 +76,7 @@ struct Song
|
||||
QString entryName() const;
|
||||
QString artistSong() const;
|
||||
const QString & albumArtist() const { return albumartist.isEmpty() ? artist : albumartist; }
|
||||
const QString & displayTitle() const { return modifiedtitle.isEmpty() ? title : modifiedtitle; }
|
||||
QString displayTitle() const { return !albumartist.isEmpty() && albumartist!=artist ? artistSong() : title; }
|
||||
QString trackAndTitleStr(bool addArtist=false) const;
|
||||
void updateSize(const QString &dir) const;
|
||||
static bool isVariousArtists(const QString &str);
|
||||
|
||||
Reference in New Issue
Block a user