Skip to content
Snippets Groups Projects
Commit 0fe3b7dd authored by Philipp Hörist's avatar Philipp Hörist
Browse files

Tune: Bail out if there is no artist or title

parent bd0b2cd3
No related branches found
No related tags found
No related merge requests found
...@@ -64,6 +64,11 @@ class Tune(BaseModule): ...@@ -64,6 +64,11 @@ class Tune(BaseModule):
tune_dict[attr] = tune_node.getTagData(attr) tune_dict[attr] = tune_node.getTagData(attr)
data = TuneData(**tune_dict) 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) pubsub_event = properties.pubsub_event._replace(data=data)
self._log.info('Received tune: %s - %s', properties.jid, data) self._log.info('Received tune: %s - %s', properties.jid, data)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment