iTunes plugin in XBMC for Windows?
#16
Strangely, the iTunes library seems to import perfectly using this plug-in under Windows but trying to play any song from the library doesn't work for me. Trying gets a "playlist playback aborted, too many consequtive failed items" error. Could it be to do with a difference in how OSX & Windows treat directory paths maybe?
Reply
#17
Are they songs purchased on iTunes Store? If so then they way protected by DRM (Digital Rights Management) and will not play in anything other than iTunes and Apple iPod/iPhone hardware, see: http://en.wikipedia.org/wiki/FairPlay

If not then please provide a debug log from XBMC, see:
http://wiki.xbmc.org/index.php?title=HOW...Bug_Report
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#18
Quote:Strangely, the iTunes library seems to import perfectly using this plug-in under Windows but trying to play any song from the library doesn't work for me. Trying gets a "playlist playback aborted, too many consequtive failed items" error. Could it be to do with a difference in how OSX & Windows treat directory paths maybe?
I'm getting the same exact message. My songs are not protected by DRM. I've posted my debug log. Any help would be awesome!
http://pastebin.ca/1212946
Reply
#19
My audio files are also straight MP3s, no DRM. From that log, it looks like the codec isn't initialising, so it skips to the next item, encounters the same problem & keeps skipping down the playlist.

Code:
14:17:33 T:5160 M:1172377600   DEBUG: CPlayerCoreFactor::GetPlayers(/C:/Users/SkeezerJ/Desktop/Music/Nas - Hip hop is dead/10-nas_-_hold_down_the_block-ysp.mp3)
14:17:33 T:5160 M:1171668992   ERROR: CAudioDecoder: Unable to Init Codec while loading file /C:/Users/SkeezerJ/Desktop/Music/Nas - Hip hop is dead/10-nas_-_hold_down_the_block-ysp.mp3
14:17:33 T:5160 M:1172377600   ERROR: Playlist Player: skipping unplayable item: 47, path [/C:/Users/SkeezerJ/Desktop/Music/Nas - Hip hop is dead/10-nas_-_hold_down_the_block-ysp.mp3]

Should that leading slash be there on the path to the audio file?
Reply
#20
Code:
#
14:17:33 T:5160 M:1172406272   ERROR: Playlist Player: skipping unplayable item: 1, path [/C:/Users/SkeezerJ/Desktop/Music/Top 500 Rock And Roll Songs/001 - Led Zeppelin - Stairway To Heaven.mp3]
it looks like the plugin assumes every path started with a "/" which isn't the case on windows and therefore the file isn't found.

@d4rk: Could this be the problem?
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#21
That leading slash was the problem. I changed the code in itunes_parser.py that strips the file paths of the "file://localhost" to account for that left-over slash & now the audio files play fine.

Just change;

Code:
def _cleanup_filename(self, filename):
        if filename.startswith("file://localhost"):
            return unquote(filename[16:])
        else:
            return unquote(filename)

To this;

Code:
def _cleanup_filename(self, filename):
        if filename.startswith("file://localhost/"):
            return unquote(filename[17:])
        else:
            return unquote(filename)

And you should be good to go.

EDIT -
One other thing, for me at least it doesn't seem to be picking up the track numbers correctly from the iTunes database file. All the other tag information seems to be fine, except all the files get asssigned a track number of 0.
Reply
#22
Gamester17 Wrote:http://en.wikipedia.org/wiki/FairPlay#Ci...g_FairPlay

Also checkout doubleTwist software (which is not listed in that wikipedia article):
http://en.wikipedia.org/wiki/DoubleTwist
http://www.doubletwist.com

thanks for the links, I tried Fairuse and it caused my Avast Anti Virus to go nutts and in the end I couldn't even install it, even if it I told Avast to ignore the adaware it claimed it contains. I downloaded it from a 2nd source to make sure it wasn't something on the site, same thing. now doubletwist looks interesting I'm going to have to try it and see what I can do. I have about 30 music videos I've bought off iTunes and would love to have them in my XBMC.
Reply
#23
Quote:One other thing, for me at least it doesn't seem to be picking up the track numbers correctly from the iTunes database file. All the other tag information seems to be fine, except all the files get asssigned a track number of 0.

Newtie, thanks for the fix. Also you're correct about track numbers, which will definitely be incorporated in the next release.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Please read and follow the forum rules.
For troubleshooting and bug reporting, please make sure you read this first.


Image
Reply
#24
Hello,
I've made all the changes and the plugin seems to work fine on Windows. Although, I don't know how to get it to import into the library. I dont think this is a problem with the plugin, I think it is becuase I don't know what I'm doing.

So, how do I import my iTunes database into my library? At the moment I am doing this:
Select Music
Select Music Plugins
Select iTunes
Select <<Import My iTunes Library>>

It then scans through my library and gets to 100% and then thats it. What's supposed to happen next? I can't turn on the Library radio button (it stays grayed out). I can use the Add Source feature to add the iTunes Artists as a source and access the music, but that doesn't add anything to the library that way.

Thanks for helping out a n00b.

-Drew
Reply
#25
Just go to Albums/Artists/whatever and play your music.

