Commit Graph

4646 Commits

Author SHA1 Message Date
Stein Magnus Jodal
eda91cfa96 gst1: Add missing __future__ import 2016-02-01 23:27:06 +01:00
Stein Magnus Jodal
1daf582558 gst1: Check GStreamer version on start
If GStreamer is too old, it fails like this:

  $ mopidy
  ERROR: Mopidy requires GStreamer >= 1.2, but found GStreamer 1.0.0.
2016-02-01 23:12:16 +01:00
Stein Magnus Jodal
d9f53d5da3 gst1: Move all gi imports to a helper module 2016-02-01 23:09:28 +01:00
Stein Magnus Jodal
906a48eaf7 gst1: Fix digraph name
It was probably broken by some regexp replacement.
2016-02-01 13:14:44 +01:00
Stein Magnus Jodal
1c4b36f66a gst1: gi.require_version() GstPbutils before importing it 2016-02-01 13:05:52 +01:00
Thomas Adamcik
190abc3513 gst1: Use default queue settings
Removing this queue seems to break appsrc about to finish.
2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
df6db63dd4 gst1: Remove clearified TODO 2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
e68c4668fe audio: Fallback to datetime tag if no date tag 2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
9657004b77 audio: Move date tag from Track to Album
The Track model doesn't have a date attribute.
2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
f877ac0807 audio: Add support for GLib.Date tag values 2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
0fa78b8e39 gst1: Fix datetime tag conversion 2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
df62997186 audio: Decode tags to unicode 2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
8b543bad44 local: URIs should be unicode
Any non-ASCII content is uriencoded anyway.
2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
9fde0bec55 audio, timer: Fix trace log stmt 2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
31c894030d audio: Move tag helpers to mopidy.audio.tags 2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
f0c7d25db6 audio: Reduce log level for unknown tag data 2016-01-31 21:07:17 +01:00
Thomas Adamcik
ded059b5c9 audio: Cleanup the signals we connect in the scanner
Without this fix we simply crash due to using up all the available FDs on the
system.
2016-01-31 21:07:17 +01:00
Thomas Adamcik
b3aeb9b508 audio: Move signal helper to utils. 2016-01-31 21:07:17 +01:00
Thomas Adamcik
844dc257df audio: Don't bother creating decoders in audio scanner
The decoders don't produce metadata and to the best of my knowledge we don't
need the raw audio for duration calculation. But to play it safe this keeps
in place the caps check in pad added to trigger 'have-audio'.
2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
bf6e97e5b9 gst1: Fix querying of duration of MP3s 2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
7926ef1f12 gst1: Fail if trying to create buffers without audio
Which causes lots of failed assertion messages from GStreamer
2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
ef5281488b gst1: Fix buffer.pts not being set if 0 2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
45dae06347 gst1: Keep the pending URI for the stream_changed event 2016-01-31 21:07:17 +01:00
Stein Magnus Jodal
780c493af3 gst1: Replace Structure(...) with Stricture.new_empty(...) 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
7a3d5ff13c gst1: Replace event_new_tag() with Event.new_tag() 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
226c937ffc gst1: Tune log messages 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
812e53b895 gst1: Replace parse_new_segment() with parse_segment()
Fixes 4 unit tests
2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
eb4c742015 gst1: Run gst.init() if needed everywhere using Gst 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
592f5dec53 gst1: Remove deprecated GObject.threads_init()
Ref https://wiki.gnome.org/Projects/PyGObject/Threading

