Closed madmaxoft closed 6 years ago
After the #94 rewrite, rescans are much better defined, but still upon start about 600 out of 3000 songs trigger a tag rescan, although they have their metadata set.
Assumption: The rescan is triggered if the author is NULL in the DB; rescanning the tags sets the author to an invalid variant if the author cannot be detected. Instead, the author should be set to empty string.
Problem: Qt seems to convert between DB NULLs and empty string variants randomly (?!?)
Found the culprit: QVariant a = QString()
creates a NULL variant of type QString; QVariant a = QString("")
creates a regular valid variant containing an empty QString.
If a song has invalid metadata, it is rescanned on each program start again and again. This may pose problems if there are more such songs.