Output the last_modified timestamp from mopidy's track model to mpd clients
in the same format as mpd uses - yyyy-mm-ddTHH:MM:SS
Outputs nothing for Last-Modified if last_modified is None or zero
This commit uses UTC time, adds a 'Z' to end, and updates the test accordingly
Output a track's Last-Modified stamp in ISO 8601 format, as MPD does.
Output nothing if track has no last-modified stamp.
The test has to use datetime to work out what the output will look like,
because it is local-time zone dependant.
Output the last_modified timestamp from mopidy's track model to mpd clients
in the same format as mpd uses - yyyy-mm-ddTHH:MM:SS
Outputs nothing for Last-Modified if last_modified is None
Address issues raised in review:
Fix formatting by shortening function name to concat_multi_values
Change comments and variable names to reflect generic nature of function
Fix typos in tests
Default to single quotes for strings
Seeks will now fail when the duration is None, this is an approximation to if
the track is seekable or not. This check is need as otherwise seeking a radio
stream will trigger the next track.
If the track truly isn't seekable despite having a duration we should still
fail as GStreamer will reject the seek.
Newer versions of the protocol have removed this tag, so we should as well.
This also works around the issue of #881 which was breaking things with
newlines in comment fields.
The readcomments command seems to replace this, but it seems to only care about
specific extra tagtypes, not the general comment tag we normally collect when
scanning things.