Kodi Community Forum

Full Version: Music playlists from iTunes remote library and music when idle
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Alright, I have three related questions here. It ended up being more wordy than I thought it would be, sorry.

First, I use iTunes on my desktop to organize my music. I don't have an iPhone or iPod, but no other player does Smart Playlists as well as iTunes does, so that's what I'm using. It's using a library stored via samba on my local server.

Using iTunes allows me to spend a lot of time upfront organizing my music and setting up smart playlists, then simply rating songs, changing a song's genre or adding a tag in the comments field is all I need to do to keep those playlists up to date. This saves an immense amount of time for me personally.

I'm just curious as to how I would export these smart playlists on a regular basis to allow them to be read by XBMC. Listening to music through iTunes is fine for my desktop, but when my netbook is hooked up to the television it's not quite as nice, so I'd like to use XBMC. I'd like to have a daily copy of each playlist in my library available to XBMC.

Every playlist exporter I've used thus far breaks when music is saved on a server, probably because of relative vs. absolute paths. I'd like to hear about any alternatives you may know of that work under these circumstances.


Second question: Is there a way to run a playlist whenever there has been more than a minute or so of idle time? When I start a video it kills the current playlist (Usually the startup playlist), and when I am done, the playlist doesn't start up again afterwards. I don't want it to start up if I immediately go from the end of one video to navigating to another, but I do want it to start if the video finishes and nothing happens afterward for a minute.

And third question, sorry. If the above is possible, can I get it to also play when a video is paused for longer than a minute, and end when I press play again? I'd bet that I can only have one song or one video playing at a time and no more, so probably not, but better to ask. I would love to have this functionality, things often get paused when others enter the room and want to talk, and then I forget to resume for awhile.
Okay, my own testing on the third question leads me to believe that you cannot play music while a video is paused, but I'm not ruling it completely out yet.
Final bump in the hopes that someone knowledgeable on such things will see it.
Re the second question: at the moment the answer is no. On my list of things to think about is a screen saver that can run some arbitrary Python script. Then you could use that to do stuff after some set delay. However this isn't very high on my list.

Re the first question: I don't use iTunes, though over the years I recall seeing various postings about iTunes playlists hereabouts. Some forum searching might yield results.

If it's possibly to read the playlists remotely, e.g. if they're stored as files somewhere on the iTunes PC, it should be straightforward to write a Python script to import the playlists and make any required corrections to network paths. You could run the script as an XBMC autoexec.py.

JR
Thank you for the answer to the second. Would either this screensaver implementation or a python script that it runs be able to check if a video is playing, and if so, end instead of playing music? Or be able to play music until the video is unpaused? I mean, that's the way I'd prefer, but I don't think it would work that way.


I searched through Google and a few other areas, but you're right, I didn't look here. :| I'll see what I can find.
You can't play music while a video is paused. This would require a considerable overhaul of XBMC's media players, and this isn't on anyone's list of things to do.

If I ever end up writing a screensave that can run a Python script, that script should be able to do pretty much anything you want provided you're willing to put the effort in. However don't hold your breath as I won't be looking at this any time soon.

JR
Yeah, I understand, and totally agree that it's not worth the energy to make it work.

Thanks for the information though, very helpful. I will certainly be waiting for that feature though, regardless of how long it may take.