Last 100... Played, Modified, Added 1.6 (2012-08-13)

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

Moderators: Peke, Gurus

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

Post by Bex »

Oops, but it was only in one formula....

I use Cast to get the date from a MM date field.
e.g. Cast(Playdate as Integer) gives me the date without the time (in MM format)
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: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

Bex wrote:Oops, but it was only in one formula....
Actually, there are in two formulas, used 18 times. :)
I use Cast to get the date from a MM date field.
Well, this is some another story because date/time for MM fields start from midnight, instead of SQLite date/time values which starts from noon.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

1. I only find them in IsoYearWeekSQL which I don't use and in getYearWeekSQL which I use one time when creating the week temp table.
The strange thing is that it works with intiger, hmm....


2. Well, it doesn't matter in this case sine I use to link to my temp table
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: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

Bex wrote:1. I only find them in IsoYearWeekSQL which I don't use and in getYearWeekSQL which I use one time when creating the week temp table.
The strange thing is that it works with intiger, hmm....
Sorry for my lack of English. I didn't checked on how many places you are calling functions with those formulas, but I counted number of appearances of the word intiger. Take it easy, it was only a (bad) joke. :)

BTW as I said, you could type everything for Cast instead of Integer, Real, or Text - SQLite don't check syntax for this - I tried random text.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

It's cool ZvezdanD. :)

Yeah, it accepts anything? But it also change the type depending of what you write.
Integer seems to have highest precedence then text and lastly real
e.g. realtextinteger changes the type to integer while realtext change it to text

Strange behaviour...
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: 3257
Joined: Thu Jun 08, 2006 7:40 pm

Post by ZvezdanD »

It seems that for integer first three characters are significant: I tried intiger, intigor, intdas, ... and it correctly convert real numbers to integer. But, if type irteger or inreger, they stay as real.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

Script is updated
Ver 1.2 (2007-05-13 [MM2+3]
- Improved speed considerably :D

First time you run it or after a change of number of tracks to show, it's slow but the from second time it's much faster!

Enjoy
/Bex
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
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Re: Last 100... Played, Modified, Added 1.2 (2007-05-13) [MM

Post by Teknojnky »

Bex wrote: - Added possibilty to edit Last 100 to Last "Any Number". (Press F2 on the node and type the new value.)
I must have missed this last time you updated, very nifty!
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

Yep, you have the same feature in PlayHistory as well which soon will get the same speed update as this script. I can tell you it was a great improvement there.
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
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

strangely, it stopped working. I even restarted MM and it still does not list any tracks for any of the 3 nodes.

running a compact database now, will see if that does anything
Michel37
Posts: 422
Joined: Thu Sep 20, 2007 11:15 pm
Location: Germany

Post by Michel37 »

Teknojnky wrote:strangely, it stopped working. I even restarted MM and it still does not list any tracks for any of the 3 nodes.

running a compact database now, will see if that does anything
Same here. It only worked right after install. Now nothing is listed anymore. Compacting the database didn´t change anything.
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Post by Teknojnky »

yea compacting didn't fix it

looking at the debug log, here is the sql for the played node..

Code: Select all

[6024] WHERE LastTimePlayed >= julianday('5/13/2008 12:30:57 PM')-2415018.5-1 ORDER BY LastTimePlayed Desc LIMIT 100 
No idea if that correct or not.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

Sorry, this is a locale thing. I'll fix it soon.
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
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

Bugfix release
Ver 1.2.1 (2007-05-14 [MM2+3]
- Fixed script didn't work for other locales than Swedish


Enjoy
/Bex
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
Michel37
Posts: 422
Joined: Thu Sep 20, 2007 11:15 pm
Location: Germany

Post by Michel37 »

Works perfect now. Thanks Bex.
Post Reply