Easy/fast nested nodes & FilesToEdit hiding (09Nov08)

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

Moderators: Peke, Gurus

nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post 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!!
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post 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.
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post 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. :(
Last edited by nynaevelan on Mon Feb 18, 2008 9:30 am, edited 1 time in total.
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish »

Oh. :o
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
sbondi

Dates in the MM3 database

Post 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
spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish »

Thanks for the explanation!
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
Valrog
Posts: 32
Joined: Tue Oct 23, 2007 8:32 pm

Post 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.
Mizery_Made
Posts: 2283
Joined: Tue Aug 29, 2006 1:09 pm
Location: Kansas City, Missouri, United States

Post by Mizery_Made »

Hmmm, so you want everything listed except WMA files? Maybe:

Code: Select all

trackCriteria="SongPath NOT LIKE '%.wma'"
Valrog
Posts: 32
Joined: Tue Oct 23, 2007 8:32 pm

Post 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.
nethog
Posts: 41
Joined: Tue Nov 15, 2005 8:54 pm
Location: Maryville, TN - USA

Post 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. :o

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!
sbondi

Post 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 :)
sbondi

Post 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. :o

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 :D

I will review your situation next week (when I am back from vacation), and I will reply back.
spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post 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!

:oops:
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
nynaevelan
Posts: 5559
Joined: Wed Feb 07, 2007 11:07 pm
Location: New Jersey, USA
Contact:

Post 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
3.2x - Win7 Ultimate (Zen Touch 2 16 GB/Zen 8GB)
Link to Favorite Scripts/Skins

Join Dropbox, the online site to share your files
spacefish
Posts: 1427
Joined: Mon Jan 14, 2008 7:21 am
Location: Denmark

Post by spacefish »

Thanks, Nyn. I'll give that a try. :D
Image
MM Gold 3.0.3.1183 : Vista HP SP1 (x86) : Zen Stone (2GB)
Zekton: An original MM3 skin by Eyal.
Scripts in Use: Add/Remove PlayStat | Auto Album DJ | AutoRateAccurate | Backup
Case & Leading Zero Fixer | Classification & Genre Changer | Clean Scripts.ini | Clear
Field | Custom Report | Discogs Auto-Tag Web Search | Forget Crossfade | Invert
Selection/Select None | Last 100... | Lyricator | Lyrics to Instrumental | MonkeyRok
MusicBrainz Tagger | My Custom Nodes | Now Playing Art Node | Play History & Stats
Right Click for Reports | Right Click for Scripts | Right Click for Web | Stop After Current
WebNodes
Post Reply