Magic Nodes 1.3b (IS OUTDATED SEE NOTE IN FIRST POST)

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

ZvezdanD
Posts: 3111
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD » Thu Aug 17, 2006 9:58 pm

Bex wrote:Its perfectly OK just to copy/paste the full .vbs into this thread!

Thanks!
/Bex
Sorry Bex. I tried several times to post the full script, but everytime my messages was truncated, so I deleted them. I think the script is very long for this server (73 kB). Do you know any solution for this? Maybe I could share this script on some free public server?

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Fri Aug 18, 2006 2:57 am

If you email the script to me I'll host it on my site and post a link here.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex » Fri Aug 18, 2006 5:59 am

Good idea Trixi!

/Bex
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Fri Aug 18, 2006 6:01 am

That's why I've stopped posting my code on this forum - most of my scripts are too long to post in one go and I'm too lazy to split it up into multiple! :)
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Fri Aug 18, 2006 9:40 am

Here is the unofficial code produced by ZvezdanD for those who are interested: http://trixmoto.net/files/MagicNodes.1.3c.vbs
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

ZvezdanD
Posts: 3111
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD » Fri Aug 18, 2006 9:55 am

trixmoto wrote:Here is the unofficial code produced by ZvezdanD for those who are interested: http://trixmoto.net/files/MagicNodes.1.3c.vbs
I should say that it is based on last official release 1.3b, and I renamed it to 1.3c.

There is only one small note. If you compare my file with original, you'll find too many modifications with space character inside of the code. I didn't write such modifications by myself, but Visual Basic editor did that formatting when opening file. This is just aesthetical difference, not functional.

Regards.

Guest

Post by Guest » Fri Aug 18, 2006 11:40 pm

Bex wrote:Hi Pablo!
Looking forward to your return.
Please be quick, we miss you! :D

/Bex
Actually I'm moving to Finland next week so we'll be sort of neighbors :wink: . Once I settle in I should have lots more time available, especially during the long winter 8) .

Altec
Posts: 5
Joined: Thu Aug 17, 2006 7:36 am

MagicNodes.1.3c.vbs

Post by Altec » Sat Aug 19, 2006 2:58 am

When I tried to use MagicNodes.1.3c.vbs i got lots of strange error messages as:

"The object doesn't support the method: 'SDB.IniFile.BoolValue'
File: "C:\Program\MediaMonkey\Scripts\Auto\MagicNodes.1.3.vbs", Line 1155, Column: 8"

And the it doesnt work anymore.

Have I done anything wrong?

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto » Sat Aug 19, 2006 4:15 am

What version of MM are you using? Try the latest release maybe...
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

ZvezdanD
Posts: 3111
Joined: Thu Jun 08, 2006 7:40 pm

Re: MagicNodes.1.3c.vbs

Post by ZvezdanD » Sat Aug 19, 2006 4:38 am

Altec wrote:"The object doesn't support the method: 'SDB.IniFile.BoolValue'

Have I done anything wrong?
Well, I really don't know. It works on several computers. This method can be found inside of the MediaMonkeyScripting.chm, so I suppose it is standard part of the MM scripting.

What version of MM you are using? I think you should need 2.5.2 or above. Did you tried some another MM script which use this method like SongPreviewer by Steegy?

Maybe you could try to replace mentioned 1155 line:

Code: Select all

        If SDB.IniFile.BoolValue("Options", "IgnoreTHEs") Then
with:

Code: Select all

        If SDB.IniFile.StringValue("Options", "IgnoreTHEs") <> "0" Then

danflan
Posts: 7
Joined: Wed Jul 05, 2006 7:05 am
Contact:

Filter by location

Post by danflan » Thu Sep 07, 2006 7:27 am

I have been trying to set up a node that filters by location. For example, I want a node for Artists\Albums that includes everything from G:\rips and G:\eMusic. Any suggestions?

moehesse
Posts: 15
Joined: Sat Dec 31, 2005 5:15 am

Post by moehesse » Sat Sep 09, 2006 5:51 am

