[RELEASE][LINUX] iPod plugin

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
chaosct Offline
Junior Member
Posts: 8
Joined: Sep 2011
Reputation: 0
Post: #1
Hi all!

I am the lucky owner of an iPod classic and a XBMC user since long ago.
So I've been thinking of having this feature in XBMC and since I was tired of waiting for someone to implement direct iPod-XBMC communication I tried to code it myself.

So this is basically a very simple plugin to play songs of your connected iPod. It runs only in linux AFAIK and it needs libgpod library and python bindings (on ubuntu: apt-get install python-gpod).

AND it CRASHES sometimes on my machine (but it is an ARM build on a pandaboard, so it could be easily not my fault)

You can find it in https://github.com/chaosct/XBMC-iPod-plugin .

And if you can and want improve it, just do so! it's github Tongue

Edit:
You will also need a nightly build of XBMC or XBMC Eden in order to let Python load external libs as python-gpod.
(This post was last modified: 2011-12-05 23:24 by chaosct.)
find quote
chaosct Offline
Junior Member
Posts: 8
Joined: Sep 2011
Reputation: 0
Post: #2
I uploaded a new version, you can now list all the songs of your ipod.

It seems to be much more stable now.

Here the zip:
https://github.com/downloads/chaosct/XBM...v0.0.3.zip
find quote
RockerC Offline
Fan
Posts: 311
Joined: May 2011
Reputation: 3
Post: #3
Cool, just have to wait for a Windows or Mac OS X version of this addon first though.

Will this also work with newer iPods like the iPod Touch or iPhone? Non-jailbroken that is?
find quote
chaosct Offline
Junior Member
Posts: 8
Joined: Sep 2011
Reputation: 0
Post: #4
RockerC Wrote:Cool, just have to wait for a Windows or Mac OS X version of this addon first though.

I'm afraid this will require A LOT of work. This plugin uses libgpod to access the data on the iPod ,wich is only available to linux as a substitute to iTunes. But, probably you can have iTunes serving your music using DAAP on Windows and Mac OS X.

...OR may be some hero using Windows or OSX will find a way to get the iPod information and direct filepaths to the songs from python Smile

RockerC Wrote:Will this also work with newer iPods like the iPod Touch or iPhone? Non-jailbroken that is?

From their webpage:

Quote:This release has support for all iPod models except the iPod Nano 6g (the touch one). Most non-jailbroken iOS devices (iPod Touch, iPhone) are also supported with the notable exception of the iPad and the iPhone/iPod Touch 4 which are only supported as read-only devices.
find quote
henrythemouse Offline
Junior Member
Posts: 5
Joined: Dec 2011
Reputation: 0
Post: #5
This is a great idea for a plugin, thanks for working on it.

I tried it out on my Nano 7.88 gig touch but I don't get any list at all. I suppose this is also an unsupported Nano?
find quote
chaosct Offline
Junior Member
Posts: 8
Joined: Sep 2011
Reputation: 0
Post: #6
henrythemouse Wrote:This is a great idea for a plugin, thanks for working on it.

I tried it out on my Nano 7.88 gig touch but I don't get any list at all. I suppose this is also an unsupported Nano?

Can you give more details about this?
  • I assume you are on Linux, Which distro/version?
  • XBMC version?
  • Do you get any errors on the gui? And in the log?
find quote
henrythemouse Offline
Junior Member
Posts: 5
Joined: Dec 2011
Reputation: 0
Post: #7
chaosct Wrote:Can you give more details about this?
  • I assume you are on Linux, Which distro/version?
  • XBMC version?
  • Do you get any errors on the gui? And in the log?

Ubuntu 10.4 (Lucid)
XBMC 2:10.00~svn35648-lucid1 (from packages.bodhilinux.com)

In /var/log/messages I can see that the ipod mounts at /media/usb0 read only (hfsplus).

No errors on the GUI.

In xbmc.log I get (at the end of the log):
Code:
14:41:43 T:2929687408 M:3326156800   ERROR: WEATHER: Unable to get data: Invalid License Key.
14:41:53 T:3044489072 M:3359227904 WARNING: CUtil::GetMatchingSource... no matching source found for [Addons]
14:41:58 T:2906790768 M:3356188672  NOTICE: -->Python Interpreter Initialized<--
14:42:44 T:2921294704 M:3316719616  NOTICE: -->Python Interpreter Initialized<--
14:42:44 T:2921294704 M:3314708480  NOTICE: {'limit': '4'}

If I refresh the xbmc.log just before I click on the ipod plugin I get
(about 7K worth of null bytes followed by):
Code:
14:43:46 T:3044489072 M:3387711488 WARNING: CUtil::GetMatchingSource... no matching source found for [Addons]
14:43:51 T:2938080112 M:3387613184  NOTICE: -->Python Interpreter Initialized<--

The string "ipod" is not in the log file at all.

Thank you
find quote
henrythemouse Offline
Junior Member
Posts: 5
Joined: Dec 2011
Reputation: 0
Post: #8
I apologize, it seems that the nano was not really mounted when I did this testing. After mounting it, the nano shows up in Rhythmbox and GTKpod, but doesn not in XBMC. Now I get a GUI error:

Script failed: ipod.py

In addition there are now numerous lines in the xbmc.log file pertaining to this plugin.

