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.
MediaMonkey
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: MediaMonkey
Pako: I think maybe something is being lost in translation, but you don't sound very enthusiastic about it. Don't worry about it. If I really need it I can implement something myself.
thanks
J
thanks
J
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: MediaMonkey
Hi jitterjames !
I got it ready for publication. I did it as follows:
I left everything as it was.
Addition, I added one checkbox into the main dialog of plugin.
I need to check and correct only this:
1) Checkbox: Trigger events
2) ToolTip: Some actions (such as Load Playlist by Filter
or Add currently playing song to playlist) may, after its completion,
trigger an event. A result of this action carries the event as a payload.
Here you can choose, if you this option want or do not want.
You can do this for me?
Thanks, Pako
I got it ready for publication. I did it as follows:
I left everything as it was.
Addition, I added one checkbox into the main dialog of plugin.
I need to check and correct only this:
1) Checkbox: Trigger events
2) ToolTip: Some actions (such as Load Playlist by Filter
or Add currently playing song to playlist) may, after its completion,
trigger an event. A result of this action carries the event as a payload.
Here you can choose, if you this option want or do not want.
You can do this for me?
Thanks, Pako
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: MediaMonkey
sure, but first can you give me an example of what the events will look like? What will the event name be?
In the tooltip I will include an example, or two of what the events will look like.
I'm glad you put it in the main settings for the plugin, I was going to suggest that.
In the tooltip I will include an example, or two of what the events will look like.
I'm glad you put it in the main settings for the plugin, I was going to suggest that.
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: MediaMonkey
Events will be as follows:
prefix = MediaMonkey
Suffix and payload must be divided by actions:
1) Actions Load Playlist by Name, Load Playlist by Filter and Load Playlist by SQL query
suffix = playlist
payload = (u'Night music ', '159', '162 ') where the 1st item's is name or label of playlist,
the second item is the number of found songs on the disc and the third item is the number of found songs in the database
2) Action Add currently playing song to playlist
suffix = track_added
3) Action Remove current song from playing Playlist
suffix = track_removed
4) Action Remove currently playing song from Now Playing window
suffix = removed_from_now_playing
For cases 2 to 4, the payload coincides exactly with the "verbose" result.
For example: u"Track already exists in playlist Night music" for action Add currently playing song to playlist
Pako
prefix = MediaMonkey
Suffix and payload must be divided by actions:
1) Actions Load Playlist by Name, Load Playlist by Filter and Load Playlist by SQL query
suffix = playlist
payload = (u'Night music ', '159', '162 ') where the 1st item's is name or label of playlist,
the second item is the number of found songs on the disc and the third item is the number of found songs in the database
2) Action Add currently playing song to playlist
suffix = track_added
3) Action Remove current song from playing Playlist
suffix = track_removed
4) Action Remove currently playing song from Now Playing window
suffix = removed_from_now_playing
For cases 2 to 4, the payload coincides exactly with the "verbose" result.
For example: u"Track already exists in playlist Night music" for action Add currently playing song to playlist
Pako
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: MediaMonkey
cool. I think it will be a worthwhile enhancement. Can I test it by downloading the svn version?
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: MediaMonkey
I want upload to the SVN the language a corrected version.
Pako
Pako
- Attachments
-
- __init__.py
- (139.5 KiB) Downloaded 280 times
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: MediaMonkey
Hi Pako,
A problem has been created by this change when doing "load playlist by name"
With the old version this action was instant.
With the new version it takes a very long time to load a long playlist. I have some playlists with 1000+ songs and it takes over a minute to load. If I try to do other mediaMonkey commands before the list loads it becomes unstable.
I guess you had to change the way you loaded playlists by name so that you could get information to trigger the event.
If you can't fix it, maybe you should just remove the trigger for "load playlist by name". I always liked how this action was instant even with very big playlists.
I am waiting to fix the English until the changes are working well.
Also if I try to load a playlist that doesn't exist I get errors:
A problem has been created by this change when doing "load playlist by name"
With the old version this action was instant.
With the new version it takes a very long time to load a long playlist. I have some playlists with 1000+ songs and it takes over a minute to load. If I try to do other mediaMonkey commands before the list loads it becomes unstable.
I guess you had to change the way you loaded playlists by name so that you could get information to trigger the event.
If you can't fix it, maybe you should just remove the trigger for "load playlist by name". I always liked how this action was instant even with very big playlists.
I am waiting to fix the English until the changes are working well.
Also if I try to load a playlist that doesn't exist I get errors:
Unhandled exception in WorkerThread <MediaMonkeyWorkerThread>:
Callers stack:
File "threading.pyc", line 497, in __bootstrap
File "threading.pyc", line 525, in __bootstrap_inner
File "threading.pyc", line 477, in run
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 179, in __MainLoop
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 221, in __DoOneEvent
File "C:\Program Files\EventGhost\eg\Classes\ActionThread.py", line 83, in HandleAction
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 79, in __call__
File "C:\Program Files\EventGhost\eg\Classes\ActionThread.py", line 59, in ExecuteTreeItem
File "C:\Program Files\EventGhost\eg\Classes\ActionItem.py", line 252, in Execute
File "C:\Program Files\EventGhost\eg\Classes\ActionBase.py", line 168, in CallWrapper
File "C:\Program Files\EventGhost\plugins\MediaMonkey\__init__.py", line 2199, in __call__
Traceback (most recent call last) (1194):
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 202, in __DoOneEvent
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 225, in HandleAction
File "C:\Program Files\EventGhost\eg\Classes\ThreadWorker.py", line 72, in __call__
File "C:\Program Files\EventGhost\plugins\MediaMonkey\__init__.py", line 300, in LoadPlaylistByTitle
UnboundLocalError: local variable 'n' referenced before assignment
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: MediaMonkey
I understand and remedy is easy.jitterjames wrote:A problem has been created by this change when doing "load playlist by name"
With the old version this action was instant.
With the new version it takes a very long time to load a long playlist. I have some playlists with 1000+ songs and it takes over a minute to load.
I changed the way of load songs to be able to monitor the accessibility of songs on the disc.
Previously was imported entire playlist at once, today is imported each song separately.
I now will do arrangements:
If not selected the "Load only accessible ..." checkbox,
will it work as before.
And finally, will be completely clear, that this is indeed Slow speed
Pako
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: MediaMonkey
Yes.Pako wrote: And finally, will be completely clear, that this is indeed Slow speed!
Pako
Too bad the sql filters cannot be as instant as 'load playlist by name' when using Fast Speed !!
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: MediaMonkey
1 small thing I noticed. The text on the plugin settings page is Light Gray - like it is disabled.
I noticed that you have a website. Because of all the hard work I am making you do on this plugin, I would like to help you if you want to make an English version of your site. I don't know if this would be useful to you or not.
It might take a while because I am quite busy at the moment, but I would be happy to help you when I have time.
I noticed that you have a website. Because of all the hard work I am making you do on this plugin, I would like to help you if you want to make an English version of your site. I don't know if this would be useful to you or not.
It might take a while because I am quite busy at the moment, but I would be happy to help you when I have time.
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: MediaMonkey
How's this? Too long?
*Trigger Event - Advanced Option*
This can be used as an alternative to using "with waiting" and {eg.result}. By triggering events and selecting "without waiting" you can allow eventGhost to immediately perform other actions, but still have access to the results generated by your action, when they are ready.
If you select this option, some actions (such as %s or %s) will trigger an event upon completion, a payload is used to indicate the results of the action.
The event triggered will be constructed as follows:
Prefix: MediaMonkey
Suffix: a string indicating the particular command (e.g. playlist, or track_added)
Payload: this will depend on the results of the action
for example, if you try to add a track to a playlist 'test' the payload will be either:
u"Track already exists in playlist test" or u"Track added to playlist test"
another example: executing 'Load Playlist by Filter', where you choose 'select only the first 50 tracks' and name the filter 'beatles'
the result may be: MediaMonkey.playlist (u'beatles', '50', '220')
50 indicates the number of tracks loaded (as per your request) and 220 indicates that there are 220 tracks in the library that match your query.
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: MediaMonkey
I made another small change:
If the checkbox "Load only accessible tracks ..." is checked,
looks payload as I have previously written (for example (u'Night music ', '357', '361')).
If the checkbox "Load only accessible tracks ..." is not checked, looks payload as follows: (u'Night music ', '361').
It will therefore probably need help-text still some more work?
I glance at him, but if it fits into the dialog box, it will be good.
Pako
If the checkbox "Load only accessible tracks ..." is checked,
looks payload as I have previously written (for example (u'Night music ', '357', '361')).
If the checkbox "Load only accessible tracks ..." is not checked, looks payload as follows: (u'Night music ', '361').
It will therefore probably need help-text still some more work?
I glance at him, but if it fits into the dialog box, it will be good.
Pako
- Attachments
-
- __init__.py
- (140.13 KiB) Downloaded 298 times
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: MediaMonkey
Now I just realized it:
So I'll have to return to their original state.
(maybe excluding actions "Load playlist by Name").
Pako
You're right, it works that way.jitterjames wrote:another example: executing 'Load Playlist by Filter', where you choose 'select only the first 50 tracks' and name the filter 'beatles'
the result may be: MediaMonkey.playlist (u'beatles', '50', '220')
50 indicates the number of tracks loaded (as per your request) and 220 indicates that there are 220 tracks in the library that match your query.
So I'll have to return to their original state.
(maybe excluding actions "Load playlist by Name").
Pako
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: MediaMonkey
Can "load playlist by name" just return a simple "playlist loaded" or "playlist does not exist" and still work instantly?
Basically, it should just return the same thing as your "verbose" mode does.
For most of these actions I think the most important information is "success" or "failure". The number of songs found is a nice, but not very important.
***
let me know when you are finished with the code and then I will test, and then I will check the english.
Thanks Pako, you are my hero!
Basically, it should just return the same thing as your "verbose" mode does.
For most of these actions I think the most important information is "success" or "failure". The number of songs found is a nice, but not very important.
***
let me know when you are finished with the code and then I will test, and then I will check the english.
Thanks Pako, you are my hero!
Last edited by jitterjames on Mon Oct 19, 2009 9:15 pm, edited 1 time in total.
- jitterjames
- Experienced User
- Posts: 677
- Joined: Thu Aug 13, 2009 4:36 pm
- Location: Quebec, Canada
- Contact:
Re: MediaMonkey
One little trick I added manually to the plugin on my machine...
When loading a playlist by filter, I changed the code so that it would start playing after the first 10 songs were added to the now playing list, instead of waiting to the end. That way, it may take a long time to complete but it seems like it is responding quickly.
When loading a playlist by filter, I changed the code so that it would start playing after the first 10 songs were added to the now playing list, instead of waiting to the end. That way, it may take a long time to complete but it seems like it is responding quickly.
