File indexing completed on 2024-04-21 04:48:57

0001 /*
0002    SPDX-FileCopyrightText: 2016 (c) Matthieu Gallien <matthieu_gallien@yahoo.fr>
0003    SPDX-FileCopyrightText: 2019 (c) Alexander Stippich <a.stippich@gmx.net>
0004 
0005    SPDX-License-Identifier: LGPL-3.0-or-later
0006  */
0007 
0008 #include "datatypes.h"
0009 
0010 bool DataTypes::TrackDataType::albumInfoIsSame(const TrackDataType &other) const
0011 {
0012     return hasAlbum() == other.hasAlbum() && album() == other.album() &&
0013            hasAlbumArtist() == other.hasAlbumArtist() && albumArtist() == other.albumArtist();
0014 }
0015 
0016 bool DataTypes::TrackDataType::isSameTrack(const TrackDataType& other) const
0017 {
0018     return title() == other.title() &&
0019            hasAlbum() == other.hasAlbum() && (hasAlbum() ? album() == other.album() : true) &&
0020            hasArtist() == other.hasArtist() && (hasArtist() ? artist() == other.artist() : true) &&
0021            hasAlbumArtist() == other.hasAlbumArtist() && (hasAlbumArtist() ? albumArtist() == other.albumArtist() : true) &&
0022            hasTrackNumber() == other.hasTrackNumber() && (hasTrackNumber() ? trackNumber() == other.trackNumber() : true) &&
0023            hasDiscNumber() == other.hasDiscNumber() && (hasDiscNumber() ? discNumber() == other.discNumber() : true) &&
0024            duration() == other.duration() &&
0025            rating() == other.rating() &&
0026            resourceURI() == other.resourceURI() &&
0027            hasGenre() == other.hasGenre() && (hasGenre() ? genre() == other.genre() : true) &&
0028            hasComposer() == other.hasComposer() && (hasComposer() ? composer() == other.composer() : true) &&
0029            hasLyricist() == other.hasLyricist() && (hasLyricist() ? lyricist() == other.lyricist() : true) &&
0030            hasComment() == other.hasComment() && (hasComment() ? comment() == other.comment() : true) &&
0031            hasYear() == other.hasYear() && (hasYear() ? year() == other.year() : true) &&
0032            hasChannels() == other.hasChannels() && (hasChannels() ? channels() == other.channels() : true) &&
0033            hasBitRate() == other.hasBitRate() && (hasBitRate() ? bitRate() == other.bitRate() : true) &&
0034            hasSampleRate() == other.hasSampleRate() && (hasSampleRate() ? sampleRate() == other.sampleRate() : true);
0035 }
0036 
0037 
0038 #include "moc_datatypes.cpp"