Magic Nodes 4.2 w/ 380 masks & real GUI (2011-07-01)[MM2+]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

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

Post by Bex » Tue Jul 24, 2007 6:26 pm

Yeah, but I got annoyed....
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

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

Post by ZvezdanD » Tue Jul 24, 2007 6:35 pm

BTW, you didn't mentioned firstweekofyear. My code assume that a year start with week in which January 1 occurs (MS default setting). This not follow ISO standards, according to web page which you posted.

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

Post by Bex » Tue Jul 24, 2007 6:48 pm

Yes, I know but it's equally common to use 1 jan so i will use your code to give users other options!
More here:
http://en.wikipedia.org/wiki/Week#Week_number
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

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

Post by ZvezdanD » Wed Jul 25, 2007 9:00 am

Here is a replacement for Format(Date, "ww", firstdayofweek, firstweekofyear) in SQLite:

Code: Select all

cast(strftime('%W', Date) as integer) +
case when firstdayofweek = 1
then
    case when cast(strftime('%w', Date, 'start of year') as integer) = 1
    then
        0
    else
        1
    end
else
    case when cast(strftime('%w', Date, 'start of year') as integer) > 1
        and (firstdayofweek > cast(strftime('%w', Date, 'start of year') as integer)
        or firstdayofweek = 0)
    then
        case when cast(strftime('%w', Date) as integer) = 0
            or cast(strftime('%w', Date) as integer) >= firstdayofweek
            and firstdayofweek > cast(strftime('%w', Date, 'start of year') as integer)
        then
            2
        else
            1
        end
    else
        case when cast(strftime('%w', Date) as integer) = 0
            or cast(strftime('%w', Date) as integer) >= firstdayofweek 
            and firstdayofweek > 0
        then
            1
        else
            0
        end
    end
end +
case when firstweekofyear = 2
    and cast(strftime('%j', Date, 'start of year', 'weekday ' 
    || cast(firstdayofweek as text), '-1 day') as integer) < 4
    or firstweekofyear = 3
    and cast(strftime('%w', Date, 'start of year') as integer) <> firstdayofweek
then
    case when date(Date, 'start of year', 'weekday ' || cast(firstdayofweek as text)) 
        > Date
    then
        case when firstweekofyear = 2
            and cast(strftime('%j', Date, 'start of year', '-1 year', 'weekday '
            || cast(firstdayofweek as text), '-1 day') as integer) < 4
            or firstweekofyear = 3
            and cast(strftime('%w', Date, 'start of year', '-1 year') as integer)
            <> firstdayofweek
            and cast(strftime('%w', Date, 'start of year', '-1 day') as integer)
            <> firstdayofweek
        then
            51
        else
            52
        end
    else
        -1
    end
else
    0
end
firstdayofweek has same value as in SQLite (0 - Sunday, 1 - Monday...), but firstweekofyear has same value as in MS Jet (1 - Start with week in which January 1 occurs (default), 2 - Start with the first week that has at least four days in the year, 3 - Start with the first full week of the year).

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

Post by Bex » Wed Jul 25, 2007 9:36 am

Thanks, I'll check it out later!
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

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

Post by ZvezdanD » Wed Jul 25, 2007 10:29 am

I think that I found a bug in the MS algorithm. If you choose firstweekofyear = 2 or 3, the last day of the first week on the begin of year 2101 has incorrect a week of year. Please, take a look on an example with firstweekofyear =2 and firstdayofweek = 2 (Mon), where 2101-01-02 has value 53 instead of 52:

Code: Select all

             Sat Sun Mon Tue Wed Thu Fri
2100-12-11 - 49, 49, 50, 50, 50, 50, 50
2100-12-18 - 50, 50, 51, 51, 51, 51, 51
2100-12-25 - 51, 51, 52, 52, 52, 52, 52
2101-01-01 - 52, 53, 01, 01, 01, 01, 01
2101-01-08 - 01, 01, 02, 02, 02, 02, 02
2101-01-15 - 02, 02, 03, 03, 03, 03, 03
2101-01-22 - 03, 03, 04, 04, 04, 04, 04

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

Post by Bex » Wed Jul 25, 2007 1:48 pm

Yeah, I've read that MS has bugs in its date calculation engine. In this case it doesn't matter since it's very far in the future.
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

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

Post by ZvezdanD » Thu Jul 26, 2007 5:04 pm

There is a new 1.4.3 version with a link in the first post of this thread.

nojac
Posts: 517
Joined: Tue Dec 19, 2006 12:23 pm
Location: Norway

Post by nojac » Fri Jul 27, 2007 2:39 am

DELETED Download error...

(I downloaded the new version, but I got an error message and nothing worked any more. I assumed it was a script error. But after a new download everything worked OK.
Therefore I deleted the original message... )
Last edited by nojac on Sun Jul 29, 2007 2:13 am, edited 3 times in total.

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

Post by ZvezdanD » Fri Jul 27, 2007 3:18 am

Please, if you want to help me, you should tell me more: which mask are you using, which MM version, are you tried same mask with last official script, what kind of files you have (mp3, ogg, flac...), what action did you tried...

From this what you wrote, I suppose that you are trying mask with <format>. In the script there is no such thing as "WHEN substr(Songpath,-3,1)=','", but only "WHEN substr(Songpath, -3, 1) = '.' ". How did you got "," instead of "."?

nojac
Posts: 517
Joined: Tue Dec 19, 2006 12:23 pm
Location: Norway

Post by nojac » Fri Jul 27, 2007 4:14 am

DELETED I reloaded and now it works as it should!

Sorry about this. Removed my former post about this...
Last edited by nojac on Fri Jul 27, 2007 6:39 am, edited 3 times in total.

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

Post by ZvezdanD » Fri Jul 27, 2007 6:07 am

Sorry, but I don't really have any clue for this. I think that your download is corrupted. Please, check if a file size of VBS file is 91.168 bytes. If it is not, try to download the script again. Also, you could send me on PM your MM INI file (c:\Documents and Settings\Your_name\Local Settings\Application Data\MediaMonkey\MediaMonkey.ini), or just lines inside of the [CustomNodeMasks] section.

Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Post by Vyper » Fri Jul 27, 2007 7:47 am

I love your new modified version but have run into a minor problem. I have a number of magic nodes that all still work except for this one which is supposed to list my albums that have 'Various Artists' as the album artist:

Code: Select all

Album Artists Various|child of:artist|SQL filter:artist='Various Artists'\<Album Artist>\<Album|Sort by:max(year)>

I get these errors, one right after the after:


Image

Image

Image


Can you tell me how to modify this node to work with your new code?

Any help would be much appreciated. :D
Stop Button Freak

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

Post by ZvezdanD » Fri Jul 27, 2007 1:30 pm

Vyper wrote:I have a number of magic nodes that all still work except for this one which is supposed to list my albums that have 'Various Artists' as the album artist:

Code: Select all

Album Artists Various|child of:artist|SQL filter:artist='Various Artists'\<Album Artist>\<Album|Sort by:max(year)>
There is a new 1.4.3.1 version which has fixed error. Thank you very much for the report.
Last edited by ZvezdanD on Fri Jul 27, 2007 1:46 pm, edited 1 time in total.

Vyper
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Post by Vyper » Fri Jul 27, 2007 1:45 pm

Now there is a serious problem. Updating the script, then running Media Monkey, MM acts as if MagicNodes is not installed at all. No nodes listed, no options, nothing. And I do have it in the scripts/auto folder. :(
Stop Button Freak

Post Reply