[RELEASE] Skype (VoIP Program) Addon

  Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
anwmalos Offline
Junior Member
Posts: 21
Joined: May 2010
Reputation: 0
Location: Athens
Thumbs Up  [RELEASE] Skype (VoIP Program) Addon Post: #1
https://code.google.com/p/xbmc-skype-addon/

Changelog:

20/11/2010:
-Added new icons, country flags, addon icon
-Changed background image (Taken straight from xbmc subtitles addon)
-Audio call place/receive, much more stable now but still needs some work
-Filled details window with the details of selected user (homepage/about/telephones etc.)



Original post
------------
I just commited the initial version which is only for the brave, it is missing most of the features, it does some pretty stupid stuff, it might crash etc etc etc

But hey, it works (sort of)

To use it you have to compile xbmc from the svn and enable external python, (which I has to be at least 2.6, haven't tested later versions) as well as install Skype4py.When you install Skype4py you have to find the file posix.py, which at least in ubuntu is in /usr/local/lib/python2.6/dist-packages/Skype4Py/api and change the line

trans = opts.pop('Transport', 'dbus')
with
trans = opts.pop('Transport', 'x11')

After that, install skype for linux (I used apt-get from the ubuntu repo), sign in and the first time you run the addon, accept the plugin connection from the addon to skype. That's it (I think)....

I don't know if it is possible to work with dbus, but right now it is causing me problems and I am too bored to fix it. I am also interested if anyone want to try making this work in windows as I have only tried in linux x64, I don't know if it is even possible.

Anyone who wants to contribute, first of all I need ideas, so brainstorm all you like about the look and feel of the addon. If anyone knows how to make pretty backgrounds/icons and stuff like that would be useful. Code wise, you are also welcome to make any suggestions

Disclaimer: I am a C/C++ coder so I don't know how my python coding looks, I'm sorry if it is not according to python coding style Tongue


And last but not least, many thanks to the author if the Gmail Checker plugin as I used (aka stolen) his code as a base for my addon!
(This post was last modified: 2010-11-20 21:56 by anwmalos.)
find quote
Spulit Offline
Member
Posts: 58
Joined: Feb 2010
Reputation: 0
Post: #2
Hi,

Thanks for posting this!
How do we install the addon on XBMC? I tried copying the folder to the scripts folder but I get an error indicating a failure in importing the "xbmcaddon" module...
find quote
anwmalos Offline
Junior Member
Posts: 21
Joined: May 2010
Reputation: 0
Location: Athens
Post: #3
I currently store it at $HOME/.xbmc/addons/script.skype/
Keep in mind that it is developed for dharma (specifically current SVN) so it might have some problems with that. Also check if the python path is correct, as a last resort you can manually add some paths on default.py.
find quote
Spulit Offline
Member
Posts: 58
Joined: Feb 2010
Reputation: 0
Post: #4
For now I'm just putting it to work with the latest XBMC Live distribution. For now I came up with a problem I previously detected in my developments.

Traceback (most recent call last):
15:54:22 T:2965613424 M:1999708160 NOTICE: File "/home/ecaalyx/.xbmc/scripts/Common Scripts/Skype/default.py", line 28, in ?
15:54:22 T:2965613424 M:1999708160 NOTICE: ui = gui.GUI( "ui.xml" , os.getcwd(), "Default")
15:54:22 T:2965613424 M:1999708160 NOTICE: File "/home/ecaalyx/.xbmc/scripts/Common Scripts/Skype/resources/lib/gui.py", line 146, in __init__
15:54:22 T:2965613424 M:1999708160 NOTICE: self.skype = Skype4Py.Skype(Events=self)
15:54:22 T:2965613424 M:1999708160 NOTICE: File "/usr/share/xbmc/system/python/python24.zip/Skype4Py/skype.py", line 243, in __init__
15:54:22 T:2965613424 M:1999708160 NOTICE: self._SetEventHandlerObj(Events)
15:54:22 T:2965613424 M:1999708160 NOTICE: AttributeError
15:54:22 T:2965613424 M:1999708160 NOTICE: :
15:54:22 T:2965613424 M:1999708160 NOTICE: 'Skype' object has no attribute '_SetEventHandlerObj'
15:54:22 T:2965613424 M:1999708160 ERROR: Scriptresult: Error

In fact, in the latest Skype4Py version there is no _SetEventHandlerObj() method and I found several other users complaining about this. Which is your Skype4Py version?
find quote
anwmalos Offline
Junior Member
Posts: 21
Joined: May 2010
Reputation: 0
Location: Athens
Post: #5
you are using python 2.4, I don't know if it is possible to run it under 2.4. I had a lot of problems with it even with the the hacks I have mentioned on the other thread. It's best to use external python and use at least 2.6 although I think it might work with 2.5
find quote
Spulit Offline
Member
Posts: 58
Joined: Feb 2010
Reputation: 0
Post: #6
I don't think it is related to using 2.4. If you look into the Skype object code (in skype.py) you will see that that method is not defined...Weird...
find quote
anwmalos Offline
Junior Member
Posts: 21
Joined: May 2010
Reputation: 0
Location: Athens
Post: #7
Spulit Wrote:I don't think it is related to using 2.4. If you look into the Skype object code (in skype.py) you will see that that method is not defined...Weird...

It's defined in utils.py:480 (Skype4Py-1.0.32.0)
find quote
Spulit Offline
Member
Posts: 58
Joined: Feb 2010
Reputation: 0
Post: #8
Hello,

I fixed the problem by manually setting the handlers. Now I'm stuck with a problem:

Traceback (most recent call last):
19:03:07 T:2964880240 M:1995587584 NOTICE: File "/home/ecaalyx/.xbmc/scripts/Common Scripts/Skype/default.py", line 28, in ?
19:03:07 T:2964880240 M:1995587584 NOTICE: ui = gui.GUI( "ui.xml" , os.getcwd(), "Default")
19:03:07 T:2964880240 M:1995587584 NOTICE: File "/home/ecaalyx/.xbmc/scripts/Common Scripts/Skype/resources/lib/gui.py", line 147, in __init__
19:03:07 T:2964880240 M:1995587584 NOTICE: self.skype = Skype4Py.Skype()
19:03:07 T:2964880240 M:1995587584 NOTICE: File "/usr/share/xbmc/system/python/python24.zip/Skype4Py/skype.py", line 250, in __init__
19:03:07 T:2964880240 M:1995587584 NOTICE: self._Api = SkypeAPI(Options)
19:03:07 T:2964880240 M:1995587584 NOTICE: File "/usr/share/xbmc/system/python/python24.zip/Skype4Py/api/posix.py", line 37, in SkypeAPI
19:03:07 T:2964880240 M:1995587584 NOTICE: from posix_x11 import SkypeAPI
19:03:07 T:2964880240 M:1995587584 NOTICE: File "/usr/share/xbmc/system/python/python24.zip/Skype4Py/api/posix_x11.py", line 179, in ?
19:03:07 T:2964880240 M:1995587584 NOTICE: libpath = find_library('X11')
19:03:07 T:2964880240 M:1995587584 NOTICE: File "/usr/share/xbmc/system/python/python24.zip/ctypes/util.py", line 120, in find_library
19:03:07 T:2964880240 M:1995587584 NOTICE: return _get_soname(_findLib_ldconfig(name) or _findLib_gcc(name))
19:03:07 T:2964880240 M:1995587584 NOTICE: File "/usr/share/xbmc/system/python/python24.zip/ctypes/util.py", line 110, in _findLib_ldconfig
19:03:07 T:2964880240 M:1995587584 NOTICE: os.popen('/sbin/ldconfig -p 2>/dev/null').read())
19:03:07 T:2964880240 M:1995587584 NOTICE: OSError
19:03:07 T:2964880240 M:1995587584 NOTICE: :
19:03:07 T:2964880240 M:1995587584 NOTICE: [Errno 2] No such file or directory
19:03:07 T:2964880240 M:1995587584 ERROR: Scriptresult: Error

