diff --git a/platypush/plugins/media/mpv/__init__.py b/platypush/plugins/media/mpv/__init__.py index 7159985342..4ed5ed7b59 100644 --- a/platypush/plugins/media/mpv/__init__.py +++ b/platypush/plugins/media/mpv/__init__.py @@ -185,7 +185,7 @@ class MediaMpvPlugin(MediaPlugin): @action def play( self, - resource: str, + resource: Optional[str] = None, *_, subtitles: Optional[str] = None, fullscreen: Optional[bool] = None, @@ -211,6 +211,10 @@ class MediaMpvPlugin(MediaPlugin): :param metadata: Optional metadata to attach to the resource. """ + if not resource: + self.pause() + return self.status() + self._post_event(MediaPlayRequestEvent, resource=resource) if fullscreen is not None: args['fs'] = fullscreen