Un Auto Organised 3.0 [MM2+3] - Updated 30/10/2009

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

Billy

Post by Billy »

It's not working for me. Maybe it's my hefty filemask:

Code: Select all

Blahblah\$if(<Album Artist>=Various,Various Artist Compilations,Full Albums)\$if(<Album Artist>=Various,<Composer>,$if(<Custom 3>,<Custom 3@1>,<Artist@1>))\$if(<Album Artist>=Various,,$if(<Custom 3>,<Custom 3>,<Artist>))\$if(<Composer>=Splits,<Album>,$if(<Composer>=Tributes,<Album>,$if(<Composer>=Other,<Album>,$if(<Custom 2:1>=(,<Custom 2> <Album>,(<Year>$) <Album>))))\$if(<Custom 1>,<Custom 1>,)\$if(<Album Artist>=Various,<Track#:2> - <Artist> - <Title>.mp3,<Track#:2> - <Title>
Maybe it is the $if statements.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

This script currently only works with a single $if statement. Hopefully the next version will allow any number of nested statements. :)
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.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Post by Mizery_Made »

trixmoto wrote:This script currently only works with a single $if statement. Hopefully the next version will allow any number of nested statements. :)
Would be great! Maybe that's why it didn't work the first time I tried, before I changed the mask. Since the mask I tried first had like 10 $if statements in it, Lmao. Eitherway, don't know how hard it'd be to impletement the Multi-$if feature, but it'd be a great addition. :)

EDIT: I think the only thing worse then this script not working with multiple $if's, is maybe the fact that I have seemingly lost the mask I cooked up earlier today, it worked perfect. Now I gotta re-cook it! :cry:
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

If you close MM and open MediaMonkey.ini in a text editor and find the [RenameMasks] section then you should see the mask in there. It stores something like the last 10. It's in unfriendly format so if you just copy it to Mask1 then restart MM, everything should be fine! :)
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.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Post by Mizery_Made »

trixmoto wrote:If you close MM and open MediaMonkey.ini in a text editor and find the [RenameMasks] section then you should see the mask in there. It stores something like the last 10. It's in unfriendly format so if you just copy it to Mask1 then restart MM, everything should be fine! :)
Yeah, if only it was that easy. :\ First thing I checked after I noticed that the top Mask wasn't the one, but the one from before... but it wasn't in the INI either.

I think it was because shortly after I used it for the first time, to test it out and see if that many $if's, and nested $if's would work, I had to close MM illegally because I thought I was being smart and was trying to make a change to 4,000+ files at the same time... it stayed locked up for a good 15 minutes before I finally decided that it wasn't coming back.

So yeah, probably why it didn't save it. Though, when I had to re-do it, I added an extra $if and now it works absolutely perfect with my current structure, so maybe in the long run, maybe it was for the best.

All-In-All, great script (aswell as the countless others I've checked of yours). Keep up the great work. :wink:
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (1.2) is now available from my website. It converts the logfile messages to ASCII before writing them, so invalid characters are now written as "?" instead of causing an error.
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.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Post by Mizery_Made »

Always good to see things that could potentially causes errors, be fixed. But, I'm still sitting idle, in hopes of future support of multiple & nested $if's, that would make this perfect. :wink:
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Yes, that is still on my list of things to do! :)
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 »

New version (1.3) contains what you've all been waiting for; nested $IF statements should now work! :)

Let me know if this works, as I cannot hope to test this with all possible nestings.
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.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Post by Mizery_Made »

Yeah, so, there seems to be a problems. First of all, I should ask for my own sake. Does this update allow the usage or 2,3,4 different $if's, or just support for $if's inside of 1 $if's? Then there's the ideal option of BOTH :) Anyway, here's my breakdown, we start with my Original Mask I use:

Code: Select all

