diff --git a/mopidy/config/__init__.py b/mopidy/config/__init__.py index e89f0eb9..7d5b300b 100644 --- a/mopidy/config/__init__.py +++ b/mopidy/config/__init__.py @@ -21,7 +21,8 @@ _core_schema['config_dir'] = Path() _core_schema['data_dir'] = Path() # MPD supports at most 10k tracks, some clients segfault when this is exceeded. _core_schema['max_tracklist_length'] = Integer(minimum=1, maximum=10000) -_core_schema['restore_state'] = String(optional=True) +_core_schema['restore_state'] = String( + optional=True, choices=['off', 'volume', 'load', 'last', 'play']) _logging_schema = ConfigSchema('logging') _logging_schema['color'] = Boolean() diff --git a/mopidy/core/playback.py b/mopidy/core/playback.py index 1779ed77..f06fb64c 100644 --- a/mopidy/core/playback.py +++ b/mopidy/core/playback.py @@ -554,7 +554,7 @@ class PlaybackController(object): if state: if not isinstance(state, models.PlaybackState): raise TypeError('Expect an argument of type "PlaybackState"') - new_state = '' + new_state = None if 'play-always' in coverage: new_state = PlaybackState.PLAYING if 'play-last' in coverage: