The artwork db field should only be used to save media file artwork metadata,
which mostly means whether it has embedded artwork or not. It should not be
used to save where we found artwork for the file, since that is not static.
So this commit removes for instance ARTWORK_OWN, ARTWORK_DIR etc., which we
weren't using anyway.
Fixes issue when performing an 'api/rescan' (results in RSS_SCAN_META scan type
in this module) that would result in a library_media_save() -> a readd even for
entries that already exist in db. This would result in dropping db record, incl
play_count etc instead of an update
2.10's mxmlDelete memleaks, and mxml is used in many parts of forked-daapd. So
to avoid that we ship upstream's fixed version of mxmlDelete and use that.
Makes it possible for the caller to request that a previous callback is
replaced, so we don't end up with more and more callbacks. Also add other
options for future use.
During scanning we might find a new, nested playlist (so inside another m3u),
which we will then save. When the scanner then reaches the actual playlist file,
we must make sure to scan the contents of it. This means the timestamp when
saving the first time has to be set to a dummy value.
Misc refactoring, e.g. alignment of how modules save tracks and playlists, incl
use of mfi and pli. Also try to avoid direct calls between library and player.
ffmpeg parses TDA, TDAT, TYE, TYER and TDR these days, so there is no need
to do that in forked-daapd. Also the parsing of TDA/TDAT was incorrect,
since it is MMDD.
"Play Date" tag was seconds since 1904 (an Apple Mac HFS+ timestamp), not a
Unix timestamp as we assumed. Seems Apple themselves realised that wasn't a
great idea (+ not a proper plist date type), and therefore provide "Play Date
UTC" as an alternative.
The idea here is to make sure the fixing up of tags is done in a consistent
manner. For strings, this means stuff like trimming and empty strings -> null
are applied the same unless there are special exception rules set. It also
means that defaults are applied the same across structs, e.g. "Unknown artist"
for both mfi->artist and queue_item->artist.
The change is also necessary because we want to remove trimming from the sql
query and instead implement it ourselves.