lzoubek / xbmc-plugin-mpdc

XBMC plugin for remote control of multiple MPD servers
GNU General Public License v3.0
20 stars 13 forks source link

[atv2] No network activity on Apple TV (2nd gen) #5

Closed djfergus closed 11 years ago

djfergus commented 12 years ago

Hello,

Thanks for your efforts in building this script, great idea.

I cannot seem to get it working on a Apple TV second generation (jailbroken).

Running tcpdump on the server and the atv2 show no network activity on port 6600 however the script says the server is offline. Neither configuring an IP address nor a hostname results in any traffic.

Below is the xbmc.log portion from running the script.

Full log is here: http://pastebin.com/UD2EGWfN

Please let me know if I can provide any additional debug info.

Thanks, Daniel.

02:57:30 T:94273536 M:102756352    INFO: initializing python engine.
02:57:30 T:94273536 M:102756352   DEBUG: PYTHONHOME -> /var/stash/Applications/XBMC.frappliance/Frameworks/
02:57:30 T:94273536 M:102756352   DEBUG: PYTHONPATH -> /var/stash/Applications/XBMC.frappliance/Frameworks/
02:57:30 T:94273536 M:102756352   DEBUG: new python thread created. id=5
02:57:30 T:109367296 M:102752256   DEBUG: Thread XBPyThread start, auto delete: 0
02:57:30 T:109367296 M:102752256   DEBUG: Python thread: start processing
02:57:30 T:109367296 M:102748160  NOTICE: -->Python Interpreter Initialized<--
02:57:30 T:109367296 M:102748160   DEBUG: Process - The source file to load is /var/mobile/Library/Preferences/XBMC/addons/script.mpdc/default.py
02:57:30 T:109367296 M:102748160   DEBUG: Process - Setting the Python path to /var/mobile/Library/Preferences/XBMC/addons/script.mpdc:/var/mobile/Library/Preferences/XBMC/addons/script.module.simplejson/lib:/var/mobile/Library/Preferences/XBMC/addons/script.module.beautifulsoup/lib:/private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.module.pil/lib:/private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.module.pysqlite/lib:/var/stash/Applications/XBMC.frappliance/Frameworks:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python26.zip:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-darwin:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-mac:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-mac/lib-scriptpackages:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-tk:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-old:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-dynload:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/site-packages:
02:57:30 T:109367296 M:102748160   DEBUG: Process - Entering source directory /var/mobile/Library/Preferences/XBMC/addons/script.mpdc
02:57:30 T:109367296 M:102748160   DEBUG: Instantiating addon using automatically obtained id of "script.mpdc" dependent on version 2.0 of the xbmc.python api
02:57:31 T:114462720 M:102748160   DEBUG: Thread Jobworker 114462720 terminating (autodelete)
02:57:34 T:109367296 M:102727680    INFO: Loading skin includes from /var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/skins/Confluence/720p/includes.xml
02:57:34 T:94273536 M:102727680   DEBUG: ------ Window Init (/var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/skins/Confluence/720p/select-profile.xml) ------
02:57:34 T:94273536 M:102727680    INFO: Loading skin file: /var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/skins/Confluence/720p/select-profile.xml
02:57:34 T:94273536 M:102727680    INFO: Texture bundle has changed, reloading
02:57:34 T:94273536 M:102727680   DEBUG: Cleanup - Closed bundle
02:57:34 T:94273536 M:102719488    INFO: Texture bundle has changed, reloading
02:57:34 T:94273536 M:102719488   DEBUG: Cleanup - Closed bundle
02:57:34 T:94273536 M:102719488    INFO: Texture bundle has changed, reloading
02:57:34 T:94273536 M:102719488   DEBUG: Cleanup - Closed bundle
02:57:34 T:109367296 M:102719488    INFO: Loading skin file: DialogProgress.xml
02:57:34 T:109367296 M:102719488   DEBUG: DialogProgress::StartModal called
02:57:34 T:109367296 M:102719488   DEBUG: ------ Window Init (DialogProgress.xml) ------
02:57:34 T:109367296 M:102719488    INFO: Texture bundle has changed, reloading
02:57:34 T:109367296 M:102719488   DEBUG: Cleanup - Closed bundle
02:57:34 T:109367296 M:102715392    INFO: Texture bundle has changed, reloading
02:57:34 T:109367296 M:102715392   DEBUG: Cleanup - Closed bundle
02:57:34 T:109367296 M:102711296    INFO: Texture bundle has changed, reloading
02:57:34 T:109367296 M:102711296   DEBUG: Cleanup - Closed bundle
02:57:34 T:109367296 M:102711296    INFO: Texture bundle has changed, reloading
02:57:34 T:109367296 M:102711296   DEBUG: Cleanup - Closed bundle
02:57:34 T:94273536 M:102711296    INFO: Texture bundle has changed, reloading
02:57:34 T:94273536 M:102711296   DEBUG: Cleanup - Closed bundle
02:57:34 T:94273536 M:102711296    INFO: Texture bundle has changed, reloading
02:57:34 T:94273536 M:102711296   DEBUG: Cleanup - Closed bundle
02:57:35 T:94273536 M:101486592   DEBUG: ------ Window Deinit (DialogProgress.xml) ------
djfergus commented 12 years ago