Hello!

Perhaps it is the same question: How can I define a filter, so that are displayed only the files on a particular hard disk? With "SongPath"? But how?

Thanks for your help.

Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex » Sat Sep 09, 2006 11:54 am

This is a bit complicated but here we go:

To get all files from a specific drive there are two solutions which both involves the use of SQL filter.

Alt 1 (a bit slow on big collections):
Find all songs on drive G

Code: Select all

SQL Filter: songs.idmedia in (Select idmedia from medias where driveletter=asc('G')-65)
e.g.
G Drive|SQL Filter: songs.idmedia in (Select idmedia from medias where driveletter=asc('G')-65)\<Artists>
Alt 2 (a bit faster):
Find out what IDMedia the G drive has in Access (Table medias). On my system it's 44.

Code: Select all

SQL filter: IDMedia=44
e.g.
G Drive|SQL Filter: IDMedia=44\<Artists>
-------------------------------------------------------------------------------------

To get all songs from a specific folder which only exists one time and only on one drive:
e.g. G:\New Stuff

Code: Select all

SQL filter: songpath like '%New stuff%'
Note!
If you must include "\" in the code the node will not work (seems to be a bug in MN):
e.g. G:\New Stuff\CD

Code: Select all

Doesnt work!
SQL filter: songpath like '%New stuff\CD%'
Workaround, replace "\" with " '& chr(92) &' ", like this:

Code: Select all

Works!
SQL filter: songpath like '%New stuff'& chr(92) &'CD%'

To get all songs from a specific folder on a specific drive:
e.g. You only want G:\New stuff (but you also have C:\New stuff)
Alt 1 (a bit slow):

Code: Select all

SQL filter: songs.id in (select id from songs, medias where songs.idmedia=medias.idmedia and driveletter=asc('G')-65 and songpath like '%New stuff%')
Alt 2 (faster) if you now what idmedia G has:

Code: Select all

SQL filter: songs.idmedia=44 and songpath like '%New stuff%'
------------------------------------------------------------------------------

If you dont understand what I'm trying to explain (I don't blame you) just ask again.

To find out what what idmedia a specific drive has in MM open up Mediamonkey.mdb in Access, paste and run this code into the SQL window of a query:

Code: Select all

SELECT medias.IDMedia
FROM medias medias
WHERE (medias.DriveLetter=(asc(ucase([Enter DriveLetter]))-65))
Last edited by Bex on Sun Sep 02, 2007 10:13 am, edited 1 time in total.
Advanced Duplicate Find & Fix Find More From Same - Custom Search. | Transfer PlayStat & Copy-Paste Tags/AlbumArt between any tracks.
Tagging Inconsistencies Do you think you have your tags in order? Think again...
Play History & Stats Node Like having your Last-FM account stored locally, but more advanced.
Case & Leading Zero Fixer Works on filenames too!

All My Scripts

moehesse
Posts: 15
Joined: Sat Dec 31, 2005 5:15 am

Post by moehesse » Sat Sep 09, 2006 12:18 pm

It works with "IDMedia". Many thanks for your great effort !!!!!!!

danflan
Posts: 7
Joined: Wed Jul 05, 2006 7:05 am
Contact:

SQL filter problem

Post by danflan » Sun Sep 10, 2006 10:28 am

So this is what my node looks like but I get SQL errors. When I run the query directly in the access dB it's fine. Any ideas

Code: Select all

Complete albums2|icon:bottom level|SQL filter: songpath Like '%:&chr(92)&Music Library&chr(92)&albums*%' Or Like '%:&chr(92)&Music library&chr(92)&emusic*%'\<artist|sort order:asc>\<album>
I also tried stripping it down to just this. No SQL errors, but freezes Media Monkey.

Code: Select all

Full Albums|icon:bottom level|SQL filter:Songs.SongPath LIKE '%emusic%' OR '%albums%'\<artist>\<album>
Last edited by danflan on Sun Sep 10, 2006 3:58 pm, edited 1 time in total.

Locked