From d813356d9c52e8e34aefc06e2cf4844a996ac321 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 24 Apr 2024 01:13:03 +0200 Subject: [PATCH] [music.mopidy] Handle the case where `add` returns a list. --- platypush/plugins/music/mopidy/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platypush/plugins/music/mopidy/__init__.py b/platypush/plugins/music/mopidy/__init__.py index 97744b636a..9e9056ea34 100644 --- a/platypush/plugins/music/mopidy/__init__.py +++ b/platypush/plugins/music/mopidy/__init__.py @@ -255,6 +255,8 @@ class MusicMopidyPlugin(RunnablePlugin): ret = self._add(resource, position=0) if not ret: self.logger.warning('Failed to add %s to the tracklist', resource) + elif isinstance(ret, list): + track_id = ret[0].get('tlid') elif isinstance(ret, dict): track_id = ret.get('tlid') elif position is not None: