change (add) the tray MM icon options?

Post a reply


In an effort to prevent automatic submissions, we require that you complete the following challenge.
Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

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

Topic review
   

Expand view Topic review: change (add) the tray MM icon options?

Re: change (add) the tray MM icon options?

by Foxgirl » Tue Aug 12, 2008 10:37 pm

I was wondering if this script is compatible with MM version 3? If so, how would I go about installing it? Thanks for any help!

by steve0 » Mon Jun 02, 2008 3:10 am

It depends on what you want!

by streawkceur » Sat Feb 03, 2007 2:07 pm

Hi, I've created an extended version of this Script.
I started a new topic as a better title would make it easier to find the script:

http://www.mediamonkey.com/forum/viewtopic.php?t=15047

by Steegy » Sat May 27, 2006 8:26 am

The script has been updated:
- Added use of new LocalizeGen method for translation of moods in local language
- Improved saving of mood changes (now uses the settings (save to file or not) that are set in the options dialog)

The script requires MM 2.5.3 or newer.

by DiddeLeeDoo » Tue Apr 25, 2006 6:12 pm

Sounds a bit like the SDB.LocalizeGen will look up available words in the DB.mo translation table, and translate if match found.

SDB.Localize maybe for default.mo only, and I see the translations of moods are in the DB.mo. Cool stuff!

I have a long way to go, and I'll try to avoid being annoying, even though I cannot help it sometimes :roll:

by jiri » Tue Apr 25, 2006 1:34 pm

Just to help you in faster code update, it will be:

Code: Select all

LocalisedMood = SDB.LocalizeGen( "DB", Iter.StringByIndex(0))
Jiri

by Steegy » Tue Apr 25, 2006 1:31 pm

Thanks.

Once that version comes out, I'll change the line

Code: Select all

LocalisedMood = SDB.Localize(Iter.StringByIndex(0)) 
to

Code: Select all

LocalisedMood = SDB.LocalizeGen( "DB", Iter.StringByIndex(0))
(updated according to jiri's post)

In the updated code above, I fixed the "no currentsong error" problem, and got rid of the dictionary.

@DiddeLeeDoo, "for your information":
- I want the mood tray menu to look exactly the same as the mood toolbar menu, so this new LocalizeGen seems the only solution to the problem. I want to include all available moods.
- SDB.Localize("TextToLocalize") returns the translated text of TextToLocalize. If there is no translation available, it automaticly returns the specified text TextToLocalize.

Thanks for the help.

by jiri » Tue Apr 25, 2006 10:31 am

As for Localize method - it really works for the main language file only. In MM 2.5.3 LocalizeGen() will be added and it will be possible to specify the language file to use (e.g. that 'DB').

Jiri

by DiddeLeeDoo » Mon Apr 24, 2006 5:16 pm

Thank you, sitting here to try to catch up with you here, as I'd like to help if I can.

Potential solution:

Code: Select all

SELECT TextData FROM Lists WHERE ID < 39  AND IDListType=2 ORDER BY SortOrder
to keep to the standard translated moods. But that may be a silly solution.

Another thing, I believe there should be a Localize in the loop in order to look-up the translated value for mood 'Upbeat' for example.

Then something about, if translated value do not exist, use value in Lists.

This bit seems to be missing an object if song already have a different value.
If SDB.Player.CurrentSong.Mood <> "" Then
SDB.Objects("TrayMoods_" & SDB.Player.CurrentSong.Mood).Checked = True
End If

I've been sitting here trying to catch up with you folks on this issue, but I see this is for experts really. Sorry to stuff up your thread.

by Steegy » Mon Apr 24, 2006 12:20 pm

Mood, Tempo, ... *are* stored in the DB.

The list table gives, as you said, a list of all possible entries (and each entry has an ID)
In the AddSongInfoInt table, the actual references to the List table are stored for each song in the database (that has a mood, tempo, ... defined). The IntData column is linked to List.ID.

So to find the a certain characteristic of a song, you look in the Songs table to get it's ID. With that ID, you search the matching IDSong in the AddSongInfoInt table. You will then possibly see different entries for the same song, with different IntData fields. Each IntData field represents a certain characteristic that is linked to the ID of the List table.

E.g., if you want to find all songs matching a certain characteristic (from the PlayHotkeys_v1.0.vbs/Utility_SQL.vbs script)

Code: Select all

' Returns a SDBSongIterator object (EOF/Item/Next) for all songs with the specified InfoIntValue
Public Function SQLGetSongsInfoInt(InfoIntValue)

   Set SQLGetSongsInfoInt = SDB.Database.QuerySongs("AND Songs.ID IN (SELECT Songs.ID FROM ((Lists INNER JOIN AddSongInfoInt ON Lists.ID = AddSongInfoInt.IntData) INNER JOIN Songs ON AddSongInfoInt.IDSong = Songs.ID) INNER JOIN Artists ON Songs.IdArtist = Artists.ID WHERE Lists.TextData = '" & InfoIntValue & "')")

End Function
maybe code can be made "easier" like "SELECT blablabla FROM foo, bar, baz ...", but the above way seems to be the preferred sql way.

See the "scripting resources" (link in my signature) to find a text file with the database locations for (almost) all available track properties.

Cheers
Steegy

by DiddeLeeDoo » Mon Apr 24, 2006 9:09 am

I possibly will make a fool out of myself here :)

I just found that MM database do not feature any Mood/Tempo storage.

I DID MAKE A FOOL OF MYSELF! :oops:
Message edited to save space....

by onkel_enno » Mon Apr 24, 2006 5:01 am

@Jiri

Is it anyhow possible to localize the Moods, Occasions, Tempos (in DB.mo).
SDB.Localize only uses the default.mo :cry:

by Steegy » Sat Apr 15, 2006 7:01 am

Well, I have posted about this problem in the debug forum, but I've got no responce yet. Maybe bumping that thread will make that someone responds...

by keiju » Sat Apr 15, 2006 5:40 am

Big THANKS guys... im sorry for not posting before but i just returned from a time away from the computer.

Then there´s no way to get the Mood Field written? I Have all custom fields in use already :(

by Steegy » Tue Apr 04, 2006 5:18 am

Is the OnClick event raised even if the parent menu is not clicked, but just hovered (mouse-over)?

BTW: I was just trying out your script, when I saw this other post (multi-artist thread).

EDIT: Never mind the above question... aparently it works.
EDIT2: The above code has been changed so it now checks the current mood in the submenu, and it loads the moods list when the menu is opened, so it's always actual.
EDIT3: An improvement would be to drop the dictionary usage, but that's for a next version.

Top