Commit Graph

2288 Commits

Author SHA1 Message Date
Stein Magnus Jodal
dfaed1e4c2 gst1: Replace STATE_* with State.* 2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
1d269af210 gst1: Call Gst.init() and remove sys.argv hack
GStreamer no longer use sys.argv directly. If you want GStreamer to
handle command line arguments, you must pass them explicitly to
Gst.init().
2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
8c82f4773f gst1: Update imports to use PyGI 2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
2232260d1b tests: Fix typo, don't use deprecated API 2016-01-31 07:50:43 +01:00
Stein Magnus Jodal
adb260af05 Merge branch 'release-1.1' into develop
Fixes #1400
2016-01-31 07:47:47 +01:00
Jens Luetjen
e434556048 Merge branch 'develop' of https://github.com/mopidy/mopidy into fix/310-persist-mopidy-state-between-runs
Conflicts:
	docs/changelog.rst
	mopidy/audio/scan.py

Resoved conflict.
2016-01-21 19:33:58 +01:00
jcass
2fcbc691c0 fix:add changelog entry and fix line indentation. 2016-01-21 05:55:37 +02:00
jcass
dee7eb7e20 tests:fix pep8 violation. 2016-01-20 15:55:02 +02:00
jcass
239a7be708 fix: ensure that tl_track information is included in event trigger when consume mode is enabled. 2016-01-20 15:41:58 +02:00
Stein Magnus Jodal
14444fe24f mpd: Add volume command 2016-01-17 22:28:23 +01:00
Stein Magnus Jodal
f15b4e7327 mpd: Move setvol tests to its own test case 2016-01-17 22:28:12 +01:00
Jens Luetjen
606e87b1bb Make export/restore state internal
- drop filename parameter
- make save_state/load_state internal
- remove save_state/load_state from docu and RPC.
- remove models load/save from docu
- build the config path
- folder for 'core' state files
- move restore_state-to-coverage-translation into a method
2016-01-14 19:56:38 +01:00
Jens Luetjen
4869619bb9 New CoreState to hold all core states
- Introduce a CoreState class that holds all core states
- Move xState classes to internal
- Use validation.check_instance for consistent error messages
- Store tlid instead of TlTrack to restore last played track
2016-01-10 13:24:14 +01:00
Jens Luetjen
74344f2b19 Use tlid instead of full tl_track
To export/restore the PlayState the tlid is enough.
2016-01-09 12:52:01 +01:00
Jens Luetjen
46bb780a46 Rename TracklistState 'tracks' to 'tl_tracks'
Correct documentation.
2016-01-09 11:46:09 +01:00
jcass
c2c2aa0322 Handle missing or empty 'port' configuration parameter.
(cherry picked from commit 3488e6442d)
2016-01-05 21:17:59 +01:00
Jens Luetjen
0b0cbc87d4 Merge branch 'develop' into fix/310-persist-mopidy-state-between-runs
Conflicts:
	docs/changelog.rst

