monitoring current track without on_play

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: monitoring current track without on_play

Re: monitoring current track without on_play

by trixmoto » Fri Jan 23, 2009 4:29 am

Thanks, you seem to have covered all the bases (and a few more!) :)

Re: monitoring current track without on_play

by ZvezdanD » Thu Jan 22, 2009 3:13 pm

Jiri, I have one more request. I need OnMouseDown and OnMouseUp events, especially needed for the button controls. In my scripts I have two buttons, "Up" and "Down", for moving items in a list. I need to click for every item to traverse through list which is really boring, especially for longer movements. If I have OnMouseDown/OnMouseUp, I could click on specific button just once, like with the up/down (spin) control.

Well, when I think more about it, I need also OnKeyDown and OnKeyUp for same purpose. And please don't forget about OnSelect event for Edit/MultilineEdit controls.

Re: monitoring current track without on_play

by raybeau528 » Thu Jan 22, 2009 1:51 pm

I also want to say thanks for all these great events!!!

Ray

Re: monitoring current track without on_play

by Teknojnky » Thu Jan 22, 2009 11:02 am

Thanks for the events and feedback Jiri!

Re: monitoring current track without on_play

by jiri » Thu Jan 22, 2009 10:33 am

Well, it depends on how you look on it, internally it works so that the items are first destroyed and so they don't lose select status. However, you can use OnChangedSelection event which is fired anytime anything changes in MM UI (focused control, selected items, etc.) and this actually is a superset of OnTrackListSelectionChanged event.

Jiri

Re: monitoring current track without on_play

by ZvezdanD » Thu Jan 22, 2009 7:56 am

Jiri, just one more question about OnTrackListSelectionChanged. I just tried it and I have following scenario:
1. click on some node which has tracks, tracklist is populated with those tracks, first track is selected by MM automatically and mentioned event fires.
2. click on some another node which also has tracks -> everything is same as in previous case.
3. click on some node which don't contain any track -> tracklist is empty and mentioned event doesn't fires.

I think it should fire in the third case too, since selection is changed as it is in the second case.

Re: monitoring current track without on_play

by ZvezdanD » Thu Jan 22, 2009 7:43 am

jiri wrote:OnTrackListSelectionChanged is fired when a track is selected or unselected in the tracklist.
Good to know that. I like to have such event, even if I don't need it in this moment.

You are right, it seems that OnTrackListFilled could be used in DaledeSilva's case.

Re: monitoring current track without on_play

by jiri » Thu Jan 22, 2009 7:34 am

OnTrackListSelectionChanged is fired when a track is selected or unselected in the tracklist. Note that this and all other new events are already documented in Wiki.

It seems that you are right, it doesn't really comply the original request. That said, as I test the current events, either these or for example OnTrackListFilled, it seems that they cover all necessities. In case there is some scenario missed, I'm open for adding some more events.

As for "Current Selection" term in UI - yes, it can cause some confusion, but as discussed in the thread, it's hard to find a good replacement. As for programmers/scripters, I suppose that terms like selection and focus and quite clear and well defined.

Jiri

Re: monitoring current track without on_play

by ZvezdanD » Thu Jan 22, 2009 6:10 am

jiri wrote:A6. New events OnTrackListSelectionChanged and OnNowPlayingSelectionChanged.
Jiri, all of this added events are self explanatory, but I am not sure about OnTrackListSelectionChanged. Could you tell me if it fires when a selected (highlighted as someone is calling it) state are changed or whenever is some track added/removed?

If it means only on selected state, then this is not same as DaledeSilva's requests. Here is his post:
currently, previously OnChangedSelection has let a script know whenever the tracklist has changed because it usually only changes when a new node is navigated to.

Now, however, because a user can set search to "Current Selection" the tracklist can change without changing nodes and OnChangedSelection doesn't report (logically).

I would like a specific OnChange event for the tracklist window.
I think that you introduced too much confusion with a term "Current Selection" as it is posted by chrisjj in http://www.mediamonkey.com/forum/viewto ... =4&t=35966. To me a term "Selection" is about selected (highlighted) state of tracks, not their visible state.

Re: monitoring current track without on_play

