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.

MediaMonkey

Questions and comments specific to a particular plugin should go here.
Post Reply
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: MediaMonkey

Post by Pako »

I do not have MS Word (I use Open Office).
I think, it is easier to edit directly __init__.py.
I find changes easily (I use the "compare files" in PSPad editor).
In the near future I do not expect changes, but
there would be no problem if I change something or want to add.
Pako
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: MediaMonkey

Post by Pako »

Here is a corrected and improved script EventGhost.vbs.
I have made a small adjustment, so the event "MM_playing" carries as payload the title of the current playing song
and the event "MM_seeked" carries a information, how many milliseconds of the current track were already played.
Pako
Attachments
ScriptEventGhost.zip
(885 Bytes) Downloaded 280 times
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: MediaMonkey

Post by jitterjames »

nice. thanks.

OK I'll edit the .py file. I'll try to get it back to you within a few days.

J
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: MediaMonkey

Post by jitterjames »

Pako: A couple questions for you

you define some strings but I'm not sure if you use them or where:

Code: Select all

    verboseON = "With waiting, result verbose"
    verboseOFF = "With waiting, result numerical"
on your load playlist functions you talk about slow speed:
accessible = "Load only accessible tracks (low speed !)"
random = "Order by random (low speed !)"
randomToolTip = '''Disadvantage: Low speed
but I detect no difference in speed if I use these options or not (always slow). Am I missing something or is this left over from an earlier version?
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: MediaMonkey

Post by Pako »

jitterjames wrote:Pako: A couple questions for you
you define some strings but I'm not sure if you use them or where:

Code: Select all

    verboseON = "With waiting, result verbose"
    verboseOFF = "With waiting, result numerical"
These two strings are used in three actions:
AddCurrentSongToPlaylist
RemoveCurrentSongFromPlaylist
RemoveCurrentSongFromNowPlaying


Suppose you have a playlist called "Night Music".
If verbose mode is selected, eg.result will return texts such:
Track added to playlist Night Music
Track already exist in Night Music playlist
Playlist Day Music not exist
Track removed from Night Music playlist
Track not exist in Night Music playlist
Track removed from Now Playing window
Track not removed from Now Playing window


If numerical mode is selected, eg.result returns only numbers (0 = success, 1 or 2 = failure)

If the mode is selected "Without waiting", eg.result returns string "Call without waiting!"

I just come to one bug: Please correct the line 2175. Is there

Code: Select all

if verbres <2:
and has to be there

Code: Select all

if verbose < 2:
.
jitterjames wrote: on your load playlist functions you talk about slow speed:

Code: Select all

accessible = "Load only accessible tracks (low speed !)"
    random = "Order by random (low speed !)"
    randomToolTip = '''Disadvantage: Low speed
but I detect no difference in speed if I use these options or not (always slow). Am I missing something or is this left over from an earlier version?
This is to be divided into two cases:
1) Option "Random"
Yes, it seems that you are right. I made several attempts and one was even faster with option "Random".
I of course tried it before. Then I received those results, attempt with option "Random" has always lasted longer
(the difference was the greater, the more songs to meet the condition).
2) Option "Accessible"
There is absolutely certain, that the control of availability will cause the selection of songs will take longer.
This control is not done differently, than that check the existence of each file on the medium (disk).
Pako
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: MediaMonkey

Post by jitterjames »

ok, here it is with a few changes to the text. most of it was already pretty good. I could probably have done a better job in terms of consistency.
Attachments
__init__.py
some changes to descriptive text
(136.33 KiB) Downloaded 304 times
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: MediaMonkey

Post by Pako »

jitterjames,
thank you very very much for helping me with improving MediaMonkey plugin.
New version (0.2.2) is now available in the SVN repository.
Pako
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: MediaMonkey

Post by jitterjames »

you are welcome, but my efforts have been very small compared to yours. Thanks for this really great plugin. It is part of the reason that I love eventGhost so much!
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: MediaMonkey

Post by jitterjames »

Hi Pako,

