Mercurial > hg > svcore
diff rdf/RDFFeatureWriter.h @ 1206:659372323b45 tony-2.0-integration
Merge latest SV 3.0 branch code
author | Chris Cannam |
---|---|
date | Fri, 19 Aug 2016 15:58:57 +0100 |
parents | c8e291700c0e |
children | c01cbe41aeb5 |
line wrap: on
line diff
--- a/rdf/RDFFeatureWriter.h Tue Oct 20 12:54:06 2015 +0100 +++ b/rdf/RDFFeatureWriter.h Fri Aug 19 15:58:57 2016 +0100 @@ -70,6 +70,19 @@ typedef map<QString, TrackMetadata> TrackMetadataMap; TrackMetadataMap m_metadata; + bool haveTitleArtistMetadata(QString trackId) const { + // Formerly in various places we used to test whether a track + // appeared in the metadata map at all, in order to determine + // whether it had any associated metadata. That won't work any + // more because metadata now includes duration, which can + // appear even if no title/artist are given and which is not + // something whose presence indicates the involvement of a + // "publication Track". So check for artist/title explicitly. + auto mitr = m_metadata.find(trackId); + if (mitr == m_metadata.end()) return false; + return (mitr->second.title != "" || mitr->second.maker != ""); + } + QString m_fixedEventTypeURI; virtual void reviewFileForAppending(QString filename);