by ZvezdanD » Thu Jan 22, 2009 5:39 am

Jiri, thank you so much!

Re: monitoring current track without on_play

by jiri » Thu Jan 22, 2009 5:11 am

Based on the list posted by ZvezdanD here: http://www.mediamonkey.com/forum/viewto ... 31#p186831 there were many new events added in MM 3.1.0.1218. They are:

A2. New events OnDblClick, OnEnter, OnExit.
A4. New events OnShuffleClicked, OnRepeatClicked and OnNowPlayingModified.
A6. New events OnTrackListSelectionChanged and OnNowPlayingSelectionChanged.
A9. New event OnTrackEnd.
B1. New OnIdle event.
B5. New events OnOptionsChange and OnFilterChange.
B7. New events OnTrackListFilling and OnTrackListFilled.

Jiri

Re: monitoring current track without on_play

by trixmoto » Wed Jan 21, 2009 6:21 am

During the beta cycle the developers are primarily concerned with getting the application stable, once this is done they then focus more on the scripting capabilities and other new features. It has been this way since I started scripting for MM back in 2005. You need a stable base before you can start adding to it, it's as simple as that.

Re: monitoring current track without on_play

by Peke » Tue Jan 20, 2009 8:47 pm

To keep things on Topic

@big_berny
Can you explain where "OnSkip" event can't be used with conjunction with example in my post here I'm not sure that I understand what player action would not be available (Simply what user would do in MM UI to trigger that action).

@All
Beside my examples I would like to conclude Missing Player Events so that like Jiri wrote "I plan to add at least something new yet to MM 3.1." and begin to add them in MM correctly without need for poor workarounds or with "scripting bugs or missing features". To walk first step needs to be made.

Re: monitoring current track without on_play

by Peke » Tue Jan 20, 2009 8:31 pm

First off, I didn't want to start any fights, but wanted to include all of you Script developers more active in decisions of improvements due obvious reasons that things need to be improved and that devs recognize it.

Re last.fm plugin: It is not added just for last.fm, but that plugin opened this discussion and as I've added new feature in Plugin structure I wanted to expand this to scripting without prioritizing anything. Plugin was an example how things work and how priority gets changed (Like MoDementia said something needed review for some time) and get done. But I would rather say "Bug" than "official" MM requirement triggered this discussion as dev team noting something has waited too long to get reviewed with willingness of dev team to improve things.

re Mantis examples: like Zvezdan if something is missing and I need it I try to make workaround and those Mantis Bugs I posted are to see that I understand Zvezdan frustration and know what that means (let me refer to something I already said while back "I started to use MediaMonkey as all Broadcasting Automatization lacked database management flexible enough to support specific customization thrum Scripting, Plugins, Addons") things needs to mature. Taking for example large companies like M$ where Win 95 needed to mature in Win98 and where Win ME needed to mature and evolve into WinXP and finally Vista which will (hopefully evolve into) Windows 7 (with Outlining TouchScreen Tech which I already used on touch screen notebook with dx386 40Mhz CPU back in '95. That feature took 13 years to get M$ make partially as MediaCenter feature). Personally(highlighting) as 24/7 MM user I more like to see MM stable with available feature than Bloated with tons of rushed/buggy features.

Re iPod Playcount (I would rather call it Portable Device Playcount) sync: Users requests were driving part in adding that feature to list, so instead of making one feature now devs will add multiple features for various parts of MM including last.fm plugin in a single dev frame. BTW it is in Summary as it should fill last.fm cached tracks with Playcounters on Device sync (on devices that support Device -> PC Playcounter sync) and then submit joined cache to last.fm

Re sleep example: It was just example what will happen if 30 event scripts are executed by 1 sec each and it is not matter that we can slow down MM but rather example what needs to be evaded and solved so that it should not happened or at least make sure that it doesn't interfere with MM functionality that much.

Re: monitoring current track without on_play

by Big_Berny » Tue Jan 20, 2009 7:48 am

IMHO OnSkip can't be really replaced by other events without any workarounds. But since I already have a workaround for that in my script I don't really need that feature - specially because this way I can define by myself what's exactly a Skip and what not.

Top