Code:
18:35:43 T:140459550742560 M:3244597248   ERROR: GetDirectory - Error getting plugin://plugin.audio.ipod/
18:35:43 T:140459550742560 M:3244597248   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.ipod/) failed
18:36:14 T:140459550742560 M:3245195264 WARNING: Trying to add unsupported control type 3
18:36:24 T:140459550742560 M:3244683264   ERROR: Texture manager unable to load file: /home/xbmc/Downloads/plugin.audio.ipod.v0.0.3.zip/icon.png
18:36:38 T:140459550742560 M:3244838912   ERROR: Unable to load: /home/xbmc/.xbmc/addons/plugin.audio.ipod/resources/settings.xml, Line 0
                                            Error document empty.
18:36:55 T:140458810509056 M:3239985152 WARNING: CreateFile, successfuly opened </home/xbmc/.xbmc/addons/skin.aeon.nox/backgrounds/addons.jpg> instead of </home/xbmc/.xbmc/addons/skin.aeon.nox/backgrounds/Addons.jpg>
18:37:05 T:140458857617152 M:3234365440  NOTICE: -->Python Interpreter Initialized<--
18:37:05 T:140458857617152 M:3234553856   ERROR: Error Type: exceptions.ImportError
18:37:05 T:140458857617152 M:3234553856   ERROR: Error Contents: No module named gpod
18:37:05 T:140458857617152 M:3234553856   ERROR: Traceback (most recent call last):
                                              File "/home/xbmc/.xbmc/addons/plugin.audio.ipod/iPod.py", line 154, in ?
                                                main(sys.argv[0],sys.argv[1])
                                              File "/home/xbmc/.xbmc/addons/plugin.audio.ipod/iPod.py", line 151, in main
                                                call_Url(a1)
                                              File "/home/xbmc/.xbmc/addons/plugin.audio.ipod/iPod.py", line 80, in call_Url
                                                f(*args)
                                              File "/home/xbmc/.xbmc/addons/plugin.audio.ipod/iPod.py", line 97, in firstLevel
                                                copyInfo(m)
                                              File "/home/xbmc/.xbmc/addons/plugin.audio.ipod/iPod.py", line 28, in copyInfo
                                                import gpod
                                            ImportError: No module named gpod
18:37:05 T:140459550742560 M:3234504704   ERROR: GetDirectory - Error getting plugin://plugin.audio.ipod/
18:37:05 T:140459550742560 M:3234504704   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.audio.ipod/) failed

I do have the package python-gpod installed (as well as libgpod). Is there some other package that I need?

Thank you.
find quote
chaosct Offline
Junior Member
Posts: 8
Joined: Sep 2011
Reputation: 0
Post: #9
For what I see, it seems that you need the last version of XBMC (Eden or nightly) in order to load python system libraries Sad I'll update the first post to show this requirement. I didn't notice that as I'm working on a custom git build...

I'll try later with another computer to see if endeed that is the case. However I suspect that this problem will be fixed by updating into XBMC Eden.
find quote
henrythemouse Offline
Junior Member
Posts: 5
Joined: Dec 2011
Reputation: 0
Post: #10
chaosct Wrote:For what I see, it seems that you need the last version of XBMC (Eden or nightly) in order to load python system libraries Sad I'll update the first post to show this requirement. I didn't notice that as I'm working on a custom git build...

I'll try later with another computer to see if endeed that is the case. However I suspect that this problem will be fixed by updating into XBMC Eden.

As much as I'd like to test this, I'm not sure I'm up to doing an upgrade to a beta Eden on Ubuntu. From what I've read on the web the upgrade can be difficult for those running XBMC-standalone. I see that Eden is very close to being released, maybe it's wise to wait for the release. At least that way my repository will remain stable along with the subsequent updates.

Thank you for investigating my problem and I hope to use your plugin soon.
find quote
henrythemouse Offline
Junior Member
Posts: 5
Joined: Dec 2011
Reputation: 0
Post: #11
Well I couldn'd wait, so I upgraded to the unstable ppa.

The plugin works now. After navigating to Music/Add-ons/iPod I'm seeing a list of two usb filepaths:

/media/usb
/media/usb0

They both contain "All Albums" and "All Songs" selections and the contents is the same under either filepath.

I'm wondering if there is a way to set this up so the access path is shorter. Can the iPod content be integrated into the Music Library? Are shortcuts possible?

Anyway, thank you for providing this, it's really nice to be able to plug in the nano and be able to play the music with XBMC.
find quote
chaosct Offline
Junior Member
Posts: 8
Joined: Sep 2011
Reputation: 0
Post: #12
henrythemouse Wrote:Can the iPod content be integrated into the Music Library? Are shortcuts possible?

That would be really nice but honestly, I have no idea. Maybe I'll ask in the forums.

henrythemouse Wrote:Anyway, thank you for providing this, it's really nice to be able to plug in the nano and be able to play the music with XBMC.

I'm really happy that you find it useful Big Grin
find quote
unom Offline
Junior Member
Posts: 7
Joined: Aug 2011
Reputation: 0
Post: #13
Great Plugin. Am using it with xbmcbuntu, with a 160gb Ipod Classic. Seems quick. Hope someone can continue to work on this. Would be great to have playlists.
find quote
zelman Offline
Junior Member
Posts: 1
Joined: Aug 2012
Reputation: 0
Post: #14
Awesome. Thanks for this plugin. Works great with my iPod nano. Any chance that it could be made to work with my iPhone as well? Are iOS devices hangled very differently by linux?
find quote