Easy/fast nested nodes & FilesToEdit hiding (09Nov08)

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

emalvick
Posts: 265
Joined: Tue May 15, 2007 9:44 am

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by emalvick » Fri Jul 11, 2008 10:46 am

In addition to the query I made about putting the top XX in a node... I have come up with a way to create nodes that behave as a trimmed node might in MagicNodes. The caveat is that it is not pretty in that you end up having to manually create each node you want... I have posted an example below that I have used for AlbumArtists.

The node will be organized like this:

Album Artists
--A
--B
--C

With each artist indexed:

Here is a snippet of the ini:

Code: Select all

[Album Artists]
icon=Artist
sortLike=Artist
hideIfEmpty=0
easyCriteria=AllTracks

[A]
icon=Artist
sortLike=Artist
hideIfEmpty=1
level=AlbumArtist
level=Album
trackCriteria="AlbumArtist LIKE 'A%'"
parent="Album Artists"
[B]
icon=Artist
sortLike=Artist
hideIfEmpty=1
level=AlbumArtist
level=Album
trackCriteria="AlbumArtist LIKE 'B%'"
parent="Album Artists"

...etc

You just have to repeat the subnode for each letter and change the trackCriteria to reflect that letter. It gets a bit tedious but use of the Find and Replace function of a good text editor helps. The other item that needs to be kept in mind is that you need to make sure you pick up all possible lead characters (e.g. numbers, symbols, etc).

I haven't perfected that aspect. Right now I have a node setup that is a catch-all for all non-letter nodes that has a track criteria such as this:

Code: Select all

trackCritera="(AlbumArtist NOT LIKE 'A%') AND (AlbumArtist NOT LIKE 'B%') AND ...." 


As you can see that line would get a little unwieldly, but I know very little of SQL to see how else to do it. Perhaps there is a code I can use to generically pick up a letter, number, or other symbol (e.g. punctuation) as I have some items that lead with a ( or a " or something else (when indexing songs and albums).

I also wanted to note that in the parent node, "Album Artists", I actually have it picking up all tracks to mimic behavior I like to see. If you don't want to see all the tracks, you can eliminate that criteria. The trackCriteria under each letter/number index will refine the results to that particular letter as you set it up.

Last item is that the ini file will start to get very big if you have a lot of items indexed. I index artists, albums, titles, so it becomes useful to use comment lines to "graphically" separate nodes for your own sanity with the ini file. I hadn't even thought of it, but it might be useful to utilize secondary ini files to use global find and replaces for a batch of nodes and then copy them into the primary ini file.

Have fun.

Benn
Posts: 300
Joined: Sat Jul 12, 2008 11:59 am
Location: Cornwall, United Kingdom

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by Benn » Tue Aug 12, 2008 8:05 am

Hi, nice script, I love the infinite possibilities... :D

Couple of questions though, firstly, what line would I need for a "tracks added in the last month" (or 28 days or something..) node?

And second, having noticed Nyn's Top Albums played node,

Code: Select all

    [Most Played Artists (10)]
    icon=Artist
    sortLike=Artist
    EasyCaption=BaseCaptionAndTrackCount
    level=AlbumArtist
    levelEasyCaption=BaseCaption
    levelEasyCaption=MaximumPlayCount
    levelEasySort=MostPlayed 
    trackCriteria="((Genre = 'Slow Jams' OR Genre = 'Soundtracks' OR Genre = 'TV Tributes' OR Genre = 'HipHop' OR Genre = 'Wedding' OR Genre = 'Pop') AND ((AlbumArtist || '~' || PlayCounter) IN (SELECT AlbumArtist || '~' || Max(PlayCounter) FROM Songs WHERE (PlayCounter > 9) GROUP BY AlbumArtist)))"
    parent="Play Info"
could I take each genre under trackCriteria as a separate node, so I get the top Played artists for "rock" and then "metal" as separate nodes? eg:
+Most Played Artists
+Rock
+Metal
etc
Thank you for any help.

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by nynaevelan » Tue Aug 12, 2008 10:57 am

Benn wrote:could I take each genre under trackCriteria as a separate node, so I get the top Played artists for "rock" and then "metal" as separate nodes? eg:
+Most Played Artists
+Rock
+Metal
etc
Just change the level= to level=genre and it will list each genre separately.

Benn wrote:Couple of questions though, firstly, what line would I need for a "tracks added in the last month" (or 28 days or something..) node?
You can use the following node, just change the days (<=28) and parent to meet your needs.

Code: Select all

[Added in Last 28 Days] 
icon=Album
sortLike=Album
hideIfEmpty=1 
refresh=1 
level=DateAdded
levelEasyCaption=BaseCaptionAndNodeCount
LevelEasySort=MostRecentlyAdded
level=Genre
levelCriteria="(([vb]Fix(CDbl(Now))[vb] - CAST(DateAdded AS Integer)) <= 28)"
parent="Additions"

Hope this helps,


Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

Benn
Posts: 300
Joined: Sat Jul 12, 2008 11:59 am
Location: Cornwall, United Kingdom

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by Benn » Tue Aug 12, 2008 12:20 pm

Perfect, thanks Nyn. :)

Benn
Posts: 300
Joined: Sat Jul 12, 2008 11:59 am
Location: Cornwall, United Kingdom

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by Benn » Fri Sep 05, 2008 11:07 am

Hey guys, was wondering how I would sort a node with PlayCount (highest at top). Tried many combinations of Played# etc and can't find it. Thank you.

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by nynaevelan » Fri Sep 05, 2008 10:27 pm

Benn wrote:Hey guys, was wondering how I would sort a node with PlayCount (highest at top). Tried many combinations of Played# etc and can't find it. Thank you.
You can use one of the easy sort options:

Code: Select all

levelEasySort=MostPlayed  
Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

Benn
Posts: 300
Joined: Sat Jul 12, 2008 11:59 am
Location: Cornwall, United Kingdom

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by Benn » Sat Sep 06, 2008 4:52 am

Thanks Nyn, but I kinda meant just a simple "SortLike"; not a leveller.

Is there a list somewhere of Easysorts/Easycriterias?

spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by spacefish » Sat Sep 06, 2008 5:08 am

There is a MyCustomNodes_ReadMe.html in your Scripts\Auto folder.
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes

Benn
Posts: 300
Joined: Sat Jul 12, 2008 11:59 am
Location: Cornwall, United Kingdom

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by Benn » Sat Sep 06, 2008 6:28 am

Thank you Spacefish. Turns out what I want isnt supported at the moment. Still, I'll be playing with this script for months :D

nosedog
Posts: 19
Joined: Sat Sep 13, 2008 3:26 am

Shortcut keys; using MediaMonkey filters

Post by nosedog » Sat Oct 11, 2008 6:37 am

Hi,

Really enjoying this script. Just a few questions and comments; sorry if they've been addressed/discussed before.

1. How do you specify a shortcut in the refresh_ManuallyWithUpdatedINIFile_ShortcutForEditMenuItem item?

2. I'm not having any luck with multiple genres. I've set one track's genre to "Chamber Music;General Classical" but my Classical node, which filters on "General Classical", is not picking it up. The node is otherwise working. Can anyone suggest anything or share their experiences with multi-value fields?

3. I'd love to be able to use MediaMonkey's filter feature in some trackCriteria specifications. Is that possible? (Or planned? :wink: ) The reason is: filters can be complex, and I don't want to have to specify them all over again, especially if I want to use them in multiple places.

4. Hierarchical criteria would be lovely. Here's an example (illustrative only):

Code: Select all

[Classical]
parent="Library"
trackCriteria="Genre IN ('Classical', 'Baroque', 'Chamber', 'Contemporary')"   ; etc. etc.

[By Composer]
parent="Classical"
level=Composer

[Recently Added]
parent="Classical"
level=AlbumArtist_Album
easyCriteria=AddedInLast7Days
In this snippet, [By Composer] and [Recently Added] inherit the trackCriteria specified in [Classical], because it is their parent. The [Recently Added] node adds an extra criteria, giving me a nice easy way to see recently added classical music.

If this feature were implemented, I would only have to specify the Classical criteria in one place.

This would be fantastic for me, because I have some complicated track criteria that, at present, need to be copied in several places.

Anyway, I'll leave it at that. Thanks for such a cool script!
My favourite MM scripts: RegExpReplace and ExtractFields for editing tags; MagicNodes and MyCustomNodes for creating new views of my music; AdvancedDuplicateFindFixMM3 when needed; Last for recently added tracks; StopAfterCurrent for a planned pause.

teapot
Posts: 84
Joined: Fri Jan 18, 2008 9:02 am
Location: WA, USA

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by teapot » Sat Oct 18, 2008 6:18 pm

This a great add-on script for MM ! Thank you for taking the time to develop it and especially for sharing it.

How would I modify the .ini file to limit the number of subnodes listed for a node with level=DateAdded to only the last 10 dates or all newer than a specific date ?

How about a node with level=Bitrate limited to only subnodes less than 192 ?
MM Gold:Lifetime version 4.1.25.1895
Windows 7
Denon AVR-X2600H
LG TV OLED65C9PUA
Wired LAN connections

linn
Posts: 170
Joined: Wed Sep 06, 2006 3:59 am

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by linn » Fri Oct 24, 2008 4:00 pm

When i add : " expandAtStartup=1 " to this code i get a node with a date ,like before , but after the date i get : " [<nodecount+] "
Thanks ,lin

Code: Select all

;------------------------------------------------------------------------
[Recent Rips]
;------------------------------------------------------------------------
icon=Year
expandAtStartup=1
sortLike=Artist
level=DateAdded
levelSortOrder=descending
levelEasyCaption=BaseCaptionAndNodeCount
level=AlbumArtist_Album
levelEasyCaption=BaseCaption
easyCriteria=AddedWithinTheLast7Days
parent="Album Views"

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by nynaevelan » Sun Oct 26, 2008 2:29 pm

linn wrote:When i add : " expandAtStartup=1 " to this code i get a node with a date ,like before , but after the date i get : " [<nodecount+] "
Thanks ,lin

Code: Select all

;------------------------------------------------------------------------
[Recent Rips]
;------------------------------------------------------------------------
icon=Year
expandAtStartup=1
sortLike=Artist
level=DateAdded
levelSortOrder=descending
levelEasyCaption=BaseCaptionAndNodeCount
level=AlbumArtist_Album
levelEasyCaption=BaseCaption
easyCriteria=AddedWithinTheLast7Days
parent="Album Views"
I don't think it is the expandatstartup that is throwing off your node. You either need to remove levelEasyCaption=BaseCaptionAndNodeCount or change it to levelEasyCaption=BaseCaptionAndTrackCount

Just a guess though... :wink:

Nyn
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files

linn
Posts: 170
Joined: Wed Sep 06, 2006 3:59 am

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by linn » Mon Oct 27, 2008 6:31 am

Your guess is right ,problem soved ;thanks!
Lin

teapot
Posts: 84
Joined: Fri Jan 18, 2008 9:02 am
Location: WA, USA

Re: Easy/fast nested nodes & FilesToEdit hiding (25Apr08)

Post by teapot » Fri Oct 31, 2008 8:03 am

Is there any way to set a unique column sort order on the top node of each of my custom nodes ? Currently, changing the column sort order on one custom node changes it for all custom nodes.

Thanks for the great script !
MM Gold:Lifetime version 4.1.25.1895
Windows 7
Denon AVR-X2600H
LG TV OLED65C9PUA
Wired LAN connections

Post Reply