Forgot to add - your script works fine to connect to my mpd server from XBMC OSX running on my laptop - so there is no issue with the server.

Thanks, Daniel.

lzoubek commented 12 years ago

Could you go to settings and check : Skip profile selection and always use 'Profile 1'. Client will try to connect to profile 1 without allowing you to pick profile. It will probably fail, but we'll could get backtrace in log.

What a device that XBMC runs on? Next year it will run on my fridge :D

djfergus commented 12 years ago

Thanks for taking a look, see below:


02:31:19 T:94031872 M: 94806016    INFO: initializing python engine.
02:31:19 T:94031872 M: 94806016   DEBUG: PYTHONHOME -> /var/stash/Applications/XBMC.frappliance/Frameworks/
02:31:19 T:94031872 M: 94806016   DEBUG: PYTHONPATH -> /var/stash/Applications/XBMC.frappliance/Frameworks/
02:31:19 T:94031872 M: 94801920   DEBUG: new python thread created. id=2
02:31:19 T:74240000 M: 94797824   DEBUG: Thread XBPyThread start, auto delete: 0
02:31:19 T:74240000 M: 94797824   DEBUG: Python thread: start processing
02:31:20 T:74240000 M: 94781440  NOTICE: -->Python Interpreter Initialized<--
02:31:20 T:74240000 M: 94781440   DEBUG: Process - The source file to load is /var/mobile/Library/Preferences/XBMC/addons/script.mpdc/default.py
02:31:20 T:74240000 M: 94781440   DEBUG: Process - Setting the Python path to /var/mobile/Library/Preferences/XBMC/addons/script.mpdc:/var/mobile/Library/Preferences/XBMC/addons/script.module.simplejson/lib:/var/mobile/Library/Preferences/XBMC/addons/script.module.beautifulsoup/lib:/private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.module.pil/lib:/private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.module.pysqlite/lib:/var/stash/Applications/XBMC.frappliance/Frameworks:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python26.zip:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-darwin:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-mac:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-mac/lib-scriptpackages:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-tk:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-old:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-dynload:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/site-packages:
02:31:20 T:74240000 M: 94781440   DEBUG: Process - Entering source directory /var/mobile/Library/Preferences/XBMC/addons/script.mpdc
02:31:20 T:74240000 M: 94781440   DEBUG: Instantiating addon using automatically obtained id of "script.mpdc" dependent on version 2.0 of the xbmc.python api
02:31:23 T:74240000 M: 94056448    INFO: Loading skin includes from /var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/skins/Confluence/720p/includes.xml
02:31:23 T:74240000 M: 94044160  NOTICE: PMPDClient
02:31:23 T:74240000 M: 94044160    INFO: -->Python script returned the following error<--
02:31:23 T:74240000 M: 94044160   ERROR: Error Type: <type 'exceptions.OSError'>
02:31:23 T:74240000 M: 94044160   ERROR: Error Contents: [Errno 13] Permission denied: 'special:'
02:31:23 T:74240000 M: 94023680   ERROR: Traceback (most recent call last):
                                              File "/var/mobile/Library/Preferences/XBMC/addons/script.mpdc/default.py", line 137, in <module>
                                                ui = gui.GUI( 'mpd-client-main.xml',__addon__.getAddonInfo('path'), skin,'0')
                                              File "/var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/lib/gui.py", line 159, in __init__
                                                os.makedirs(art_dir)
                                              File "/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/os.py", line 150, in makedirs
                                                makedirs(head, mode)
                                              File "/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/os.py", line 150, in makedirs
                                                makedirs(head, mode)
                                              File "/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/os.py", line 150, in makedirs
                                                makedirs(head, mode)
                                              File "/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/os.py", line 150, in makedirs
                                                makedirs(head, mode)
                                              File "/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/os.py", line 157, in makedirs
                                                mkdir(name, mode)
                                            OSError: [Errno 13] Permission denied: 'special:'
