Page 12 of 28
Posted: Mon Feb 18, 2008 7:25 am
by nynaevelan
You just need to make a slight change to:
Code: Select all
[No Original Date]
icon=Year
sortLike=Artist
easyCaption=BaseCaptionAndTrackCount
hideIfEmpty=1
refresh=1
trackCriteria="(OrigYear = -1)"
parent="Files to Edit"
Nyn
EDIT: MM beat me to it!!
Posted: Mon Feb 18, 2008 9:15 am
by spacefish
Thanks, why do we use -1? Is it because that's a field which contains digits or a date? For example, I have (Lyrics = '') and that works just fine.
Posted: Mon Feb 18, 2008 9:25 am
by nynaevelan
The default for that field seems to be -1 for a blank status. I used the SQLite Spy program to look at the field but I guess you could also use
Bex's SQL Viewer to run a query for the type of data in the field, just guessing as a non-programmer.
Nyn
EDIT: For me the SQLite program is the easiet way to find the data, that SQL stuff justs flies over my head.

Posted: Mon Feb 18, 2008 9:28 am
by spacefish
Oh.

Dates in the MM3 database
Posted: Mon Feb 18, 2008 12:01 pm
by sbondi
Hi spacefish,
There is no real convention for dates in SQLite. There is actually no "date" type to store database fields. They recommend you to store them as numbers and not strings, and ideally based on the "Julian" system which is supported by the provided SQLite date functions.
The MM3 team has chosen to support fields/dates that were originally stored as a year only (e.g., "Year" and "Original Year") as a "yyyyddmm" string which is set to "-1" when not assigned.
On the other hand, the MM3 team has chosen to support full date fields like "DateAdded" and "LastTimePlayed" as VB-type dates (as opposed to "Julian" dates) in the MM3 database. This is a "real" number with the completed days since 1899-12-30 to the left of the decimal point (i.e., the integer), and the completed time since midnight to the right of the decimal point. Note: This is why you may see a "CAST(DateAdded AS Integer)" for calculating simple day differences. Here an unassigned value is represented by a "0" (not "-1").
Since MM3 dates are mostly VB-type dates as opposed to "Julian" dates, in order to use SQLite date functions effectively in a complex SQLite query, you need to convert the VB-type date to a "Julian" date. Since the only difference between the "Julian" day and the VB-type date is that the "Julian" date starts at the turn prior to the first millenium, the VB-type date starts at the turn of the century. So, the adjustment is:
"(julianday(DateAdded) + julianday('1899-12-30'))"
julianday('1899-12-30') has a specific numeric value that can be used in place of this and performs faster:
"(julianday(DateAdded) + 2415018.5)"
Regards,
Steve
Posted: Mon Feb 18, 2008 1:20 pm
by spacefish
Thanks for the explanation!
Posted: Tue Feb 19, 2008 12:00 pm
by Valrog
Hello Folks,very impressive script ya got here.Been playin with it for a couple weeks and divided between the sample ini and nyn's ini and alot of reading i have been havin fun customizing my nodes.
I got a question and hopin ya guys can help me out.
I see theres an easycriteria for NotMP3.It got me thinkin that i would like a node showin not wma.But for the life of me cannot figure out the correct trackcriteria.Then i got to thinkin maybe its not possible.
Is this possible?And if so would it be possible to show me the correct trackcriteria?
Any help will be greatly appreciated.Thanks and yall have a good day.
Posted: Tue Feb 19, 2008 12:11 pm
by Mizery_Made
Hmmm, so you want everything listed except WMA files? Maybe:
Code: Select all
trackCriteria="SongPath NOT LIKE '%.wma'"
Posted: Tue Feb 19, 2008 5:00 pm
by Valrog
That is it Miz thanks much i appreciate it.As much as i hate to admit it all i was missing was a period.
Once again very nice script.Cant wait to see where it goes.
Posted: Thu Feb 21, 2008 5:47 pm
by nethog
Just loaded up this script to have a go and it sure looks like a beauty!
Only problem I've had so far (other than wrapping my brain around how to get the most out of it) was on the "Delete Art" node.
1. It took a loooooong time to research tracks on this node. I figured that was ok because I have about 20k tracks in my collection. However, the status bar only went up to 9999...and then I never got any feedback that it was still running and I thought it had hung up. After killing MM from Task Manager and giving it another go I let it run until the status bar info went away. I was surprised that my computer couldn't count past 9999.
2. The other thing I noticed was when I tried to work on one of the other nodes (Fix Title) while the Delete Art was doing it's thing searching all the files. I was able to start editing one title and nothing would work (would not except changes) and I couldn't do anything else until the Delete Art finished it's search. Right clicking on the status indicator and selecting Terminate would not in fact terminate the search either.
I would like to see the status bar reflect the actual number of files it's searching rather than give up at 9999. That way I'll know it's still working and not hung up. I don't mind the waiting for it to finish as I'm sure it's an intensive task having to search each of the files rather than the db, but it would be nice to have a better understanding of how much further it has to go.
Thanks for a great script!
Posted: Fri Feb 22, 2008 10:30 pm
by sbondi
Valrog wrote:That is it Miz thanks much i appreciate it.As much as i hate to admit it all i was missing was a period.
Once again very nice script.Cant wait to see where it goes.
Glad you like the script!
P.S. Sorry for the late reply, but I am on vacation