Fixed conflict in doc/changelog.rst
2016-01-05 08:16:51 +01:00
Jens Luetjen
d5a45516ef Adujst test code for testing auto-play 2016-01-05 07:53:45 +01:00
Thomas Kemmer
b2d1e1b4f7 m3u: Major refactoring, add default_encoding and default_extension settings. 2016-01-04 14:19:49 +01:00
Stein Magnus Jodal
456dbe6c3a tests: Fix mock usage 2016-01-03 23:41:34 +01:00
jcass
4e63e4280c Merge remote-tracking branch 'upstream/release-1.1' into fix/1378 2016-01-04 00:04:42 +02:00
Jens Luetjen
e56c39ee78 Add unit tests for export/restore core state
Fix issues shown by test code
2016-01-03 18:29:35 +01:00
Jens Luetjen
a5a9178b06 Use model(s) to save/restore current play state 2016-01-02 15:28:41 +01:00
Stein Magnus Jodal
f2194e9d5e fix: skip uplayable tracks when the next track is selected while in a paused state. 2016-01-02 15:51:17 +02:00
Stein Magnus Jodal
094a874055 core: Make lookup() ignore tracks without URI
Fixes #1340
2016-01-01 23:44:26 +01:00
Stein Magnus Jodal
6afd5b0c70 Fix tests and update changelog 2016-01-01 23:13:42 +01:00
Stein Magnus Jodal
811131f716 Merge pull request #1371 from jcass77/enhance/format_proxy
Handle missing or empty 'port' configuration parameter.
2015-12-29 14:41:58 +01:00
Stein Magnus Jodal
c47c929440 Merge PR #1356 from jcass77/fix/1352 into release-1.1 2015-12-29 14:37:08 +01:00
Stein Magnus Jodal
4fba994441 Merge pull request #1377 from jcass77/test/pr_1356_resume_unplayable_track
test: Test case for skipping unplayable tracks when paused.
2015-12-29 08:53:12 +01:00
jcass
07a0f8ff3e test: Test case to ensure that unplayable tracks are skipped over in PAUSE state.
Ensures that pause->next->resume handles unplayable tracks just like stop->next->play does.
2015-12-29 07:54:49 +02:00
Stein Magnus Jodal
5462f0e319 Merge pull request #1369 from tkem/m3u-fix-1364
m3u: Derive track name from file name for non-extended M3U playlists.
2015-12-29 02:02:48 +01:00
jcass
3488e6442d Handle missing or empty 'port' configuration parameter. 2015-12-26 15:28:07 +02:00
Thomas Kemmer
22690ee5a9 m3u: Derive track name from file name for non-extended M3U playlists. 2015-12-23 18:14:19 +01:00
Thomas Kemmer
ef1468d8d6 core: Add PlaylistsController.get_uri_schemes(). 2015-12-13 19:02:33 +01:00
Stein Magnus Jodal
be5bdb8a85 Fix review comments on PR#1359 2015-12-12 11:01:52 +01:00
jcass
e9eb9d61b4 Test cases for issue #1358 2015-12-11 07:47:07 +02:00
jcass
3cd3b45512 Fix flake8 errors. 2015-12-07 07:56:35 +02:00
jcass
fb7b466bee Result of prepare_change no longer affects whether a track is added to the history.
Update changelog and test cases.
2015-12-07 07:53:34 +02:00
jcass
2b00e83179 Mark track as playing and add to history if changing track while paused. 2015-12-06 19:16:20 +02:00
Stein Magnus Jodal
3e259f1c00 Merge pull request #1347 from adamcik/feature/mpd-idle-cleanup
MPD idle cleanup
2015-12-05 21:36:11 +01:00
Stein Magnus Jodal
23cdeb208b Merge pull request #1346 from adamcik/feature/eot-seek-handling
Gapless aware seek handling
2015-12-05 21:34:51 +01:00
Stein Magnus Jodal
23d83a833f Merge pull request #1349 from adamcik/feature/mpd-playlists-error-handling
MPD playlist editing error handling
2015-12-05 21:14:55 +01:00
Thomas Adamcik
00b52da6ab mpd: Make sure rename error handling is correct 2015-12-05 14:30:18 +01:00
Thomas Adamcik
9ac1760dd1 mpd: Update playlistmove to check names and indexes 2015-12-05 14:11:27 +01:00
Thomas Adamcik
5de9495eaa mpd: Update playlistdelete to handle unknown names and indexes 2015-12-05 14:01:43 +01:00
Thomas Adamcik
b21debf6ee mpd: Sanity check stored playlist names 2015-12-05 13:51:36 +01:00
Thomas Adamcik
c3393d3d85 mpd: Refresh mapping when name is not present (Fixes #1348) 2015-12-05 12:49:45 +01:00
Thomas Adamcik
98e19e803b mpd: Deleting unkown playlist should return not found 2015-12-05 12:48:14 +01:00
Thomas Adamcik
07328e7dd2 mpd: Map playlists_loaded to idle event stored_playlist 2015-12-05 11:08:33 +01:00
Stein Magnus Jodal
28224cef8c audio: Fix tests not exiting normally 2015-12-05 00:34:33 +01:00
Thomas Adamcik
19daa89e15 mpd: Add missing seeked event handling for idle 2015-12-04 22:11:55 +01:00
Thomas Adamcik
7d4da4ac8c mpd: Add integration test for core events and idle 2015-12-04 22:10:27 +01:00
Thomas Adamcik
7ab2665292 mpd: Switch MpdSession to using on_event and re-use listener helper. 2015-12-04 21:20:24 +01:00
Thomas Adamcik
9f23757cc3 core: Return pending position during active seek.
This covers over that audio will fail query position while a seek is in
progress. It also means that instead of returning zero we at least return
something which is much closer to the time that we will soon end up playing
from.
2015-12-04 21:10:48 +01:00
Thomas Adamcik
454077afeb core: Make sure certain events are ignored when doing eot-seeks 2015-12-04 21:10:48 +01:00
Thomas Adamcik
aeb881896b core: Trigger position changed from audio events.
Makes sure to only fire when the position changed to our intended seek target.
Otherwise we would also be triggering this when playback starts.
2015-12-04 21:10:48 +01:00
Thomas Adamcik
e74eafb38a core: Switch back to correct track if seek happens before stream changed
Technically the seek still needs to be postponed for this to work right, but
it's a step closer.
2015-12-04 21:10:48 +01:00
Thomas Adamcik
3a57a5792b core: Make sure we always emit state_changed between tracks
Gapless broke this, so this change makes sure that next/prev/play and gapless
track changes all correctly emit events.

Note that this only ensures we get PLAYING -> PLAYING events. Not the old
STOPPED -> PLAYING and then PLAYING -> STOPPED.
2015-11-21 22:43:40 +01:00
Thomas Adamcik
e767cb3f41 tests: Convert local tracklist test to use core actor proxy. 2015-11-21 22:31:25 +01:00
Thomas Adamcik
216bd8e412 tests: Reorder listener_mock.send.mock_calls in assertEqual 2015-11-21 14:28:47 +01:00
Thomas Adamcik
da7ec9b202 core: Cleanup track ended event handling
Trigger playback ended on:
- stream changed
- EOS
- stop via stream changed events

Old behavior was to manually trigger on:
- next
- prev
- play with other track and old state != STOPPED
- stop
2015-11-19 22:45:55 +01:00
Stein Magnus Jodal
b29d5df9b8 compat: Avoid non-ASCII in byte literals 2015-10-29 22:57:06 +01:00
Stein Magnus Jodal
0c059b85b1 compat: Replace (int, long) with compat.integer_types 2015-10-29 22:21:48 +01:00
Stein Magnus Jodal
7e2d77ce0e compat: Replace basestring with compat.string_types 2015-10-29 22:21:19 +01:00
Stein Magnus Jodal
8aeb9841c5 mpd: Final cleanup of PR #1187, #1308 and #1322
Fixes #1014, fixes #1322
2015-10-29 20:50:23 +01:00
Alex Malone
7aa8aa2967 mpd: fix flake8 errors 2015-10-29 15:03:41 +01:00
Jelle van der Waa
d6afcf0abf mpd: playlist addition / creation
- Rename _playlist_create to _create_playlist
- Change short variables to abbreviations
- Use double quoting when a string contains a single quote
- Use playlist_deleted event
2015-10-29 15:03:41 +01:00
kozec
cb4c6909f9 mpd: Added default_playlist_scheme to configuration 2015-10-29 15:03:41 +01:00
kozec
3a13bc2358 mpd: Added tests for stored playlists modifying commands 2015-10-29 15:03:41 +01:00
Stein Magnus Jodal
93899c8599 Merge pull request #1288 from adamcik/feature/implement-gapless
Gapless part 1
2015-10-07 23:32:31 +02:00
Thomas Adamcik
0169ce7cad core: Make sure the about-to-finish callback gets run in the actor.
When about to finish gets called we are running in some GStreamer thread. Our
audio code then calls the shim core callback which is responsible for
transferring our execution to the core actor thread and waiting for the
response. From this point we do normal actor calls to the backend(s) which in
turn call into the audio actor. Since the initial audio code that was called is
outside the actor this should never deadlock due to this loop.
2015-10-06 22:45:06 +02:00
Thomas Adamcik
1ca548ece7 core: Fix typos in comments 2015-10-05 21:41:15 +02:00
Thomas Adamcik
4c5e80a279 Merge pull request #1293 from jodal/feature/tlid-starts-at-1
core, mpd: Start tlid/songid counting at 1
2015-10-04 23:46:52 +02:00
Stein Magnus Jodal
0093eeffe2 Merge branch 'release-1.1' into develop 2015-10-04 23:44:48 +02:00
Stein Magnus Jodal
6f32bdc083 stream: Don't parse as playlist if playable 2015-10-04 23:08:07 +02:00
Stein Magnus Jodal
22264071e4 core, mpd: Start tlid/songid counting at 1
The original MPD server starts at 1. upmpdcli has issues with Mopidy
starting at 0 instead, as 0 is special in its context.

As noone should care exactly what core's TLIDs are, I opted to start
counting both core TLID and MPD songid from 1, instead of just
increasing TLID with 1 in the MPD frontend to get a valid songid. This
also keeps it easier to debug across the MPD/core boundary.
2015-09-24 22:35:59 +02:00
Thomas Adamcik
7f4e77f36f core: Update to using _change in play and fix playback ended event 2015-09-16 23:44:36 +02:00
Thomas Adamcik
d6cfe0d1ae tests: Update local playback tests to synchronize core state 2015-09-16 23:41:16 +02:00
Thomas Adamcik
f42a5423ab tests: Add a TODO to the dummy audio helper 2015-09-16 23:41:03 +02:00
Thomas Adamcik
c1d21bd6c9 tests: Make sure mpd tests wait for core when changing state. 2015-09-16 23:38:15 +02:00
Stein Magnus Jodal
729249fffd Merge branch 'release-1.1' into develop 2015-09-14 10:41:32 +02:00
Stein Magnus Jodal
9fb92139ec tests: Remove version ordering test
I believe we're able to choose proper version numbers without the
busy-work of updating this test.
2015-09-14 10:40:48 +02:00
Stein Magnus Jodal
ffdf4bf691 Merge branch 'release-1.1' into develop
Conflicts:
	docs/changelog.rst
2015-09-14 10:36:34 +02:00
Stein Magnus Jodal
6e126ee850 stream: Abort unwrap if visiting same URI twice 2015-09-14 10:12:31 +02:00
Stein Magnus Jodal
2d10eef0b1 stream: Expand nested stream playlists
Fixes #1250
2015-09-13 23:26:45 +02:00
Stein Magnus Jodal
9de96a81f8 http: Move tests from stream to http util 2015-09-13 11:56:16 +02:00
Thomas Adamcik
5c46b83f81 stream: Switch to using http download helper 2015-09-13 11:56:16 +02:00
Thomas Adamcik
592b728e32 core: Refactor previous() to use pending_track for state changes 2015-09-04 17:16:39 +02:00
Thomas Adamcik
2cd9903a54 core: Refactor next() to use pending_track for state changes 2015-09-04 16:08:54 +02:00
Thomas Adamcik
7201f2cb10 tests: Make dummy backend use real playback provider if audio is passed in
This is needed in order to make audio events propagate, to core and trigger
async state changes in tests.
2015-09-04 15:34:40 +02:00
Thomas Adamcik
d8986e6cc1 audio: Tell dummy_audio what urls to fail on 2015-09-04 15:28:32 +02:00
Thomas Adamcik
d8ce171b9a Merge branch 'develop' into feature/implement-gapless
Conflicts:
	tests/local/test_playback.py
2015-09-04 14:15:32 +02:00
Stein Magnus Jodal
f6f65dd3dc Merge pull request #1276 from adamcik/feature/make-local-playback-test-use-core-proxy
local: Update playback test to use core as a running actor
2015-09-04 13:45:36 +02:00
Thomas Adamcik
0aeafa714b local: Update playback test to use core as a running actor 2015-09-04 11:41:10 +02:00
Stein Magnus Jodal
f655fc7009 ext: Make get_{cache,config,data}_dir() class methods
Fixes #1275
2015-09-04 10:20:04 +02:00
Thomas Adamcik
1acc5aa557 audio: Update tests to reflect send_async being gone 2015-09-03 23:01:19 +02:00
Thomas Adamcik
71b04213ff audio: Update dummy and tests to correctly emit stream changed 2015-09-03 21:39:30 +02:00
Thomas Adamcik
e12ea662da Merge branch 'develop' into feature/implement-gapless 2015-09-02 21:03:17 +02:00
Stein Magnus Jodal
e0a028291a local: Replace local/data_dir with core/data_dir
Partly fixes #1259
2015-08-23 00:37:38 +02:00
Stein Magnus Jodal
c48b6515f9 core: library.refresh() should check if backend has library
...and not playlists.

Fixes #1257
2015-08-23 00:35:54 +02:00
Stein Magnus Jodal
78ffaeb8d2 playlists: Fix crash on urilist comment with non-ASCII chars
Fixes #1265
2015-08-22 23:52:19 +02:00
Thomas Adamcik
3e75d5cf06 audio: Update missing plugins check in scanner tests 2015-08-19 00:40:46 +02:00
Thomas Adamcik
e77a4afaf4 audio: Make scanner report MIME for missing plugins 2015-08-18 23:56:42 +02:00
Stein Magnus Jodal
9f08bce6cd core: Update test 2015-08-11 10:06:58 +02:00
Stein Magnus Jodal
83010813a1 Bump version to 1.1.0 2015-08-09 23:43:42 +02:00
Stein Magnus Jodal
a16a2c5a1b tests: Fix test made flaky by lsinfo Last-Modified change 2015-08-07 15:35:07 +02:00
Stein Magnus Jodal
86e0d12a8c Merge pull request #1193 from glogiotatidis/m3u8loading
Support loading of m3u8 playlists.
2015-08-07 15:21:39 +02:00
Giorgos Logiotatidis
69dc639ab3 Support loading of m3u8 playlists.
Unicode is nice, let's support it!
2015-08-07 14:35:54 +03:00
Thomas Adamcik
0081e2deff Merge pull request #1243 from jodal/feature/fast-mpd-listplaylists
mpd: Faster playlist listing
2015-08-06 20:29:12 +02:00
Stein Magnus Jodal
c8d31e94b7 mpd: Faster playlist listing 2015-08-06 01:06:43 +02:00
Stein Magnus Jodal
b51ee01c7c Merge pull request #1242 from bjornars/fix/1240-tests-fail-on-32-bit
tests: fix test breakage due to promotion from int to long
2015-08-05 22:46:32 +02:00
Bjørnar Snoksrud
1eb41aca7d tests: fix test breakage due to promotion from int to long
This fixes #1240.

In internals/path.py. there is a snippet of code that multiples mtime
for a file with 1000, and then casting it to `int`, to return the number
of milliseconds since epoch (or whatever). This will, however, not
ensure that the result is an `int`.

>>> type(int(2**32))
<type 'long'>

Instead, fix the tests to look for (int, long), and clarify the
implementation.

This bug found on a 32-bit VM :)
2015-08-05 22:38:21 +02:00
Thomas Adamcik
2faf6689c1 Merge pull request #1230 from fatg3erman/feature/mpd-protocol-extensions
mpd: Add additional metadata fields for album URIs and image URIs
2015-07-27 22:28:22 +02:00
Stein Magnus Jodal
3810089be3 tests: Avoid import errors during conftest setup 2015-07-27 13:41:29 +02:00
Mark Greenwood
9649dc0777 list order in python is not deterministic, hence had to change the test 2015-07-26 13:57:46 +01:00
Mark Greenwood
310fcdf0ef Unexpected test failure fixed 2015-07-26 13:04:33 +01:00
Mark Greenwood
8106399598 Simplify the whole thing by using taglist types and not bothering with the
config option or command to switch it on
2015-07-26 12:55:46 +01:00
Stein Magnus Jodal
0dc47e6084 Merge pull request #1232 from dprokic/feature/843-core-config-for-data-config-cache-dirs
config: Add config for data/config/cache directories
2015-07-26 12:25:58 +02:00
Stein Magnus Jodal
36dea42100 Merge pull request #1235 from EricJahn/fix/1045-filter-empty-fields
Conflicts:
	docs/changelog.rst