"The requirement to call GObject.threads_init() has been removed from
PyGObject 3.10.2 when using Python native threads with GI (via the
threading module) as well as with GI repositories which manage their own
threads that may call back into Python (like GStreamer callbacks). The
GObject.threads_init() function will still exist for the entire 3.x
series for compatibility reasons but emits a deprecation warning."
2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
ce198ba9f8 gst1: Update pad probe callback to match new signature 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
29a194cb55 gst1: Use new API for TagList creation 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
3e4bd16be2 gst1: Replace playbin-stream-changed with Gst.MessageType.STREAM_START 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
13567d271a gst1: Update taglist translator 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
3792b8c900 gst1: Use Gst.CLOCK_TIME_NONE to block for state changes in tests 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
da19c8be56 gst1: on_new_segment() gets a Segment struct 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
fc54a17b44 gst1: require_version('Gst', '1.0') before use 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
20b1c21b0b gst1: Avoid using pipeline.get_clock()
Often the clock isn't available for use. gst_pipeline_clock() which is
always available requires Gst 1.6.
2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
01cf013b09 gst1: Update query_position() usage 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
87b1c9455c gst1: Update query_duration() usage 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
5277ad5ff5 gst1: Update get_enum() to include enum type it expects 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
ee99bedf39 gst1: Gst.Bin() no longer takes a name 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
ef40854b86 gst1: Update index into query_position() result 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
3765e90bc7 gst1: Replace DEBUG_BIN_TO_DOT_FILE with debug_bin_to_dot_file 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
ee51983cfd gst1: Replace TagList() with TagList.new_empty() 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
6c9e2d4d34 gst1: Add timeout to get_state() 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
8a846b8605 gst1: Replace EVENT_* with EventType.* 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
3d98a77a3c gst1: Replace FLOW_* with FlowReturn.* 2016-01-31 21:07:16 +01:00
Stein Magnus Jodal
275f9d5062 gst1: Buffers no longer have caps 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
f95e307ba0 gst1: Replace BUS_DROP with BusSyncReply.DROP 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
a0714455cd gst1: Use methods to get struct fields 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
e6a4042c3e gst1: Replace message.structure with message.get_structure() 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
1b47b6341e gst1: Replace message_new_application() with Message.new_application() 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
7c473eed07 gst1: Replace MESSAGE_* with MessageType.* 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
1911ea0c10 gst1: Replace STATE_CHANGE_* with StateChangeReturn.* 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
e621d8055a gst1: Replace gst.pbutils with GstPbutils 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
67f4d57964 gst1: Replace MESSAGE_* with MessageType.* 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
3c2f83f6a6 gst1: Replace Gst.URI_SRC with Gst.URIType.SRC 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
bd077591d0 gst1: Replace element_make_from_uri() with Element.make_from_uri() 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
9c0547d039 gst1: Replace {add,remove}_event_probe() with {add,remove}_event() 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
3f8ebc83c1 gst1: Replace ghost_unconnected_pads with ghost_unlinked_pads 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
38bcdae1bf gst1: Replace RANK_SECONDARY with Rank.SECONDARY 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
a2b009c581 gst1: Replace TYPE_ELEMENT_FACTORY with ElementFactory 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
8aad1d1846 gst1: Replace registry_get_default() with registry.get() 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
1007d42dd1 gst1: GLib.get_system_config_dirs() now returns a list 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
2920f83065 gst1: Replace decodebin2 with decodebin 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
63750d28fb gst1: Replace playbin2 with playbin 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
c8ad7e3a41 gst1: Replace Caps() with Caps.from_string()
And audio/x-raw-int and audio/x-raw-float with audio/x-raw
2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
aa3650bf34 gst1: Update query_new_duration() 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
6c59205efe gst1: Replace 'struct[x] = y' with 'struct.set_value(x, y)' 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
01bf8b773f gst1: Replace buffer.timestamp with buffer.pts 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
1cf450940a gst1: Replace get_pad() with get_static_pad() 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
e402c9816c gst1: Replace get_caps() with query_caps() 2016-01-31 21:07:15 +01:00
Stein Magnus Jodal
8e771e8970 gst1: Update GhostPad() with GhostPad.new() 2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
5d6981d70e gst1: Update FORMAT_* with Format.* 2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
74cf32ede2 gst1: Update SEEK_FLAG_* with SeekFlags.* 2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
dfaed1e4c2 gst1: Replace STATE_* with State.* 2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
ab24222eb6 gst1: Replace gst.element_link_many() 2016-01-31 21:07:14 +01:00
Stein Magnus Jodal
f00f24ffde gst1: Replace element_factory_make() with ElementFactory.make() 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
d046974aaf gst1: Remove IcySrc
It was a workaround for icy:// support on GStreamer 0.10.
2016-01-31 21:07:14 +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
cfc2d59c82 Add a TODO for missing tracks in shuffled playlist 2016-01-30 13:51:16 +01:00
Jens Luetjen
2b3b2e5808 Add a docstring to 'setup' and 'teardown'
Inform that 'setup' and 'teardown' are for internally use only.
2016-01-30 13:38:29 +01:00
Jens Luetjen
2401229871 Catch backend exceptions with a helper function 2016-01-30 13:13:38 +01:00
Jens Luetjen
3647df61c8 More stability if a backend rejects tracks
- Catch exceptions raised by backend inside 'PlaybackProvider.change_track'
- Avoid endless loop if 'repeat' is 'true' and not a single track is playable
2016-01-24 17:58:44 +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
5f6a151604 Merge remote-tracking branch 'upstream/develop' into fix/1402_track_playback_ended 2016-01-20 15:54:07 +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
f62057a9ad flake8: Fix compat with pep8 1.7.0
(cherry picked from commit 18b609fa6e)
2016-01-20 08:21:10 +01:00
Stein Magnus Jodal
89888cde48 Bump version to 1.1.2 2016-01-18 22:54:32 +01:00
Stein Magnus Jodal
b09e667127 mpd: Fix review comments 2016-01-18 22:44:11 +01:00
Stein Magnus Jodal
14444fe24f mpd: Add volume command 2016-01-17 22:28:23 +01:00
Stein Magnus Jodal
18b609fa6e flake8: Fix compat with pep8 1.7.0 2016-01-17 07:55:34 +01:00
Jens Luetjen
49b84f4a61 Fix a flake8 error 2016-01-14 22:58:41 +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
Thomas Kemmer
1715756b14 m3u: Update docs. 2016-01-10 19:45:00 +01:00
Thomas Kemmer
2bcf1a6b00 m3u: Change default_extension to m3u8. 2016-01-10 19:23:14 +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
Thomas Adamcik
3ff120a0e6 listener: Try and protect actors against "bad" events
(cherry picked from commit aa010e03e9)
2016-01-10 07:50:08 +01:00
Stein Magnus Jodal
3d6270ad37 docs: Document model's attributes
Fixes #1385
2016-01-10 07:41:52 +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
abe3d67bc1 Some smaller fixes.
- Limit config core.restore_state to a known set of values.
- Initialize new_state to None instead of ''
2016-01-09 12:07:49 +01:00
Jens Luetjen
6e99a95aae Don't modify data in library function.
- storage.save: Don't modify data. mopidy.__version__ has to be added by caller.
- storage.load: Added a Todo. Postponed decision, if load() shall raise an exception in case of error. See PR #310.
2016-01-09 12:05:14 +01:00
Jens Luetjen
a9327c559f Don't use pykka callbacks on_start and on_stop.
Introduce setup() and teardown() for Core.
2016-01-09 12:00:35 +01:00
Jens Luetjen
46bb780a46 Rename TracklistState 'tracks' to 'tl_tracks'
Correct documentation.
2016-01-09 11:46:09 +01:00
Thomas Kemmer
2b8508d3c7 m3u: Implement write-replace context manager. 2016-01-09 07:00:57 +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
6746dd0196 More function for config value core.restore_state
- New values for core.restore_state : "volume", "last"
- Update changelog
- Adjust logger output
2016-01-05 07:41:02 +01:00
Thomas Kemmer
b2d1e1b4f7 m3u: Major refactoring, add default_encoding and default_extension settings. 2016-01-04 14:19:49 +01:00
jcass
31ec804d7e core: Address review comments: remove unnecessary call to get_current_tl_track() 2016-01-04 00:05:10 +02:00
jcass
4e63e4280c Merge remote-tracking branch 'upstream/release-1.1' into fix/1378 2016-01-04 00:04:42 +02:00
Stein Magnus Jodal
75656b9b3d core: Address review comments 2016-01-03 21:07:15 +01: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
Daniel Hahler
0cfa6927bb Skip tracks with empty uri in track_to_mpd_format
Ref: https://github.com/mopidy/mopidy/issues/1340
2016-01-01 23:05:17 +01:00
Thomas Adamcik
92bb9b9b77 logging: Catch errors when loading logging/config_file
(cherry picked from commit ede5b8abff)
2016-01-01 22:54:41 +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
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
Stein Magnus Jodal
2a04088544 Merge pull request #1362 from tkem/feature/playlists-schemes
core: Add PlaylistsController.get_uri_schemes().
2015-12-28 23:37:24 +01:00
Jens Luetjen
44841710e0 Use data_dir instead of config_dir.
Mopidy as service can not write to config_dir.
2015-12-27 21:03:00 +01:00
Jens Luetjen
e9625e9feb core: Fix #310: Persist mopidy state between runs.
Persist following properties:
mopidy.core.tracklist
    _tl_tracks
    _next_tlid
    get_consume()
    get_random()
    get_repeat()
    get_single()