02:31:23 T:74240000 M: 94023680    INFO: -->End of Python script error report<--
02:31:23 T:94031872 M: 94023680   DEBUG: ------ Window Init (DialogKaiToast.xml) ------
02:31:24 T:94031872 M: 94023680    INFO: Texture bundle has changed, reloading
02:31:24 T:94031872 M: 94023680   DEBUG: Cleanup - Closed bundle
02:31:24 T:94031872 M: 94011392    INFO: Texture bundle has changed, reloading
02:31:24 T:94031872 M: 94011392   DEBUG: Cleanup - Closed bundle
02:31:24 T:74240000 M: 93634560    INFO: Python script stopped
02:31:24 T:74240000 M: 93634560   DEBUG: Thread Python Thread 74240000 terminating
02:31:24 T:94031872 M: 93634560   DEBUG: waiting for python thread 2 to stop
02:31:24 T:94031872 M: 93642752   DEBUG: python thread 2 destructed
02:31:24 T:94031872 M: 93638656   DEBUG: SECTION:UnloadDll(libcurl.4.dylib)
02:31:24 T:94031872 M: 93638656   DEBUG: Unloading: libcurl.4.dylib
02:31:29 T:94031872 M: 93638656   DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
02:31:34 T:94031872 M: 94162944    INFO: Python, unloading python shared library because no scripts are running anymore
02:31:34 T:94031872 M: 94162944   ERROR: ClearBlock: Trying to clear non existent block /var/mobile/Library/Preferences/XBMC/addons/script.mpdc
lzoubek commented 12 years ago

this issue is same as in #4, please try to install Client from https://github.com/lzoubek/xbmc-plugin-mpdc/tree/eden_issue4 branch (just download whole repo, unzip and overwrite original files)

Once you try it on above sources, we'll probably get more info about the initial issue - some error when connecting

djfergus commented 12 years ago

"gaierror: [Errno 3] invalid value for ai_flags."