I'm having problems with the exit/disconnect action on both my computers. Is it just me?

I get

Code: Select all

         Application is not running!
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: MediaMonkey

Post by Pako »

Hi jitterjames!
I do not have this problem. Perhaps you have another version of MM ?
Please do the following:
1) Start MM
2) Insert the action "Find Window" to the EG tree and in dialog select MM window
3) Close the dialog box click OK
4) Right-click on the line with the action "Find Window" and in contextual menu select "Copy"
5) Then log into this forum and post "Paste"
Pako
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: MediaMonkey

Post by jitterjames »

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1194">
    <Action>
        Window.FindWindow(u'MEDIAM~2.EXE', None, None, None, None, None, False, 0.0, 0)
    </Action>
</EventGhost>
it does seem to be disconnecting, just not closing.
I am using version 3.7.1194 of of eventghost. I'm not completely sure anymore if I'm using the latest version of your plugin though.
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: MediaMonkey

Post by jitterjames »

to wait or not to wait.

Hi Pako,

now that I understand the concept of using "wait" or "don't wait" in your sql actions I am trying to use it, but I find it is not practical to tie up the eventghost thread, especially when there are many results. I was thinking that instead of using wait, and putting the result into eg.result , your function could generate an event with a payload (containing information about the number of songs found) when it was finished. That way we could go on to do other things right away but still display the results (or try another query if there are none found).

From my limited knowledge of eventGhost and Python I think this should be quite easy to implement.

What do you think?

(If you don't like the idea, that's OK. I don't really need it, I just thought it was a better way to do it)
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: MediaMonkey

Post by jitterjames »

delete me
Last edited by jitterjames on Fri Oct 16, 2009 10:46 pm, edited 1 time in total.
User avatar
jitterjames
Experienced User
Posts: 677
Joined: Thu Aug 13, 2009 4:36 pm
Location: Quebec, Canada
Contact:

Re: MediaMonkey

Post by jitterjames »

Pako wrote:Hi jitterjames!
I do not have this problem. Perhaps you have another version of MM ?
Please do the following:
1) Start MM
2) Insert the action "Find Window" to the EG tree and in dialog select MM window
3) Close the dialog box click OK
4) Right-click on the line with the action "Find Window" and in contextual menu select "Copy"
5) Then log into this forum and post "Paste"
Pako
Ok, i modified the code for mywindow matcher and it works now

starting at line 77

Code: Select all

MyWindowMatcher = eg.WindowMatcher(
    None,
    u'{*}MediaMonkey{*}',
    u'TFMainWindow{*}',
    None,
    None,
    1,
    True,
    0,
    0
)
my change is that I switched the first parameter to: None

I think you are just lucky that your machine is always calling it MediaMonkey.exe
I have seen task manager reporting the process as: mediamonkey.exe or mediam~1.exe or mediam~2.exe on different machines. I don't know why it does that. Probably if I restart my machine it will go back to mediamonkey.exe but I almost never reboot.
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: MediaMonkey

Post by Pako »

Hi jitterjames!
jitterjames wrote:now that I understand the concept of using "wait" or "don't wait" in your sql actions I am trying to use it, but I find it is not practical to tie up the eventghost thread, especially when there are many results. I was thinking that instead of using wait, and putting the result into eg.result , your function could generate an event with a payload (containing information about the number of songs found) when it was finished. That way we could go on to do other things right away but still display the results (or try another query if there are none found).
From my limited knowledge of eventGhost and Python I think this should be quite easy to implement.
Yes, this option, I know I mentioned also:
Pako wrote:2) EventGhost is not waiting for the completion of the action.
Advantage: EventGhost is not busy and he can perform other work.
Disadvantage: EventGhost not receive any information about the outcome of work performed (it would perhaps was tackled by triggering events, but it is not user-friendly).
But okay, I'll try implement this option too. But you expect, that I will again need to correct my lousy (dictionary base) English.

Also a problem with WindowMatcher obviously look.
Pako
Post Reply