mopidy.core.history
    _history
mopidy.core.playlist
    get_current_tl_track()
    get_time_position()
mopidy.core.mixer
    get_volume()

Details:
- moved json export/import write_library()/load_library() from mopidy/local to mopidy/models
- new core methods save_state(), load_state()
- save_state(), load_state() accessible via rpc
- save state to disk at stop
- load state from disk at start
- new config: core.restore_state ("off", "load", "play")

TODO:
- seek to play position does not work. Timing issue.
- use extra thread to load state from disk at start?
2015-12-27 19:28:41 +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
Bryan Bennett
d210f3223f Call dbus dependent code only if dbus imported
Addresses another symptom of mopidy/mopidy#1335
2015-12-23 11:32:54 -05:00
Bryan Bennett
128de6cd01 Set hostname/name to None
Works around mopidy/mopidy#1335
2015-12-23 11:31:22 -05:00
Thomas Kemmer
ef1468d8d6 core: Add PlaylistsController.get_uri_schemes(). 2015-12-13 19:02:33 +01: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
Thomas Adamcik
ede5b8abff logging: Catch errors when loading logging/config_file 2015-12-05 22:44:39 +01:00
Thomas Adamcik
22ec9d9060 mpd: Add missing seeked event handling for idle
Fixes #1331

