this plugin has nothing to do with MediaPortalCalliope99 wrote: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.
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
iTunes Plugin
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: iTunes Plugin
-
kbrown.1407
- Posts: 2
- Joined: Sat Jan 11, 2014 3:10 pm
Re: iTunes Plugin
A few quick (hopefully) questions. I am trying to use the iTunes plugin in conjunction with the AutoRemote plugin. The AR plugin yields results in the variable "eg.event.payload.arcomm" I would like to use these results with the iTunes plugin for the search and play and playlist by name actions. I am new to EG and python so I haven't figured out how to do so. Anyone able to provide me with some guidance? I tried saving the AR results to a global variable and then calling it but had no luck.
Also, I would like to take the results from the iTunes plugin "get information" actions and push those results through AR to display on my phone. I can't seem to find where/how these results are stored or how I can call them.
Thanks in advance and sorry for what I expect to be "noob" questions.
Also, I would like to take the results from the iTunes plugin "get information" actions and push those results through AR to display on my phone. I can't seem to find where/how these results are stored or how I can call them.
Thanks in advance and sorry for what I expect to be "noob" questions.
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: iTunes Plugin
I can't help you with autoremote but I can give you a script that will hopefully help. I tested it with the broadcast plugin.
This macro will do an Itunes "Search N Play" using the payload from any event that triggers it. You can paste it directly into your EG configuration Tree.
To explain the script a little in case you need to adapt it:
Here we set a variable named test with the string we want to use in our "Search N Play".
The first line is commented out but you can see how to manually set the string for testing.
The second line shows how to set the string to the payload of the event which is triggering the macro.
To use something else like a global variable, or the event suffix etc. please take the time to read the following extremely useful page: http://www.eventghost.org/docs/scripting.html
This macro will do an Itunes "Search N Play" using the payload from any event that triggers it. You can paste it directly into your EG configuration Tree.
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1572">
<Macro Name="Search n Play" Expanded="True">
<Event Name="Broadcast.test" />
<Action>
EventGhost.PythonScript(u'#test = "The Beatles"\ntest = eg.event.payload\n\neg.plugins.iTunes.SearchAndPlay(\'All\', test, True, u\'eventghostTemp\')\n ')
</Action>
</Macro>
</EventGhost>Code: Select all
#test = "The Beatles"
test = eg.event.payload
eg.plugins.iTunes.SearchAndPlay('All', test, True, u'eventghostTemp')The first line is commented out but you can see how to manually set the string for testing.
The second line shows how to set the string to the payload of the event which is triggering the macro.
To use something else like a global variable, or the event suffix etc. please take the time to read the following extremely useful page: http://www.eventghost.org/docs/scripting.html
-
kbrown.1407
- Posts: 2
- Joined: Sat Jan 11, 2014 3:10 pm
Re: iTunes Plugin
Thank you! The scripting webpage gave me the info I needed to get it completed. Thanks for a point in the right direction and for the work on the plugin!
Re: iTunes Plugin
It seems that this plugin doesn't work anymore:
I'm using the xbmc/kodi plugin and this works great
Code: Select all
18:46:54 Plugin: iTunes
18:47:14 Stack trace (most recent call last) (1694):
18:47:14 File "threading.pyc", line 504, in __bootstrap
18:47:14 File "threading.pyc", line 532, in __bootstrap_inner
18:47:14 File "threading.pyc", line 484, in run
18:47:14 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 354, in __MainLoop
18:47:14 self.__DoOneEvent()
18:47:14 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 326, in __DoOneEvent
18:47:14 self.HandleAction(action)
18:47:14 File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionThread.py", line 87, in HandleAction
18:47:14 action()
18:47:14 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 62, in __call__
18:47:14 self.returnValue = self.func(*self.args, **self.kwargs)
18:47:14 File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginItem.py", line 100, in Execute
18:47:14 self.info.Start()
18:47:14 File "C:\Program Files (x86)\EventGhost\eg\Classes\PluginInstanceInfo.py", line 177, in Start
18:47:14 self.instance.__start__(*self.args)
18:47:14 File "C:\Program Files (x86)\EventGhost\plugins\Itunes\__init__.py", line 765, in __start__
18:47:14 self.ComActive()
18:47:14 File "C:\Program Files (x86)\EventGhost\plugins\Itunes\__init__.py", line 756, in ComActive
18:47:14 self.StartThread()
18:47:14 File "C:\Program Files (x86)\EventGhost\plugins\Itunes\__init__.py", line 748, in StartThread
18:47:14 self.workerThread.Start(20)
18:47:14 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 125, in Start
18:47:14 self.Func(self.__setupFunc, timeout)()
18:47:14 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 213, in Wrapper
18:47:14 eg.PrintStack()
18:47:14 Fehler beim Start des Plugins: iTunes
18:47:14 Error starting iTunes worker thread- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: iTunes Plugin
It seems that it is not working on your system but it is working for me.
I just tested using iTunes 12.3.1.23 and EventGhost 0.4.1.r1700 on Win7 x64
Unfortunately I don't see anything obvious from that error to know what the problem might be.
I just tested using iTunes 12.3.1.23 and EventGhost 0.4.1.r1700 on Win7 x64
Unfortunately I don't see anything obvious from that error to know what the problem might be.
Re: iTunes Plugin
Did you finally get it?scottbakertemp wrote:Would it be possible to enable or disable airplay devices? It would be awesome if I could use this to start a playlist and then switch which airport expresses are playing.
thanks for all the work,
-Scott
- Boolean263
- Plugin Developer
- Posts: 81
- Joined: Sat Aug 12, 2017 7:52 pm
- Location: Ottawa, Canada
- Contact:
Re: iTunes Plugin
I found this plugin a few days ago, and I'm glad to say it still works. The fact that its last release was a few years ago worried me a bit, so I decided to copy it to github and play with it. The result is attached.
The changes are mostly minor, but they're things I thought were missing from the plugin:
The changes are mostly minor, but they're things I thought were missing from the plugin:
- Add more info to the TrackChanged event: media kind, composer, comment, and genre
- Added a StreamTrackChanged event, that gets triggered when a web radio stream changes the song title
- Added a Stopped event when the user stops iTunes
- Play/Pause toggle (this was really trivial)
- A bit of refactoring
So far I haven't found any API calls about AirPlay. I can keep looking, though.juanalei wrote:Did you finally get it?
- Attachments
-
- iTunes-0.1.12.egplugin
- (12.84 KiB) Downloaded 122 times
Windows 10 Home, version 1703, build 15063.540 ┬À EventGhost 0.5.0-rc4 ┬À wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.
Re: iTunes Plugin
I am not a programmer so can anyone help me understand this error?
Error in Action: "iTunes: Load Playlist: Loved Songs"
Traceback (most recent call last) (1722):
File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
return self(*args)
File "C:\ProgramData\EventGhost\plugins\iTunes3\__init__.py", line 281, in __call__
return self.plugin.CallThread(partial(self.plugin.workerThread.doLoadPlaylist,plname,self.value))
AttributeError: 'NoneType' object has no attribute 'doLoadPlaylist'
- Boolean263
- Plugin Developer
- Posts: 81
- Joined: Sat Aug 12, 2017 7:52 pm
- Location: Ottawa, Canada
- Contact:
Re: iTunes Plugin
Well, without getting too technical, the plugin is trying to ask its worker thread to load the playlist, but the worker thread doesn't exist.GUILTIE wrote:I am not a programmer so can anyone help me understand this error?
Can you list the steps you took that led to this error appearing? It'll help me track it down and try to fix it. Include things like whether iTunes is already open or not when you do the thing.
Edit: Never mind, I've been able to recreate that issue myself. Looks like I got too clever in my refactoring.
Windows 10 Home, version 1703, build 15063.540 ┬À EventGhost 0.5.0-rc4 ┬À wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.
- Boolean263
- Plugin Developer
- Posts: 81
- Joined: Sat Aug 12, 2017 7:52 pm
- Location: Ottawa, Canada
- Contact:
Re: iTunes Plugin
There, this version should fix it. Let me know!
I've also added a notice when the playlist actions are called with a playlist name that can't be found in iTunes.
I've also added a notice when the playlist actions are called with a playlist name that can't be found in iTunes.
- Attachments
-
- iTunes-0.1.13.egplugin
- (29.4 KiB) Downloaded 108 times
Windows 10 Home, version 1703, build 15063.540 ┬À EventGhost 0.5.0-rc4 ┬À wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.
Re: iTunes Plugin
Works brilliantly now, thank you!! I am glad you were able to fix it; I could not have told you the steps I took to cause the problem before. It worked fine... then just started giving me that error even after restarting iTunes, EventGhost, and the PC.
Re: iTunes Plugin
Boolean263, i added a bunch of stuff to this plugin a while back but never officially posted it in this thread. I don't recall everything i added, but i think everything you did plus some other functions that were useful for writing the web App here. viewtopic.php?f=13&t=9487.
Forum uploads seem to be broken at the moment. So this is a dropbox link to it. https://www.dropbox.com/s/s6x34likja81w ... __.py?dl=1
Just to comment on the airplay question. The comm library that this plugin uses is really out of date & apple won't likely be releasing an updated windows sdk anytime soon. There are no commands for controlling airplay zones, last update was 2007, pre airplay. Believe me, i'd love to have these controls too. The only way i see it happening is to write a bonjour client or pigiback off of other airplay software. Alternatively i've been using mouse/keyboard emulation for a while to toggle airplay zones. This works fine, as long as your airplay clients don't change position in the iTunes drop down list
Forum uploads seem to be broken at the moment. So this is a dropbox link to it. https://www.dropbox.com/s/s6x34likja81w ... __.py?dl=1
Just to comment on the airplay question. The comm library that this plugin uses is really out of date & apple won't likely be releasing an updated windows sdk anytime soon. There are no commands for controlling airplay zones, last update was 2007, pre airplay. Believe me, i'd love to have these controls too. The only way i see it happening is to write a bonjour client or pigiback off of other airplay software. Alternatively i've been using mouse/keyboard emulation for a while to toggle airplay zones. This works fine, as long as your airplay clients don't change position in the iTunes drop down list
- Boolean263
- Plugin Developer
- Posts: 81
- Joined: Sat Aug 12, 2017 7:52 pm
- Location: Ottawa, Canada
- Contact:
Re: iTunes Plugin
yokel22, that's awesome! Those are some great changes, thank you so much for sharing them! I've added them to "my" version above. I'll post it as a .egplugin once the forum's fixed (edit: looks like it's working now), but for now you can see it on the github page. (Here's the commit if you want to make sure I did it right!)yokel22 wrote:Boolean263, i added a bunch of stuff to this plugin a while back but never officially posted it in this thread. I don't recall everything i added, but i think everything you did plus some other functions that were useful for writing the web App here. [...]
I may try to make the rating selection dialog a bit prettier, if that's okay with you. (:
Good to know, thank you for the update. I'm sure people would appreciate a tutorial on the mouse/keyboard emulation you've set up, possibly in the Tutorials & Guides section.yokel22 wrote:Just to comment on the airplay question. The comm library that this plugin uses is really out of date & apple won't likely be releasing an updated windows sdk anytime soon. There are no commands for controlling airplay zones, last update was 2007, pre airplay. Believe me, i'd love to have these controls too. The only way i see it happening is to write a bonjour client or pigiback off of other airplay software. Alternatively i've been using mouse/keyboard emulation for a while to toggle airplay zones. This works fine, as long as your airplay clients don't change position in the iTunes drop down list
- Attachments
-
- iTunes-0.1.15.egplugin
- (13.98 KiB) Downloaded 106 times
Last edited by Boolean263 on Tue Aug 29, 2017 1:11 am, edited 1 time in total.
Windows 10 Home, version 1703, build 15063.540 ┬À EventGhost 0.5.0-rc4 ┬À wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.
Re: iTunes Plugin
Feel free to change any of it. I was just trying to save you some time. As it looked like you were planning on adding some other stuff.
