Closed Mystro256 closed 13 years ago
Well, if @arielj implements the unload functions required for every plugin, then you could do it there.
Other than that, maybe here:
https://github.com/emesene/emesene/blob/master/emesene/e3/papylib/Worker.py#L128
or in something called by close_session in emesene.py
well, if you get disconnected/disconnect, set_media does nothing because, well, you're unconnected...if i got your question right
2011/6/28 Mystro256 reply@reply.github.com:
There's an issue I couldn't figure out how to fix when I was playing with and testing the music plugin. If music is playing when the user disconnects from msn, the media message still shows on the other-end (tested with WLM), even though the user is offline. I believe similar issue occurs if you disable the music plugin while playing music.
I figure the media needs to be set to None before closing, perhaps like so:
if TRIGGER: self.session.set_media(None)
where TRIGGER is the condition where the plugin is being exited/stopped.
I'm not sure how to implement this, maybe someone knows a viable scenario?
Reply to this email directly or view it on GitHub: https://github.com/emesene/emesene-supported-plugins/issues/26
Well yeah that's right... I guess it make sense to implement it in emesene itself, thus it's an emesene issue not a plugin issue.
Basically the current "listening to" message isn't discarded on disconnect, thus on your contacts' end, it looks like you're still listening to the same song until you reconnect to msn.
Just wondering. What happens if you do the same with WLM? Does it also reset the pm or not?
On WLM from what I can see, it discards the media and reverts to the PM when closing, basically the equivalent of what calling self.session.set_media(None) does in emesene.
Any progress with this issue?
I don't believe so, all that needs to happen is to call self.session.set_media(None) on disconnect
Mystro256, add it to the close_session method in emesene.py?
try adding that call to
def on_user_disconnect(self):
'''
method called when the user selects disconnect
'''
self.close_session(False)
self.go_login(cancel_clicked=True, no_autologin=True)
emesene/emesene.py
just before the close_session
Doesn't it happen when you log out?
Yeah, but also on any type of disconnect, ie network issue. I would have added it, but I figured someone would know how to do the latter better than me, haha
So then it should be in close_session, not in on_user_disconnect
oh okay, I can do that then :)
unless @c10ud beats me to it again ;)
Adding it to on_user_disconnect seems to call it when I quit emesene, not when I disconnect. None the less, it doesn't seem to work putting it in on_user_disconnect anyway :S
The official client still has the message and persists until the account with the message logs back in
It seems to also happen when the plugin is stopped. Perhaps is there anything in the plugin that can be added to remove the message when the plugin is stopped? I figure it should fix the other situations too if a trigger or event does exist.
i think it's the same issue as https://github.com/emesene/emesene/issues/444 then
but i don't know if plugins are stopped before closing the session or after..
Well to my knowledge and testing, it's not an issue of it continuing to change, though that maybe another separate issue as well. The issue is of the official client interpreting the emesene contact as still having media playing. The only way to remove the message on the official client's end is to stop the music (or etc) before disconnecting.
My guess is that the media message just needs to be removed (ie calling self.session.set_media(None)), but for some reason on_user_disconnect does seem to work for me. Perhaps the session closes before the server gets to remove it?
Also, in case my setup isn't clear, I have one computer with banshee playing, emesene, and of course the music plugin loaded, while I view the contact list on the official client (i believe build 14 from 2009), on another computer with windows.
@Mystro256, did you try setting it in close_session? on_user_disconnect is for something else. I guess c10ud didn't understand your issue well enough.
Also, this is not a duplicate of https://github.com/emesene/emesene/issues/444
@Stbe thanks for the help, but I tried with no luck.
I can't seem to confirm this issue with any other client, so I'm going to consider this a bug in the official client :S
Papyon or something to do with the protocol must automatically erase the message when disconnecting (or at least it seems that way from the testing I did), so I'm going to close this.
Mystro, report it upstream then, pretty please.
Haha I meant as far as I can see, it's a glitch in the official client (probably because I'm not using the latest), not something papyon dependant. I'm going to do some more testing with my contacts and perhaps another version of the client, but papyon seems to handle it properly from what I've seen so far. I'll be sure to report it if someone else spots this issue or I can confirm it as a papyon issue. :)
There's an issue I couldn't figure out how to fix when I was playing with and testing the music plugin. If music is playing when the user disconnects from msn, the media message still shows on the other-end (tested with WLM), even though the user is offline. I believe similar issue occurs if you disable the music plugin while playing music.
I figure the media needs to be set to None before closing, perhaps like so:
where TRIGGER is the condition where the plugin is being exited/stopped.
I'm not sure how to implement this, maybe someone knows a viable scenario?