enable music track listener only after we signed it. Fixes #5351
This commit is contained in:
parent
0aa8856b6c
commit
3330f7bfa5
|
@ -897,13 +897,6 @@ class ConnectionDisco:
|
||||||
if identity['category'] == 'pubsub' and identity.get('type') == \
|
if identity['category'] == 'pubsub' and identity.get('type') == \
|
||||||
'pep':
|
'pep':
|
||||||
self.pep_supported = True
|
self.pep_supported = True
|
||||||
if dbus_support.supported:
|
|
||||||
listener = MusicTrackListener.get()
|
|
||||||
track = listener.get_playing_track()
|
|
||||||
if gajim.config.get_per('accounts', self.name,
|
|
||||||
'publish_tune'):
|
|
||||||
gajim.interface.music_track_changed(listener, track,
|
|
||||||
self.name)
|
|
||||||
break
|
break
|
||||||
if features.__contains__(common.xmpp.NS_VCARD):
|
if features.__contains__(common.xmpp.NS_VCARD):
|
||||||
self.vcard_supported = True
|
self.vcard_supported = True
|
||||||
|
|
10
src/gajim.py
10
src/gajim.py
|
@ -1942,6 +1942,10 @@ class Interface:
|
||||||
nick = gc_control.nick
|
nick = gc_control.nick
|
||||||
password = gajim.gc_passwords.get(room_jid, '')
|
password = gajim.gc_passwords.get(room_jid, '')
|
||||||
gajim.connections[account].join_gc(nick, room_jid, password)
|
gajim.connections[account].join_gc(nick, room_jid, password)
|
||||||
|
# send currently played music
|
||||||
|
if gajim.connections[account].pep_supported and dbus_support.supported \
|
||||||
|
and gajim.config.get_per('accounts', account, 'publish_tune'):
|
||||||
|
self.enable_music_listener()
|
||||||
|
|
||||||
def handle_event_metacontacts(self, account, tags_list):
|
def handle_event_metacontacts(self, account, tags_list):
|
||||||
gajim.contacts.define_metacontacts(account, tags_list)
|
gajim.contacts.define_metacontacts(account, tags_list)
|
||||||
|
@ -3402,12 +3406,6 @@ class Interface:
|
||||||
pass
|
pass
|
||||||
gobject.timeout_add_seconds(5, remote_init)
|
gobject.timeout_add_seconds(5, remote_init)
|
||||||
|
|
||||||
for account in gajim.connections:
|
|
||||||
if gajim.config.get_per('accounts', account, 'publish_tune') and \
|
|
||||||
dbus_support.supported:
|
|
||||||
self.enable_music_listener()
|
|
||||||
break
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
gajim.interface = self
|
gajim.interface = self
|
||||||
gajim.thread_interface = ThreadInterface
|
gajim.thread_interface = ThreadInterface
|
||||||
|
|
Loading…
Reference in New Issue