diff options
author | lovetox <philipp@hoerist.com> | 2020-12-29 23:54:34 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2020-12-30 00:20:52 +0300 |
commit | 0fe3b7dd7f23d9440fa924be7cdb9c091cb688a9 (patch) | |
tree | d69997d9a6efbb3b5a14517315551f9034630340 | |
parent | bd0b2cd32030e23b6902dadadc65cd2b744a980a (diff) |
Tune: Bail out if there is no artist or titlenbxmpp-2.0.0
-rw-r--r-- | nbxmpp/modules/tune.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nbxmpp/modules/tune.py b/nbxmpp/modules/tune.py index e054e3a..5eb0b07 100644 --- a/nbxmpp/modules/tune.py +++ b/nbxmpp/modules/tune.py @@ -64,6 +64,11 @@ class Tune(BaseModule): tune_dict[attr] = tune_node.getTagData(attr) data = TuneData(**tune_dict) + if data.artist is None and data.title is None: + self._log.warning('Missing artist or title: %s %s', + data, properties.jid) + return + pubsub_event = properties.pubsub_event._replace(data=data) self._log.info('Received tune: %s - %s', properties.jid, data) |