15:18:40 T:70656000 M: 96681984    INFO: initializing python engine.
15:18:40 T:70656000 M: 96681984   DEBUG: PYTHONHOME -> /var/stash/Applications/XBMC.frappliance/Frameworks/
15:18:40 T:70656000 M: 96681984   DEBUG: PYTHONPATH -> /var/stash/Applications/XBMC.frappliance/Frameworks/
15:18:40 T:70656000 M: 96681984   DEBUG: new python thread created. id=4
15:18:40 T:100503552 M: 96677888   DEBUG: Thread XBPyThread start, auto delete: 0
15:18:40 T:100503552 M: 96677888   DEBUG: Python thread: start processing
15:18:41 T:100503552 M: 96354304  NOTICE: -->Python Interpreter Initialized<--
15:18:41 T:100503552 M: 96354304   DEBUG: Process - The source file to load is /var/mobile/Library/Preferences/XBMC/addons/script.mpdc/default.py
15:18:41 T:100503552 M: 96354304   DEBUG: Process - Setting the Python path to /var/mobile/Library/Preferences/XBMC/addons/script.mpdc:/var/mobile/Library/Preferences/XBMC/addons/script.module.simplejson/lib:/var/mobile/Library/Preferences/XBMC/addons/script.module.beautifulsoup/lib:/private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.module.pil/lib:/private/var/stash/Applications/XBMC.frappliance/XBMCData/XBMCHome/addons/script.module.pysqlite/lib:/var/stash/Applications/XBMC.frappliance/Frameworks:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python26.zip:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-darwin:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-mac:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/plat-mac/lib-scriptpackages:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-tk:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-old:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/lib-dynload:/var/stash/Applications/XBMC.frappliance/Frameworks/lib/python2.6/site-packages:
15:18:41 T:100503552 M: 96354304   DEBUG: Process - Entering source directory /var/mobile/Library/Preferences/XBMC/addons/script.mpdc
15:18:41 T:100503552 M: 96354304   DEBUG: Instantiating addon using automatically obtained id of "script.mpdc" dependent on version 2.0 of the xbmc.python api
15:18:44 T:100503552 M: 96673792    INFO: Loading skin includes from /var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/skins/Confluence/720p/includes.xml
15:18:44 T:100503552 M: 96673792  NOTICE: PMPDClient
15:18:44 T:70656000 M: 96673792   DEBUG: ------ Window Init (/var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/skins/Confluence/720p/mpd-client-main.xml) ------
15:18:44 T:70656000 M: 96673792    INFO: Loading skin file: /var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/skins/Confluence/720p/mpd-client-main.xml
15:18:44 T:70656000 M: 96669696    INFO: Texture bundle has changed, reloading
15:18:44 T:70656000 M: 96669696   DEBUG: Cleanup - Closed bundle
15:18:44 T:70656000 M: 96669696    INFO: Texture bundle has changed, reloading
15:18:44 T:70656000 M: 96669696   DEBUG: Cleanup - Closed bundle
15:18:44 T:70656000 M: 96669696    INFO: Texture bundle has changed, reloading
15:18:44 T:70656000 M: 96669696   DEBUG: Cleanup - Closed bundle
15:18:45 T:70656000 M: 96653312    INFO: Texture bundle has changed, reloading
15:18:45 T:70656000 M: 96653312   DEBUG: Cleanup - Closed bundle
15:18:45 T:70656000 M: 96653312    INFO: Texture bundle has changed, reloading
15:18:45 T:70656000 M: 96653312   DEBUG: Cleanup - Closed bundle
15:18:45 T:70656000 M: 96653312    INFO: Texture bundle has changed, reloading
15:18:45 T:70656000 M: 96653312   DEBUG: Cleanup - Closed bundle
15:18:45 T:70656000 M: 96653312    INFO: Texture bundle has changed, reloading
15:18:45 T:70656000 M: 96653312   DEBUG: Cleanup - Closed bundle
15:18:45 T:100503552 M: 92549120    INFO: Loading skin file: DialogProgress.xml
15:18:45 T:100503552 M: 92549120   DEBUG: DialogProgress::StartModal called
15:18:45 T:100503552 M: 92549120   DEBUG: ------ Window Init (DialogProgress.xml) ------
15:18:45 T:100503552 M: 92549120    INFO: Texture bundle has changed, reloading
15:18:45 T:100503552 M: 92549120   DEBUG: Cleanup - Closed bundle
15:18:45 T:100503552 M: 92549120    INFO: Texture bundle has changed, reloading
15:18:45 T:100503552 M: 92549120   DEBUG: Cleanup - Closed bundle
15:18:45 T:70656000 M: 92549120    INFO: Texture bundle has changed, reloading
15:18:45 T:70656000 M: 92549120   DEBUG: Cleanup - Closed bundle
15:18:45 T:70656000 M: 92254208    INFO: Texture bundle has changed, reloading
15:18:45 T:70656000 M: 92254208   DEBUG: Cleanup - Closed bundle
15:18:45 T:100503552 M: 91656192  NOTICE: Connecting  to  MPD 192.168.0.91:6600
15:18:45 T:100503552 M: 91656192   ERROR: Traceback (most recent call last):
15:18:45 T:100503552 M: 91656192   ERROR:   File "/var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/lib/gui.py", line 191, in _connect
15:18:45 T:100503552 M: 91656192   ERROR:     self.client.connect(self.mpd_host,int(self.mpd_port),self.mpd_pass)
15:18:45 T:100503552 M: 91656192   ERROR:   File "/var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/lib/pmpd.py", line 42, in connect
15:18:45 T:100503552 M: 91656192   ERROR:     self.client.connect(host,port)
15:18:45 T:100503552 M: 91656192   ERROR:   File "/var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/lib/rmpd.py", line 41, in connect
15:18:45 T:100503552 M: 91656192   ERROR:     super(RMPDClient, self).connect(host, port)
15:18:45 T:100503552 M: 91656192   ERROR:   File "/var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/lib/xbmpc.py", line 392, in connect
15:18:45 T:100503552 M: 91656192   ERROR:     self._sock = self._connect_tcp(host, port)
15:18:45 T:100503552 M: 91656192   ERROR:   File "/var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/lib/xbmpc.py", line 371, in _connect_tcp
15:18:45 T:100503552 M: 91656192   ERROR:     flags):
15:18:45 T:100503552 M: 91656192   ERROR: gaierror: [Errno 3] invalid value for ai_flags.
15:18:45 T:100503552 M: 91656192  NOTICE: Cannot connect
15:18:45 T:100503552 M: 91656192    INFO: Loading skin file: DialogOK.xml
15:18:45 T:70656000 M: 91656192   DEBUG: ------ Window Init (DialogOK.xml) ------
15:18:45 T:70656000 M: 91656192    INFO: Texture bundle has changed, reloading
15:18:45 T:70656000 M: 91656192   DEBUG: Cleanup - Closed bundle
15:18:45 T:70656000 M: 91594752   DEBUG: ------ Window Deinit (DialogProgress.xml) ------
15:18:52 T:70656000 M: 91701248   DEBUG: ------ Window Deinit (DialogOK.xml) ------
15:18:52 T:100503552 M: 92155904    INFO: Loading skin file: DialogProgress.xml
15:18:53 T:100503552 M: 92155904   DEBUG: DialogProgress::StartModal called
15:18:53 T:100503552 M: 92155904   DEBUG: ------ Window Init (DialogProgress.xml) ------
15:18:53 T:100503552 M: 92155904    INFO: Texture bundle has changed, reloading
15:18:53 T:100503552 M: 92155904   DEBUG: Cleanup - Closed bundle
15:18:53 T:100503552 M: 92155904    INFO: Texture bundle has changed, reloading
15:18:53 T:100503552 M: 92155904   DEBUG: Cleanup - Closed bundle
15:18:53 T:100503552 M: 92155904  NOTICE: disconnecting
15:18:53 T:100503552 M: 92155904  NOTICE: waiting for poller thread
15:18:53 T:100503552 M: 92155904  NOTICE: done
15:18:53 T:100503552 M: 92155904  NOTICE: disconnecting time poller
15:18:53 T:100503552 M: 92155904  NOTICE: waiting for time poller thread
15:18:53 T:100503552 M: 92155904  NOTICE: done
15:18:53 T:100503552 M: 92155904  NOTICE: client disconnected
15:18:53 T:70656000 M: 92155904    INFO: Texture bundle has changed, reloading
15:18:53 T:70656000 M: 92155904   DEBUG: Cleanup - Closed bundle
15:18:53 T:70656000 M: 92155904    INFO: Texture bundle has changed, reloading
15:18:53 T:70656000 M: 92155904   DEBUG: Cleanup - Closed bundle
15:18:53 T:70656000 M: 92155904   DEBUG: ------ Window Deinit (DialogProgress.xml) ------
15:18:53 T:70656000 M: 92155904   DEBUG: ------ Window Deinit (/var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/skins/Confluence/720p/mpd-client-main.xml) ------
15:18:53 T:100503552 M: 96268288    INFO: Scriptresult: Success
15:18:53 T:100503552 M: 96268288    INFO: Python script stopped
15:18:53 T:100503552 M: 96268288   DEBUG: Thread Python Thread 100503552 terminating
15:18:53 T:70656000 M: 96268288   DEBUG: waiting for python thread 4 to stop
15:18:53 T:70656000 M: 96276480   DEBUG: python thread 4 destructed
15:19:03 T:70656000 M: 96661504    INFO: Python, unloading python shared library because no scripts are running anymore
15:19:03 T:70656000 M: 96661504   ERROR: ClearBlock: Trying to clear non existent block /var/mobile/Library/Preferences/XBMC/addons/script.mpdc
djfergus commented 12 years ago