I should stress again that I'm trying to use this with an XBMC Live distribution, by repacking XBMC's internal python libraries package (/usr/lib/xbmc/system/python/python24.zip).

Another thing is that if I try to use dbus, I get these errors, which I don't know if are critical:

Corrupt JPEG data: 78 extraneous bytes before marker 0xd1
Corrupt JPEG data: 78 extraneous bytes before marker 0xd1

With this, the script doesn't show up anything.

Thanks
find quote
anwmalos Offline
Junior Member
Posts: 21
Joined: May 2010
Reputation: 0
Location: Athens
Post: #9
This plugin is not intended to be run on python 2.4. If you want to run in on python 2.4 then I already have solved all these issues on my earlier thread. Be warned that skype4py was unstable using this technique. I have not tested with dbus yet, please be patient if you want other things supported than the ones mentioned in the first post, I will try to fix most of them in time, as well as make a proper release
find quote
cbxbiker61 Offline
Senior Member
Posts: 150
Joined: Nov 2010
Reputation: 1
Post: #10
The following patch fixes dbus support in Skype4Py.

I've got the skype plugin working through dbus. Seems to work fine. Really need to get video support working to make this plugin do what I want.

Code:
--- ./Skype4Py/api/posix_dbus.py.orig    2010-07-30 18:24:52.000000000 -0600
+++ ./Skype4Py/api/posix_dbus.py    2010-11-15 23:00:59.627656895 -0700
@@ -85,6 +85,16 @@ class SkypeAPI(SkypeAPIBase):
             self.mainloop = gobject.MainLoop()

     def run(self):
+        # Bug fix 'segmentation fault core dumped' when using dbus.
+        self.logger.info('thread started')
+        if self.run_main_loop:
+            context = self.mainloop.get_context()
+            while True:
+                context.iteration(False)
+                time.sleep(0.2)
+        self.logger.info('thread finished')
+
+    def runOld(self):
         self.logger.info('thread started')
         if self.run_main_loop:
             self.mainloop.run()
(This post was last modified: 2010-11-19 05:27 by cbxbiker61.)
find quote
Post Reply