Page 1 of 2
AIMP
Posted: Sun Nov 11, 2012 9:07 am
by Pako
It seems that
AIMP player is becoming more and more popular.
That's why I thought it was lacking EventGhost plugin for it.
ATTENTION:
For proper function of this EventGhost plugin it is required the
Web Control Plugin
(aimp_web_ctl.dll) from Vitaly Dyatlov to be installed to
AIMP !
Note:
This plugin works even if
AIMP is installed on a different computer than EventGhost
(but it must be connected to the same local network).
Download
here.
Pako
Re: AIMP
Posted: Fri Jan 11, 2013 3:51 pm
by igvk
This is great to have plugin to control
AIMP!
But - I noticed that when
AIMP is shut down, this plugin prints error:
Code: Select all
Traceback (most recent call last) (1600):
File "C:\Program Files (x86)\EventGhost\eg\Classes\Scheduler.py", line 137, in MainLoop
func(*args, **kwargs)
File "C:\Program Files (x86)\EventGhost\plugins\AIMP\__init__.py", line 279, in Polling
song = self.MakeRequest("get_song_current", "json")
File "C:\Program Files (x86)\EventGhost\plugins\AIMP\__init__.py", line 223, in MakeRequest
self.con.request("GET", "/?action=%s" % name)
File "httplib.pyc", line 910, in request
File "httplib.pyc", line 927, in _send_request
File "httplib.pyc", line 814, in putrequest
CannotSendRequest
[/color]
And it doesn't recover even when
AIMP is started again.
Re: AIMP
Posted: Sat Jan 12, 2013 6:11 am
by Pako
Thank you for reporting this issue.
It has long seemed that no one ever used this plugin.
I'm currently working on something. Once that is done, I will return to AIMP.
Pako
Re: AIMP
Posted: Mon Jan 21, 2013 6:47 pm
by Pako
You can download the corrected version.
Pako
Re: AIMP
Posted: Tue Jan 22, 2013 12:56 pm
by igvk
Thanks!
It's working now.
Is it possible to add commands such as "stop playback after current file"?
Re: AIMP
Posted: Tue Jan 22, 2013 6:08 pm
by Pako
igvk wrote:Is it possible to add commands such as "stop playback after current file"?
Unfortunately, the current version, it would be very unreliable.
It's because this (EG) plugin is based on the use (AIMP3)
aimp-web-ctl plugin (that creates web server).
I can only offer such a feature, that offered
aimp-web-ctl plugin.
It is true, that something more I could invent, but just something simple.
What you want to do I can not sufficiently comfortable, yet reliable.
Pako
Re: AIMP
Posted: Wed Jan 23, 2013 3:40 pm
by igvk
Ok, I underdastand this is a limitation of
aimp-web-ctl.
And here is a small bug report for the EG plugin:
I have the following Python command in one of macros, and it can be autorepeated 20 times per second:
vol = eg.plugins.
AIMP.get_volume(); eg.plugins.
AIMP.set_volume(int(vol)-1)
Sometimes, I get the following error in logs:
Code: Select all
Error in Action: "vol = eg.plugins.AIMP.get_volume(); eg.plugins.AIMP.set_volume(int(vol)-1)"
Traceback (most recent call last) (1610):
File "<string>", line 1, in <module>
File "C:\Program Files (x86)\EventGhost\plugins\AIMP\__init__.py", line 420, in __call__
return self.plugin.MakeRequest(self.__class__.__name__, self.value)
File "C:\Program Files (x86)\EventGhost\plugins\AIMP\__init__.py", line 237, in MakeRequest
self.con.request("GET", "/?action=%s" % name)
File "httplib.pyc", line 910, in request
File "httplib.pyc", line 927, in _send_request
File "httplib.pyc", line 814, in putrequest
CannotSendRequest
Is it something that can be fixed?
Re: AIMP
Posted: Mon Jan 28, 2013 4:38 pm
by igvk
I have also noticed the following strange behaviour:
When AIMP isn't running, this plugins unsuccessfully tries to connect to TCP port 38475, and it repeats this process until source port of the outgoing connection also becomes 38475 - and it somehow establishes this connection.
After that, it's impossible to run AIMP with web-ctl.
I have never seen this with ZoomPlayer plugins.
That plugin manages to establish connection only when ZoomPlayer is running, and I don't see its unsuccessful attempts to connect in netstat or Process Hacker.
Re: AIMP
Posted: Tue Jan 29, 2013 7:59 am
by Pako
igvk wrote:I have the following Python command in one of macros, and it can be autorepeated 20 times per second:
vol = eg.plugins.AIMP.get_volume(); eg.plugins.AIMP.set_volume(int(vol)-1)
I am afraid that with it we can not do anything.
Only create a new plugin, for which would have not needed
aimp-web-ctl.dll.
I think that communication based on the web server has too much overhead and therefore sometimes not manage.
igvk wrote:I have also noticed the following strange behaviour:
When AIMP isn't running, this plugins unsuccessfully tries to connect to TCP port 38475, and it repeats this process until source port of the outgoing connection also becomes 38475 - and it somehow establishes this connection.
After that, it's impossible to run AIMP with web-ctl.
Oh, that's interesting. With that, I'll hopefully be able to do something.
igvk wrote:I have never seen this with ZoomPlayer plugins.
That plugin manages to establish connection only when ZoomPlayer is running, and I don't see its unsuccessful attempts to connect in netstat or Process Hacker.
I also do not know Zoom Player plugin. However, the problem here is that we can also control
AIMP, which is installed on another PC (than EventGhost). In this case, we can hardly determine if
AIMP is running.
I see one possible way (I currently excludes the possibility to create a new plugin that does not need
aimp-web-ctl.dll):
when
AIMP is installed on the same PC as EventGhost, I can do some routines differently.
Pako
Re: AIMP
Posted: Tue Jan 29, 2013 11:11 am
by igvk
It would be nice to fix this.
Is it possible to make only one persistent connection to aimp-web-ctl server?
P.S. With Zoomplayer plugin it is also possible to connect to ZP instance running on different computer.
Re: AIMP
Posted: Tue Jan 29, 2013 11:48 am
by Pako
igvk wrote:Is it possible to make only one persistent connection to aimp-web-ctl server?
This (EventGhost) plugin is done in such a way as to establish and maintain one connection for as long as possible.
igvk wrote:I have never seen this with ZoomPlayer plugins.
That plugin manages to establish connection only when ZoomPlayer is running, and I don't see its unsuccessful attempts to connect in netstat or Process Hacker.
igvk wrote:P.S. With Zoomplayer plugin it is also possible to connect to ZP instance running on different computer.
That's interesting. I have to see how this plugin can do that. To me it seems impossible.
Pako
Re: AIMP
Posted: Tue Jan 29, 2013 12:36 pm
by igvk
Pako wrote:This (EventGhost) plugin is done in such a way as to establish and maintain one connection for as long as possible.
I noticed with Process Hacker and also see with RawCap that it always establishes and quickly closes the connection - and does it very often
(several times a second).
Does it depend on the version of webctl plugin?
As for Zoomplayer, I looked at the plugin code, but couldn't find anything special at first glance - but that's probably because I don't know python.
It seems to connect to ZP in __init__ here:
Code: Select all
# create and connect a socket
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
eg.RestartAsyncore()
self.settimeout(1.0)
try:
self.connect(address)
except:
pass
Re: AIMP
Posted: Tue Jan 29, 2013 1:19 pm
by Pako
There is a fundamental difference between AIMP and Zoom player plugins.
It can not be compared:
1) AIMP (through aimp-web-ctl.dll) creates a web (HTTP) server
(you can use your browser with the address localhost:38475 to control of AIMP)
2) Zoom player communicates via TCP socket (and without the need for further support plugin).
Unfortunately I can not try it, because there in the free version of Zoom player I can not use the TCP remote control.
Or am I doing something wrong.
Pako
Re: AIMP
Posted: Tue Jan 29, 2013 2:12 pm
by igvk
Isn't it possible to set up persistent connection to AIMP?
O.K., the protocol is HTTP, but is it possible to use an already established TCP connection without closing it (and use HTTP/1.1 persistent connection)?
Or aimp-web-ctl doesn't support it?
Re: AIMP
Posted: Tue Jan 29, 2013 3:54 pm
by igvk
I noticed that the problem with never-ending frequent connections is due to the fact that events triggering options were set.
I have switched them all off, and now it doesn't show itself the way it used to.