ListenBrainzScrobbler: Only send duration_ms when valid
This commit is contained in:
parent
8edb6eaa81
commit
7202a5734c
|
@ -384,7 +384,9 @@ QJsonObject ListenBrainzScrobbler::JsonTrackMetadata(const ScrobbleMetadata &met
|
|||
|
||||
QJsonObject object_additional_info;
|
||||
|
||||
object_additional_info.insert("duration_ms", metadata.length_nanosec / kNsecPerMsec);
|
||||
if (metadata.length_nanosec > 0) {
|
||||
object_additional_info.insert("duration_ms", metadata.length_nanosec / kNsecPerMsec);
|
||||
}
|
||||
|
||||
if (metadata.track > 0) {
|
||||
object_additional_info.insert("tracknumber", metadata.track);
|
||||
|
|
Loading…
Reference in New Issue