Page 25 of 46

Posted: Thu Aug 17, 2006 9:58 pm
by ZvezdanD
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?

Posted: Fri Aug 18, 2006 2:57 am
by trixmoto
If you email the script to me I'll host it on my site and post a link here.

Posted: Fri Aug 18, 2006 5:59 am
by Bex
Good idea Trixi!

/Bex

Posted: Fri Aug 18, 2006 6:01 am
by trixmoto
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! :)

Posted: Fri Aug 18, 2006 9:40 am
by trixmoto
Here is the unofficial code produced by ZvezdanD for those who are interested: http://trixmoto.net/files/MagicNodes.1.3c.vbs

Posted: Fri Aug 18, 2006 9:55 am
by ZvezdanD
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.

Posted: Fri Aug 18, 2006 11:40 pm
by Guest
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) .

MagicNodes.1.3c.vbs

Posted: Sat Aug 19, 2006 2:58 am
by Altec
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?

Posted: Sat Aug 19, 2006 4:15 am
by trixmoto
What version of MM are you using? Try the latest release maybe...

Re: MagicNodes.1.3c.vbs

Posted: Sat Aug 19, 2006 4:38 am
by ZvezdanD
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

Filter by location

Posted: Thu Sep 07, 2006 7:27 am
by danflan
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?

Posted: Sat Sep 09, 2006 5:51 am
by moehesse
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.

Posted: Sat Sep 09, 2006 11:54 am
by Bex
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))

Posted: Sat Sep 09, 2006 12:18 pm
by moehesse
It works with "IDMedia". Many thanks for your great effort !!!!!!!

SQL filter problem

Posted: Sun Sep 10, 2006 10:28 am
by danflan
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>