C:\Documents and Settings\Chris\Desktop\My Music\<Genre>\$if(<Custom 1>=--Misc--,!--Misc--!,)$if(<Custom 1>=--2Pac Misc--,!--Misc--!\2Pac,)$if(<Custom 1>=--2Pac Dup--,!--Misc--!\2Pac\Dups maybe,)$if(<Custom 1>=--2Pac Remix--,!--Misc--!\2Pac\Mixes,)$if(<Custom 1>=--Tech Misc--,!--Misc--!\Tech N9ne,)$if(<Custom 1>=--Tech Fake--,!--Misc--!\Tech N9ne\Mixes,)$if(<Custom 1>=--Inst--,!--Misc--!\Instrumental & Acapella,)$if(<Custom 2>=--Album--,<Album Artist>\<Year> - <Album>,)\$if(<Custom 1>,<Artist> - <Title>,$if(<Artist>=<Album Artist>,<Track#> - <Title>,<Track#> - {<Artist>} - <Title>))
All would be perfect if it would have worked, but sadly it did not. It once again listed every last file scanned as needing it and I know for a fact that it's false. So, I figured maybe if I remove the "C:\..." information and just let it run for the Filenames, this is what I tried:

Code: Select all

$if(<Custom 1>,<Artist> - <Title>,$if(<Artist>=<Album Artist>,<Track#> - <Title>,<Track#> - {<Artist>} - <Title>))
This produced an erorr. :\

Code: Select all

Error #9 - Microsoft VBScript runtime error
Subscript out of range: '[number: 0]'
File: "C:\Program Files\MediaMonkey\Scripts\Auto\UnAutoOrganised.vbs", Line 120, Column: 29
---
Error happened during script execution:
Subscript out of range: '[number: 0]'
so I moved on to my next attempt:

Code: Select all

.\$if(<Custom 1>,<Artist> - <Title>,$if(<Artist>=<Album Artist>,<Track#> - <Title>,<Track#> - {<Artist>} - <Title>))
This once again listed everything. Thought I'd leave all the multiple $if's and take out my one nested one:

Code: Select all

C:\Documents and Settings\Chris\Desktop\My Music\<Genre>\$if(<Custom 1>=--Misc--,!--Misc--!,)$if(<Custom 1>=--2Pac Misc--,!--Misc--!\2Pac,)$if(<Custom 1>=--2Pac Dup--,!--Misc--!\2Pac\Dups maybe,)$if(<Custom 1>=--2Pac Remix--,!--Misc--!\2Pac\Mixes,)$if(<Custom 1>=--Tech Misc--,!--Misc--!\Tech N9ne,)$if(<Custom 1>=--Tech Fake--,!--Misc--!\Tech N9ne\Mixes,)$if(<Custom 1>=--Inst--,!--Misc--!\Instrumental & Acapella,)$if(<Custom 2>=--Album--,<Album Artist>\<Year> - <Album>,)\$if(<Custom 1>,<Artist> - <Title>,<Track#> - <Title>)
Listed everything. :\ I simplified it a little more:

Code: Select all

C:\Documents and Settings\Chris\Desktop\My Music\<Genre>\$if(<Custom 1>=--Misc--,!--Misc--!,<Album Artist>\<Year> - <Album>)\$if(<Custom 1>,<Artist> - <Title>,<Track#> - <Title>)
Negative, still listing everything. So, finally I thought I would try one last thing, removing all the multi-$if's and just leaving the one Nested one, since you mentioned that this added support of nested, but made no mention of multi:

Code: Select all

C:\Documents and Settings\Chris\Desktop\My Music\<Genre>\<Album Artist>\<Year> - <Album>\$if(<Custom 1>,<Artist> - <Title>,$if(<Artist>=<Album Artist>,<Track#> - <Title>,<Track#> - {<Artist>} - <Title>))
This only brings the title of a new movie coming out to mind... "Deja Vu" as even this resulted in the same fate as all the other attempts (other then the one error)

So, hope this long list of fail attempts help you in some way, I really see the potential in this script and would LOVE to see it reach it as I would find it VERY usefull. :)
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Sorry, I had not seen any $IF statements in the format $IF(a=b,c,d) so I have not programmed for the equals at all. I will do so in the next version.

And in answer to your question, this script should handle any number of $IF statements, nested or otherwise.
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.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Post by Mizery_Made »

trixmoto wrote:Sorry, I had not seen any $IF statements in the format $IF(a=b,c,d) so I have not programmed for the equals at all. I will do so in the next version.

And in answer to your question, this script should handle any number of $IF statements, nested or otherwise.
Haha, yeah... I hadn't thought about that being the problem, silly me. Anyway, I took out the "=" stuff from the "simpler" mask I tested before:

Code: Select all

C:\Documents and Settings\Chris\Desktop\My Music\<Genre>\$if(<Custom 1>,!--Misc--!,<Album Artist>\<Year> - <Album>)\$if(<Custom 1>,<Artist> - <Title>,<Track#> - <Title>)
This generated an error. Unsure if it's something with the script, or the way my computer is handling it as I don't know much about scripts.

Code: Select all

Error #5 - Microsoft VBScript runtime error
Invalid procedure call or argument: 'Left'
File: "C:\Program Files\MediaMonkey\Scripts\Auto\UnAutoOrganised.vbs", Line: 179, Column: 2
Again, unsure about it so maybe you know? Secondly, did you change something else from the last version? Cause I don't think this is working right.

Code: Select all

.\$if(<Custom 1>,<Artist> - <Title>,<Track#> - <Title>)
This isn't acting properly either, it aswell lists all the files. I know there was the issue in the original version which you had to fix by having it check the full path, could this be the cause once again? Or maybe it's because I changed where I keep all my files, possibly, as I used to keep them in "My Documents/My Music" but now I have them on "Desktop/My Music"

_____________________________________________________________

EDIT: Odd.

Code: Select all

C:\Documents and Settings\Chris\Desktop\My Music\<Genre>\<Album Artist>\<Year> - <Album>\<Track#> - <Title>
Works perfectly fine, scanned my 5,000+ files, and only listed about 1,000 or so as needing it, which is about right giving my Misc files and the ones that have different artists then album artists. So it seems to be something to do with the $if's :\
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Ok, it appears that only nested $IF statements work at the moment. The next version will allow you to have multiple non-nested $IF statements.

Also relative paths (starting with a fullstop) don't currently work, but this will hopefully make it into the next release.
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.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Post by Mizery_Made »

trixmoto wrote:Also relative paths (starting with a fullstop) don't currently work, but this will hopefully make it into the next release.
Ah, I was just trying everything I could think of to give you the broadest view I could, but as you saw, I missed some possibilities, Lol.

Anyway, the addition of nested $if's is a nice step forward so it doesn't go without praise. *Thumbs Up*
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (1.4) should now include all the $IF functionality. Changes include...

- Added multiple $IF statements can be non-nested
- Added $IF control characters can be escaped
- Added $IF condition can contain an equals sign
- Added relative path allowed in mask
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.
Post Reply