Ok, I found a work-around. in: /private/var/mobile/Library/Preferences/XBMC/addons/script.mpdc/resources/lib/xbmpc.py

I changed:

  for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC,
                                      socket.SOCK_STREAM, socket.IPPROTO_TCP,
                                      flags):
            af, socktype, proto, canonname, sa = res

to

  for res in socket.getaddrinfo(host, port, socket.AF_UNSPEC,
                                      socket.SOCK_STREAM, socket.IPPROTO_TCP,
                                      0):
            af, socktype, proto, canonname, sa = res

And it works.

Further up there is a line:

        try:
            flags = socket.AI_ADDRCONFIG
        except AttributeError:
            flags = 0

So I assume that socket.AI_ADDRCONFIG call is doing something screwy on atv.

Cheers, Daniel.

djfergus commented 12 years ago

Actually, spoke too soon - it connects and my playlist appears but then it cant download artists. Checking logs now.

djfergus commented 12 years ago

Log is silent, it gets to "Getting artists", 75%, there is a flurry of network activity then CPU spins up to 100% :(

djfergus commented 12 years ago

Ah no, its all working, just slow :) Turns out it takes the little appletv2 a few minutes to parse my large music collection.

lzoubek commented 12 years ago

thanks for fixing it, I'll test it on linux and possibly apply your fix. About slow artist loading, I have a little performance issue in this branch. It is because of sorting artists - it consumes too much memory and could slowdown loading artists. Unfortunately I cannot ask MPD for sorted artists, so artists are unsorted, or I need to sort final listItems in xbmc.

lzoubek commented 12 years ago

I've released version 2.0.5 which inclues your fix, but I still did not solve performance issue when loading artists :(