
Small bug on line 1091 intLyricistsCountPlayed is misspelled inLyricistsCountPlayed so it yields error.
Code: Select all
Function FormatTime(milliseconds)
FormatTime = _
SDB.Database.OpenSQL("SELECT CASE "&_
"WHEN "& milliseconds &" <600*1000 THEN "&_
"SUBSTR(STRFTIME('%M:%S',0.5+CAST("& milliseconds &" AS REAL)/1000/86400),2,4) "&_
"WHEN "& milliseconds &" <3600*1000 THEN "&_
"STRFTIME('%M:%S',0.5+CAST("& milliseconds &" AS REAL)/1000/86400) "&_
"WHEN "& milliseconds &" <3600*10*1000 THEN "&_
"SUBSTR(STRFTIME('%H:%M:%S',0.5+CAST("& milliseconds &" AS REAL)/1000/86400),2,7) "&_
"WHEN "& milliseconds &" <3600*24*1000 THEN "&_
"STRFTIME('%H:%M:%S',0.5+CAST("& milliseconds &" AS REAL)/1000/86400) "&_
"WHEN "& milliseconds &" <3600*25*1000 THEN "&_
"CAST("& milliseconds &"/24/3600000 AS INTEGER)||' day '||STRFTIME('%H:%M:%S',0.5+CAST("& milliseconds &" AS REAL)/1000/86400) "&_
"ELSE "&_
"CAST("& milliseconds &"/24/3600000 AS INTEGER)||' days '||STRFTIME('%H:%M:%S',0.5+CAST("& milliseconds &" AS REAL)/1000/86400) END").StringByIndex(0)
End Function
Thanks for your kind words and for this contribution.Bex wrote:And if I may contribute to this script. A long time ago I wrote this function below which gives days instead of just one zillion hours.
Yes, you are right, thanks for the report. However, I am now wondering when I change Length data in Top # Played tables how to name that column. I think it should not stay as "Length", and in same way as I changed "Tracks" to "Played" after Nyn suggestion, I think I should rename that column as well. In the Totals section I added "Play time" row with similar data, only calculated globally. In Magic Nodes script I have the field with same data named "Play Length". What do you think about those two suggestion for this column caption?Mizery_Made wrote:Though I now notice another issue. The "Tracks/Played" column differs between "Top # *" and "Top # Played *" while the Length & Size max out with 1 play, giving you identical information between these two sections once you've played something once.
Well, I agree that it is not needed, but I would not remove that column because it could break uniformity of tables.is Size even needed for the Played (and now Rated) sections?
Code: Select all
Top 10 Artists With Most Tracks
# Artist Tracks Length File size
2 Tech N9ne 769 53:04:00 4.10 GB
3 2Pac 480 33:58:26 2.78 GB
4 Yukmouth 286 19:30:03 1.50 GB
Top 10 Played Artists
# Artist Played Length File size
2 Tech N9ne 3649 53:00:04 4.09 GB
3 2Pac 1914 33:58:26 2.78 GB
4 Yukmouth 1040 19:30:03 1.50 GB