Cleaner way of setting online properties on song
This commit is contained in:
committed by
craig.p.drummond
parent
70d1658e0a
commit
4ade487236
@@ -242,10 +242,6 @@ public:
|
||||
QFontMetrics fm(f);
|
||||
int textHeight=fm.height();
|
||||
|
||||
static QString streamsTrans;
|
||||
if (streamsTrans.isEmpty()) {
|
||||
streamsTrans=i18n("Streams");
|
||||
}
|
||||
|
||||
if (isCollection) {
|
||||
title=index.data(Qt::DisplayRole).toString();
|
||||
@@ -257,7 +253,7 @@ public:
|
||||
title=song.name;
|
||||
track=streamText(song, trackTitle, false);
|
||||
} else {
|
||||
title=audiocd ? i18n("Audio CD") : streamsTrans;
|
||||
title=audiocd ? i18n("Audio CD") : i18n("Streams");
|
||||
track=streamText(song, trackTitle);
|
||||
}
|
||||
} else if (isEmpty) {
|
||||
@@ -267,7 +263,7 @@ public:
|
||||
quint16 year=Song::albumYear(song);
|
||||
|
||||
if (year>0) {
|
||||
if (0xFF==song.disc && streamsTrans==song.albumartist) {
|
||||
if (song.isFromOnlineService()) {
|
||||
title=i18nc("album (albumYear)", "%1 (%2)", song.album, year);
|
||||
} else {
|
||||
title=i18nc("artist - album (albumYear)", "%1 - %2 (%3)", song.artistOrComposer(), song.albumName(), year);
|
||||
@@ -278,7 +274,7 @@ public:
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (0xFF==song.disc && streamsTrans==song.albumartist) {
|
||||
if (song.isFromOnlineService()) {
|
||||
title=song.album;
|
||||
} else {
|
||||
title=i18nc("artist - album", "%1 - %2", song.artistOrComposer(), song.albumName());
|
||||
|
||||
Reference in New Issue
Block a user