(cherry picked from commit 19daa89e15)
2015-12-05 22:19:29 +01: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
Thomas Adamcik
c2fc313151 mpd: Update event handling to warn about unknown events 2015-12-05 21:26:43 +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
Thomas Adamcik
435ca5064a listener: Log kwargs in failed send calls 2015-12-05 11:05:45 +01:00
Thomas Adamcik
aa010e03e9 listener: Try and protect actors against "bad" events 2015-12-04 23:53:09 +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
49b0580c39 mpd: Fix call signature for core playlist_deleted event 2015-12-04 22:08:56 +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
eeb1f91ed1 core: Actually perform delayed "eot-seek" on stream changed 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
Daniel Hahler
ebb413b6b1 Handle exceptions in load_extensions
This will skip those extensions, instead of crashing mopidy, e.g. when
mopidy-mopify fails because of a missing HOME environment variable
during mopidy's tests.
Ref: https://github.com/dirkgroenen/mopidy-mopify/issues/119
2015-11-28 23:51:52 +01:00
Daniel Hahler
fa817dee35 Fix wording with TypeError in ImmutableObject.replace 2015-11-28 23:00:28 +01:00
Stein Magnus Jodal
cc3ec5e218 Merge pull request #1330 from adamcik/feature/core-state-changed-between-tracks
Core state change events between tracks
2015-11-22 23:00:11 +01:00
Stein Magnus Jodal
fe759e4e44 Merge branch 'release-1.1' into develop 2015-11-22 21:06:25 +01:00
Stein Magnus Jodal
149fa15cab docs: Fix return value reference
Fixes #1332
2015-11-22 21:05:32 +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
01086a4cf4 core: Mark tracks as played via playback ended events 2015-11-21 00:34:27 +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
e48ac186f0 models: Deprecate Album.images
Fixes #1325
2015-11-18 15:03:13 +01:00
Stein Magnus Jodal
d0e4e8e35d versioning: Fix comparision of bytes and text 2015-10-29 22:57:25 +01:00
Stein Magnus Jodal
97c6b8812d xdg: Read .dirs file as text for py3 compat
Py3's configparser isn't able to work with bytes.
2015-10-29 22:57:21 +01:00
Stein Magnus Jodal
587f2ac3d9 compat: Make more urlparse usage py2+3 compatible 2015-10-29 22:57:18 +01:00
Stein Magnus Jodal
41c906c912 compat: Ignore some py2-only builtins when running flake8 on py3 2015-10-29 22:21:54 +01:00
Stein Magnus Jodal
ee555ff09d compat: Replace intern() with compat.intern() 2015-10-29 22:21:51 +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
7b029bfcc4 compat: Make urllib/urlparse usage py2+3 compatible 2015-10-29 22:03:55 +01:00
Stein Magnus Jodal
790b64de13 xdg: Handle paths as bytes 2015-10-29 22:03:46 +01:00
Stein Magnus Jodal
8b57509028 xdg: Use configparser from compat module 2015-10-29 22:03:41 +01:00
Stein Magnus Jodal
7f742ca503 compat: Add future import 2015-10-29 22:03:20 +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
9e1de9989d mpd: implemented MPD commands for modifying stored playlists. 2015-10-29 15:03:41 +01:00
kozec
f3f2375560 mpd: Added playlist_changed / stored_playlist event 2015-10-29 15:03:41 +01:00
Stein Magnus Jodal
7bbf45312a Merge branch 'release-1.1' into develop 2015-10-26 23:26:03 +01:00
Stein Magnus Jodal
32ae87360c http: Catch and log all requests exceptions 2015-10-26 23:23:11 +01:00
Nick Steel
056a17be89 docs: fixed flake8 whitespace error 2015-10-19 23:00:53 +01:00
Nick Steel
d6c2e513b4 docs: added param info for stream_title_changed 2015-10-19 22:56:54 +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
a9a2cdcb9d audio: Never run about-to-finish from audio actor 2015-10-07 22:59:57 +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
Stein Magnus Jodal
8dabdd7287 Merge branch 'release-1.1' into develop 2015-10-06 11:49:37 +02:00
Cadel Watson
525019d03e Exit with error if clear or scan attempts to load nonexistent library
Fixes #1298

(cherry picked from commit 1e037adfc1fbecaebcd6173a2bcda7ce6d436c37)
(cherry picked from commit 44eb668ff957fae42d3ddcab9a3acda56d9ecc8c)
(cherry picked from commit bf318fb1ea09108d9b0c32de2d70383f9f740c4b)
2015-10-06 11:49:22 +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
Cadel Watson
12d109d232 docs: Add available search terms to LibraryController search 2015-10-04 07:52:41 +11: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
a09970106a mpd: Wait for changes from core/audio when pausing 2015-09-16 23:34:58 +02:00
Stein Magnus Jodal
6ad235564e zeroconf: Display Avahi server's hostname 2015-09-15 11:25:54 +02:00