Posted: Fri Feb 22, 2008 10:31 pm
by sbondi
nethog wrote:Just loaded up this script to have a go and it sure looks like a beauty!
Only problem I've had so far (other than wrapping my brain around how to get the most out of it) was on the "Delete Art" node.
1. It took a loooooong time to research tracks on this node. I figured that was ok because I have about 20k tracks in my collection. However, the status bar only went up to 9999...and then I never got any feedback that it was still running and I thought it had hung up. After killing MM from Task Manager and giving it another go I let it run until the status bar info went away. I was surprised that my computer couldn't count past 9999.
2. The other thing I noticed was when I tried to work on one of the other nodes (Fix Title) while the Delete Art was doing it's thing searching all the files. I was able to start editing one title and nothing would work (would not except changes) and I couldn't do anything else until the Delete Art finished it's search. Right clicking on the status indicator and selecting Terminate would not in fact terminate the search either.
I would like to see the status bar reflect the actual number of files it's searching rather than give up at 9999. That way I'll know it's still working and not hung up. I don't mind the waiting for it to finish as I'm sure it's an intensive task having to search each of the files rather than the db, but it would be nice to have a better understanding of how much further it has to go.
Thanks for a great script!
Thanks for the compliment
I will review your situation next week (when I am back from vacation), and I will reply back.
Posted: Tue Feb 26, 2008 6:10 am
by spacefish
Need some help with a custom node, please:
Based on the fact that
Original Date is not supported for autoplaylists, Nyn suggested I try making a custom node for my needs but I just can't seem to get my head around the trackCriteria. At least nothing I've come up with so far accomplishes what I want.
In brief, I've set an Original Date on all tracks and now I want to make playlists for them based on decade. For example, I want everything with an original date between 1980 - 1989 (inclusive) in an 80s node. I have pored over the readme and nothing really makes sense. I guess I am far too new to MM's scripting environment to feel entirely comfortable doing anything but the simplest things. If someone could please tell me how I might accomplish a node like that, I can probably work out the others I want on my own.
Thanks in advance and sorry for the braindead moment!

Posted: Tue Feb 26, 2008 8:23 am
by nynaevelan
SF:
Because the Original Date has that extra four zeroes on the end, you have to add them to your criteria, try this:
Code: Select all
[Testing Purposes]
icon=Year
sortLike=Artist
easyCaption=BaseCaptionAndTrackCount
hideIfEmpty=1
refresh=1
level=Album
LevelEasyCaption=BaseCaption
trackCriteria="(OrigYear > 19790000 AND OrigYear < 19900000)"
parent="Personal Node"
Nyn
Posted: Tue Feb 26, 2008 1:59 pm
by spacefish
Thanks, Nyn. I'll give that a try.