2015-07-26 12:14:13 +02:00
Thomas Adamcik
ee68a0a9da Merge pull request #1238 from dbrgn/feature/996-playlist-delete-event
core: Implemented playlist_deleted event triggering
2015-07-26 12:12:23 +02:00
Stein Magnus Jodal
70cfc0b33a mpd: PR #1235 tweaks, add changelog 2015-07-26 12:12:15 +02:00
Danilo Bargen
8975e72b34 Implemented playlist_deleted event 2015-07-26 11:57:17 +02:00
Thomas Adamcik
61bb7df64d Merge pull request #1239 from jodal/feature/stream-playlists
stream/audio: Make stream backend parse radio playlists itself
2015-07-26 11:48:19 +02:00
Stein Magnus Jodal
d991e51d40 stream: Extract first track from playlists 2015-07-26 11:24:39 +02:00
Stein Magnus Jodal
f373d071ea stream: Move scanner to backend, port tests to pytest 2015-07-26 00:09:58 +02:00
Stein Magnus Jodal
ea2017c968 playlists: Add urilist fallback parser 2015-07-25 23:19:59 +02:00
Stein Magnus Jodal
80adc100ae playlists: Add blank lines to valid playlist data 2015-07-25 23:19:59 +02:00
Stein Magnus Jodal
12c27142a3 playlists: Rename M3U to EXTM3U 2015-07-25 23:19:59 +02:00
Stein Magnus Jodal
6af11b563f playlists: Add parse() that detects format and parses 2015-07-25 23:19:59 +02:00
Stein Magnus Jodal
2bcbbf03be playlists: Simplify detector/parser interface 2015-07-25 23:19:59 +02:00
Dejan Prokić
5f843100cc tests: Add tests for getter methods for cache, config and data directories 2015-07-25 18:17:27 +02:00
Mikhail Golubev
b596b85571 Add "sortname" field in the Artist model (#940) 2015-07-25 17:25:28 +02:00
Dejan Prokić
13133fd919 tests: Make test_ext discoverable
Classes in this test didn't have prefix Test
2015-07-25 17:17:13 +02:00
EricJahn
e0dc26f958 Fix #1045
Filter all empty tagtypes in MPD protocol handlers.

In addition return the tagtype list from the mpd protocol command.
2015-07-25 16:56:34 +02:00
Dejan Prokić
1e716c7139 tests: Add tests for defaults in core schema config
Tests check if default core schema has cache_dir, config_dir, data_dir and max_tracklist_length and if they have proper type
2015-07-25 16:04:39 +02:00
Stein Magnus Jodal
bdcfab09f1 playlists: Move detecters and parsers out of audio 2015-07-25 14:47:01 +02:00
Stein Magnus Jodal
a83d9836f9 core: Update test mock 2015-07-25 14:47:00 +02:00
Stein Magnus Jodal
bd13dcdcdd Merge pull request #1231 from stein-k/missing_config
Fixes #1228
2015-07-25 14:24:45 +02:00
Stein Magnus Jodal
0ae6239988 config: Add regression test for format_initial() 2015-07-25 14:23:13 +02:00
EricJahn
ad2646f1ab tests: Fix failing encoding test
Encoding is different on Mac OS and needs to be checked separately.
2015-07-25 13:15:37 +02:00
Stein Magnus Jodal
448e929e75 file: Add todos for missing tests 2015-07-25 11:59:29 +02:00
Thomas Adamcik
3fe9f7b3a7 Merge branch 'develop' into feature/implement-gapless
Conflicts:
	mopidy/commands.py
	mopidy/core/playback.py
	tests/core/test_playback.py
	tests/local/test_playback.py
2015-07-22 20:00:46 +02:00
Stein Magnus Jodal
fdb0b4a12b file: Add tests 2015-07-22 19:48:05 +02:00
Stein Magnus Jodal
80e33e273c Merge branch 'v1.0.x' into develop
Conflicts:
	docs/changelog.rst
2015-07-22 18:41:17 +02:00
Stein Magnus Jodal
cf9c950915 Bump version to 1.0.8 2015-07-22 18:30:41 +02:00
Stein Magnus Jodal
0ebfeb5a5b core: Normalize negative seek positions
This reverts a change between 1.0 and 1.1, so no changelog.

Fixes #1180
2015-07-22 12:15:38 +02:00
Stein Magnus Jodal
6cb48f29ce mpd: Simplify Last-Modified test, update changelog 2015-07-22 11:21:04 +02:00
Stein Magnus Jodal
1d77bc74e2 Merge pull request #1219 from fatg3erman/fix/1218-last-modified-for-mpd
Fix #1218
2015-07-22 11:12:30 +02:00
Mark Greenwood
eab3076235 Add test for track.last_modified = 0 2015-07-21 21:13:38 +01:00
Mark Greenwood
6ed9b07aaa Fix #1218
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
2015-07-21 18:20:17 +01:00