Page 4 of 6

Re: iTunes Plugin

Posted: Mon Oct 03, 2011 12:02 am
by longinus
cfull1 wrote:I'm having trouble getting the plugin working.
The open action will work and the first trackchanged triggered, but the get info from that macro and every other action just gives the itunes not running error.
I'm running iTunes 10.4.0, EventGhost 0.4.1.r1540
jitterjames wrote:I have no idea why it is not working for you.
I noticed the same problem, and figured out why it's happening...
The problem is that iTunes 10.4.1 (and probably before that) has a window title of Music, instead of iTunes.
So WindowMatcher function doesn't actually find it I think.

So I changed it to be like this:

Code: Select all

self.windowMatch = eg.WindowMatcher(u"iTunes.exe",u'Music', None, None, None, 1, False, 0.0, 0)
I'm very new to EventGhost, so I'm not sure if that's all that's needed, but it does work fine now, at least for the control functions.. couldn't get any info back from iTunes.

Re: iTunes Plugin

Posted: Mon Oct 03, 2011 9:04 pm
by cfull1
Like a boss! Good call longinus!

I changed it too this

Code: Select all

self.windowMatch = eg.WindowMatcher(u"iTunes.exe", None, None, None, None, 1, False, 0.0, 0)
It all works now just like before.

Re: iTunes Plugin

Posted: Mon Oct 03, 2011 9:08 pm
by jitterjames
I think if we change

u'Music'

to

None

it should probably work for everyone... Do you want to test that on your systems?

Re: iTunes Plugin

Posted: Tue Oct 04, 2011 12:13 am
by cfull1
Ah! my bad. I copied the code from the previous message but forgot to change it.
Yes I changed it to None and its all works

Re: iTunes Plugin

Posted: Fri Oct 07, 2011 4:59 pm
by doopf
Hello,
first I wanna thank you for your great work.
But I also got a little Problem:
When minimizing iTunes to tray i get the "iTunes is not running" error.
Do you know any solution?

Re: iTunes Plugin

Posted: Fri Oct 07, 2011 8:03 pm
by jitterjames
sure. don't minimize it to the system tray. :lol:

but seriously try changing the False to True in the .py file

eg.WindowMatcher(u'iTunes.exe', None, u'iTunes', None, None, None, True, 0.0, 0)

only problem with this is that it may return more than one window. then you may need to change the None before True to a number, 1, or 2 or 3 etc. to get the right window... 1 will probably work. I don't know if it will change at some point.

example:

eg.WindowMatcher(u'iTunes.exe', None, u'iTunes', None, None, 1, True, 0.0, 0)

Re: iTunes Plugin

Posted: Fri Oct 07, 2011 8:07 pm
by jitterjames
try this one

Re: iTunes Plugin

Posted: Tue Oct 11, 2011 12:58 am
by cfull1
Hey jitterjames,
I added some more actions to your plugin that I was looking for.
I tried to keep with the rest of the plugin format with my new stuff.

I added:
  • Toggle Repeat
  • Repeat Off
  • Repeat One
  • Repeat All
Also more Information Retrieval actions:
  • Get the shuffle value
  • Get the repeat value
  • Get the list of playlists in library
  • Get the currently playing playlist name
  • Get a specified playlist's tracks
Feel free to use and change these methods or ignore this haha.

Re: iTunes Plugin

Posted: Tue Oct 11, 2011 1:57 am
by jitterjames
cfull1 wrote:Hey jitterjames,
I added some more actions to your plugin that I was looking for.
I tried to keep with the rest of the plugin format with my new stuff....

Feel free to use and change these methods or ignore this haha.
That's great. Thanks for adding to it. If other users can confirm that this works well for them maybe we can get Pako to put the updated version in the standard install for EventGhost.

FYI I don't use this plugin at all personally. If I were to use iTunes (which I don't) I would probably control it with a combination of this plugin and VoxCommando. You all should feel free to do whatever you like with it. Pako will probably be more picky though when it comes time to add it to the install.

It should also be noted that I was not the sole creator of this plugin, and much of the stuff that stottle put in there I don't even really understand. :lol: I only dabble in python.

Re: iTunes Plugin

Posted: Tue Oct 11, 2011 6:30 pm
by cfull1
Oh I forgot to mention, I found a method in the sdk

Code: Select all

def OnAboutToPromptUserToQuitEvent(self):
It gets called when the user trying to close iTunes.
Right now it prompts you to quit because eventghost is connected to it.
If you could tell iTunes to quit, it will do it automatically and not prompt.
It's just a small thing but I thought I would try.
Right now I'm using this to close:

Code: Select all

self.plugin.workerThread.StdCall('Quit')
Sometimes it works sometimes it doesn't. I have a hard time understanding the action calls because of way its all laid out at the bottom.
If you have any ideas let me know.

Is stottle not around?

Re: iTunes Plugin

Posted: Tue Oct 11, 2011 7:58 pm
by jitterjames
I don't know, but you could probably pm him if you need his help with something. I don't think he uses iTunes either though, so he is probably not subscribed to this thread.

Re: iTunes Plugin

Posted: Sat Oct 15, 2011 11:37 pm
by cfull1
I've made some more updates!
  • Cleaned up some of my previous actions
  • Replaced some errors that were displayed when nothing was playing with just a notification
  • Replaced the errors when SearchnPlay is triggered with a blank search field
  • Add Action "PlaySongInPlaylist" - Pretty self explanatory I think
  • I also incremented the version number
Let me know if you guys find any errors or have any feature requests.
I'll talk to Pako about including this release in the install file.

Re: iTunes Plugin

Posted: Sat Oct 22, 2011 8:18 pm
by nating
I just got one of the newer versions of the plugin and it really works just fine. It is working even after a pseudo update to iTunes I made just the other day.

It is nice that an even would tick off every time the track changes making it a lot more dynamic. Polling would be my next concern and I am looking to get past that and have my server updating automatically.

Re: iTunes Plugin

Posted: Tue Nov 15, 2011 9:04 pm
by scottbakertemp
I started using this plugin and it works great. Can someone here recommend software I could use to to reverse engineer the apple remote app? I would like to come up with a way to toggle airplay devices. It looks like everything else I would need is already covered in this plugin.

thanks for all the hard work,
-Scott

Re: iTunes Plugin

Posted: Thu Jan 05, 2012 4:43 am
by Calliope99
MediaPortal Version: 1.2.1
MediaPortal Skin: StreamedMP 1.7.2
Windows Version: Seven Home Edition with SP1
CPU Type: Atom
HDD: 250Gb + 1 Tb
Memory: 2 Gb
1. TV Card: Terratec H7
1. TV Card Type: USB
TV: Panasonic 42"
TV - HTPC Connection: HDMI

Hello,
while MediaPortal is excellent in all other areas I don't like its music section and, moreover, I already have all my music well organized with iTunes so I woud like to launch iTunes from within MP to play my music or (much better, but I understand also much more difficult to implement) to use MP as an iTunes remote.
That's why I have tried more than once to configure and use the iTunes plugin, but to no avail.
I have added my iTunes Music folder to the MP music library, enabled the iTunes plugin using the MP configuration utility and set the mp3, m4a, m4p, aac extensions in its options panel ... and now what?
First of all it's not clear to me what this plugin should do: should I browse my music library with MP and then iTunes would be launched when I click "play" on a music track or should iTunes be launched when I enter the music section from the MP home screen?
Secondly it looks like the plugin is not working at all because, despite my efforts outlined above, nothing of what I have described (or anything else different-than-the-usual) happens when I click play on a music track: MP just starts playing the song as usual while iTunes stays quiet.
Any help would be much appreciated.