Page 13 of 170

Posted: Tue Dec 18, 2007 6:38 am
by ZvezdanD
mattisse wrote:It would be great, if the text field for the Magic Node code was longer or if it was a text area instead of a single-line field. That would make it a lot easier to edit the code.
Well, you could drag a window side border and make a text field wider. Anyway, I could promise that the next major upgrade will have much better user interface (it is currently in the development).

Thanks for your kind words. :)

Posted: Thu Dec 20, 2007 4:41 am
by ZvezdanD
There is a new revision of the script (1.5.0.2) in the first post with removed some bugs, thanks to doubleij.

Posted: Thu Dec 20, 2007 6:42 am
by doubleij
Hey, I tried the 1.5.0.2 and old bugs resolved! I did find a new bug though :D

The "child of" qualifier does not work with the new MM3 composer node. In other words, if I want to create a magic node that is the child of composer, I cannot.

Hopefully this one will be simple to fix?! :wink:

Posted: Thu Dec 20, 2007 7:27 am
by MM3 monkey
Thank you, ZvezdanD.

Posted: Thu Dec 20, 2007 11:26 am
by ZvezdanD
doubleij wrote:I did find a new bug though :D

The "child of" qualifier does not work with the new MM3 composer node.
Sorry, this is not a bug. MM developers are not updated their API, ISDBTree object particularly. When this happens, I'll update the script.

On the other side, there are some new node positions for Child of qualifier which are introduced with 1.5 version and I didn't mentioned them in What is New: FilesToEdit, MyComputer, NowPlaying, Previews, Radio, VirtualCD and Web. I don't know how much this is useful, but I added them anyway.

Posted: Thu Dec 20, 2007 11:40 am
by doubleij
Sorry ZvezdanD, my mistake. Thanks for your hard work on MagicNodes. I'll look forward to seeing updates in future. For now, it works great...

Error

Posted: Fri Dec 21, 2007 7:28 am
by Inspired
Hi there,
Just updated to V1.5.0.2 and it comes up with the an invalid character error when I start MM3.

Line 1516, Col 16.

Regards,

Jonathan

Further info

Posted: Fri Dec 21, 2007 7:33 am
by Inspired
Further to the ERROR post I just made...
I see there is nothing at that location.
Just white space. Odd...

Here's the code in that vacinity...

Code: Select all

Sub CreateExternalNodes()
	Dim i, currentMask, parentNode
        
	For i = 1 To MasksInIniFile
    	currentMask = getIniMask(i)
        If Len(currentMask) > 0 Then
        	parentNode = getQualifierValue(currentMask, "child of", "MAGIC", _
                    True)
            If parentNode <> "MAGIC" Then
>>            *	   CreateCustomNode Eval("SDB.MainTree.Node_" & parentNode), 1, _
                        currentMask, i
            End If
        Else
            Exit For
        End If
    Next
End Sub
I put a >> at start of faulting line and a * about where column 16 is position is.

Any ideas why this is occurring?

Jonathan

Posted: Fri Dec 21, 2007 7:52 am
by Big_Berny
Spaces aren't counted as columns - so the problem is afterwards. Anyway I don't know where the problem could be as I don't know how it exactly works.

Posted: Fri Dec 21, 2007 11:16 am
by ZvezdanD
Actually, spaces are counted as columns, but Inspired was not counted them correctly - there are exactly 16 blank characters in the front of CreateCustomNode statement. It is better for me if you send screenshot of the error message than the source code of the script itself. Even better, you could send me your MediaMonkey.INI file or its [CustomNodeMasks] section at last. I suppose you have some incorrect line there (the one with Child of quailifier).

Posted: Fri Dec 21, 2007 4:17 pm
by fizzjob
I'm having a hard time wrapping my head around the way the database handles dates...I'd like to make a MagicNode that lists just files modified today (or within a given range of days). Obviously, this would need to check the Songs.FileModified field, but I'm not sure how to decode "39437.5853764699" into a date...any ideas?

Posted: Fri Dec 21, 2007 5:23 pm
by ZvezdanD

Code: Select all

Modified today|Filter:Days Since Modified = 0\<Title>

Code: Select all

Modified last week|Filter:Days Since Modified Between 0 And 6\<Title>

Code: Select all

Modified on 2007-12-21|Filter:Date Modified = '2007-12-21'\<Title>
http://www.sqlite.org/cvstrac/wiki?p=Da ... eFunctions

Posted: Fri Dec 21, 2007 5:56 pm
by fizzjob
Thanks! That wound up being easier than I had imagined - I had found that link you posted already, but was having some sort of mental block.

Those worked perfectly, and will help keep my music at home and work in sync.

Again Field occasion

Posted: Sat Dec 22, 2007 10:37 am
by Poison Joe
Hi Monkey's,

need help with the field "Occasion". What's wrong with this MagicNode:

Code: Select all

My Favs (just favorites)|shortcut:Ctrl+8|filter:rating>=4 AND occasion != 'Party' AND Sampler != 'yes'|icon:top level\<Album Artist>\<Album|Sort by:max(year)>
I remember some revisions before 1.5.0.2 this works fine. Now it shows me all tracks not tagged to 'Party' but all Tracks which have no tag at all it doesn't show!


Best Regards,
Poison Joe[/code]

P.S.: Field "Sampler" in the code above is my Custom Field 1.

Posted: Sat Dec 22, 2007 11:18 am
by nynaevelan
Hi Zvezdand:

I updated to the lastest version of MN and I tested my MNs to ensure they are working with the new version. Here are the ones I ran into problems with, can you look at them and tell me why they are not working with the latest version?

1. MN: Played Today|filter:DAYS SINCE LAST PLAYED = 0\<genre>\<artist>

or

Played Today|SQL filter:CAST(julianday('now') - julianday('1899-12-30') - Songs.LastTimePlayed AS integer) = 0\<genre>\<artist

Result: Shows me both tracks that have played today and yesterday

2. MN: Artists sorted by the number of tracks\<Artist|Sort by:Count(Length)|Sort Order:Desc>

Result: Gives me an invalid call or argument at line 1308 Column 4

3. MN: Added Today|SQL filter:CAST(julianday('now') - julianday('1899-12-30') - Songs.DateAdded AS integer) = 0\<genre>

Result: Shows me both tracks that have added today and yesterday

4. MN: Played Yesterday|filter:DAYS SINCE LAST PLAYED < 0\<genre>\<artist>

or

Played Today|SQL filter:CAST(julianday('now') - julianday('1899-12-30') - Songs.LastTimePlayed AS integer) - 1\<genre>\<artist>

Result: Nothing

Nyn