It doesn't get the songs into XBMC's library - all it's doing is parsing the iTunes XML and loading the songs for the plugin's use.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#26
Hello.

Can someone help me please?

I downloaded the itunes plugin from itunes.zip from the xbmc addons bit from google code and have followed the instructions on here about changing the files to work in Windows. I thought i'd followed them correctly but when I run the plug in, a box flashes up very quickly saying, iTunes 100% - loading directories - retrieved 0 items.

The only bit I didn't understand in the instructions here was about getting the word filename to start exactly above return. As far as i'm aware I havent done anything I shouldnt.

Any ideas?

Thanks
Chris
Reply
#27
I have the same problem like Chris.

In default py i have the following entrys:

platform = "win32"
def get_itunes_library():
filename = D:\\Eigene Musik\\iTunes\\iTunes Music Library.xml
return filename
Reply
#28
This may have already been discussed elsewhere so forgive me if it has.

I'm not overly familiar with the nuances of SMB/CIFS so this may or may not be workable. But what's to stop this plug-in from accessing a shared iTunes library (on a Mac or PC from an xbox) if there is a SMB share of the iTunes folder (containing the xml) and if pysqlite2 libraries for xbox are compiled?

Just a thought. If anyone knows where to get the compiled libraries for xbox, I can certainly give this a shot myself. I'm hoping maybe this will finally be a start to a solid work-around (sans Firefly) for accessing iTunes 7+ libraries.
Reply
#29
In theory this could work but I'm not the author of the plugin so you can't be sure.
afaik python uses our virtual filesystem so it should be able to connect to a smb share via xbmc.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#30
Well in case any one is interested, I ran my modified script (using both a SMB and also a FTP share directly linked to my iTunes xml). Here's the error output I'm getting.

20:23:28 M: 41402368 ERROR: Unable to load: Q:\plugins\music\iTunes\resources\settings.xml, Line 0
Failed to open file
20:23:29 M: 39010304 NOTICE: -->Python Initialized<--
20:23:29 M: 39010304 NOTICE:
20:23:29 M: 38346752 NOTICE: Traceback (most recent call last):
20:23:29 M: 38346752 NOTICE: File "Q:\plugins\music\iTunes\default.py", line 32, in ?
20:23:30 M: 38346752 NOTICE:
20:23:30 M: 38346752 NOTICE: from itunes_parser import *
20:23:30 M: 38346752 NOTICE: File "Q:\plugins\music\iTunes\itunes_parser.py", line 19, in ?
20:23:30 M: 38346752 NOTICE:
20:23:30 M: 38346752 NOTICE: from sqlite3 import dbapi2 as sqlite
20:23:30 M: 38346752 NOTICE: ImportError
20:23:30 M: 38346752 NOTICE: :
20:23:30 M: 38346752 NOTICE: No module named sqlite3
20:23:30 M: 38346752 NOTICE:
20:23:30 M: 38346752 ERROR: Scriptresult: Error
20:23:31 M: 41455616 ERROR: CGUIMediaWindow::GetDirectory(plugin://music/iTunes/) failed
20:23:36 M: 42229760 WARNING: Skin has invalid include: contentpanelslide
20:23:36 M: 42229760 WARNING: Skin has invalid include: contentpanelslide
20:23:38 M: 42213376 WARNING: Skin has invalid include: contentpanelslide
20:23:38 M: 42213376 WARNING: Skin has invalid include: contentpanelslide
20:23:39 M: 42229760 WARNING: Skin has invalid include: contentpanelslide
20:23:39 M: 42229760 WARNING: Skin has invalid include: contentpanelslide
20:23:40 M: 42229760 WARNING: Skin has invalid include: contentpanelslide
20:23:40 M: 42229760 WARNING: Skin has invalid include: contentpanelslide
20:23:42 M: 39063552 NOTICE: -->Python Initialized<--
20:23:42 M: 39063552 NOTICE:
20:23:44 M: 36515840 NOTICE: Traceback (most recent call last):
20:23:44 M: 36515840 NOTICE: File "Q:\scripts\iTunes\default.py", line 35, in ?
20:23:44 M: 36515840 NOTICE:
20:23:44 M: 36515840 NOTICE: db = ITunesDB(DB_PATH)
20:23:44 M: 36515840 NOTICE: File "Q:\scripts\iTunes\itunes_parser.py", line 38, in __init__
20:23:44 M: 36515840 NOTICE:
20:23:44 M: 36515840 NOTICE: self.dbconn = sqlite.connect(dbfile)
20:23:44 M: 36515840 NOTICE: pysqlite2.dbapi2
20:23:44 M: 36515840 NOTICE: .
20:23:44 M: 36515840 NOTICE: OperationalError
20:23:44 M: 36515840 NOTICE: :
20:23:44 M: 36515840 NOTICE: unable to open database file
20:23:44 M: 36515840 NOTICE:
20:23:44 M: 36515840 ERROR: Scriptresult: Error

It appears that the real issue is popping up with the database.
Reply

Logout Mark Read Team Forum Stats Members Help
iTunes plugin in XBMC for Windows?1