View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002859 | MMW v4 | Framework: Scripts/Extensions | public | 2007-02-22 21:42 | 2007-10-16 02:21 |
Reporter | rusty | Assigned To | |||
Priority | immediate | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 3.0 | ||||
Summary | 0002859: Regression: Statistics report fails | ||||
Description | File > Reports > Statistics doesn't work at all. It generates errors related to the sql used within. | ||||
Additional Information | http://www.mediamonkey.com/forum/viewtopic.php?t=15398 | ||||
Tags | No tags attached. | ||||
Attached Files | stats.htm (18,269 bytes)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>MediaMonkey Music Library Statistics</title> </head> <STYLE TYPE=text/css> body{font-family:'Verdana',sans-serif; background-color:#FFFFFF; font-size:9pt; color:#000000;} H1{font-family:'Verdana',sans-serif; font-size:13pt; font-weight:bold; color:#AAAAAA; text-align:left} P{font-family:'Verdana',sans-serif; font-size:9pt; color:#000000;} TH{font-family:'Verdana',sans-serif; font-size:10pt; font-weight:bold; color:#000000; border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:3px;} TD{font-family:'Verdana',sans-serif; font-size:9pt; color:#000000; border-color:#000000; border-style: solid; border-left-width:0px; border-right-width:0px; border-top-width:0px; border-bottom-width:1px;} TR.dark{background-color:#EEEEEE} TR.aleft TH{text-align:left} </STYLE> <body> <H1>MediaMonkey Music Library Statistics</H1> <p/> <table border="0" cellspacing="0" cellpadding="4" width="100%"> <tr><th colspan="3">Totals</th></tr> <tr class="aleft"><th>Type</th><th>Library</th><th>Played</th></tr> <tr><td>Artists</td><td>553</td><td>41</td></tr> <tr class="Dark"><td>Albums</td><td>721</td><td>35</td></tr> <tr><td>Genres</td><td>75</td><td>15</td></tr> <tr class="Dark"><td>Years</td><td>62</td><td>19</td></tr> <tr><td>Playlists</td><td>37</td><td>0</td></tr> <tr class="Dark"><td>Tracks</td><td>4607</td><td>65</td></tr> <tr><td>Length (h:mm:ss)</td><td>348:14:12</td><td>32:17:48</td></tr> <tr class="Dark"><td>File size</td><td>25.21 GB</td><td>2.79 GB</td></tr> </table> <p/> <table border="0" cellspacing="0" cellpadding="4" width="100%"> <tr><th colspan="3">Averages</th></tr> <tr class="aleft"><th>Type</th><th>Library</th><th>Played</th></tr> <tr><td>Tracks per Artist</td><td>8.5</td><td>14.5</td></tr> <tr class="Dark"><td>Tracks per Album</td><td>5.8</td><td>13.4</td></tr> <tr><td>Tracks per Genre</td><td>51</td><td>27.9</td></tr> <tr class="Dark"><td>Tracks per Year</td><td>37.5</td><td>21.9</td></tr> <tr><td>Tracks per Rating</td><td>193.8</td><td>61.4</td></tr> <tr class="Dark"><td>Bitrate (kbps)</td><td>184</td><td>179</td></tr> <tr><td>Year</td><td>1938</td><td>1992</td></tr> <tr class="Dark"><td>Tracks played per day</td><td>-</td><td>1</td></tr> <tr><td>Rating</td><td>**"</td><td>***</td></tr> <tr class="Dark"><td>Length (h:mm:ss)</td><td>0:05:32</td><td>0:03:16</td></tr> <tr><td>File size</td><td>5.6 MB</td><td>4.81 MB</td></tr> </table> <p/> <table border="0" cellspacing="0" cellpadding="4" width="100%"> <tr><th colspan="4">Top 10 Artists</th></tr> <tr class="aleft"> <th>Tracks</th> <th>Artist</th> <th>Length</th> <th>File size</th> </tr> <tr class="Dark"> <td>221</td> <td>U2</td> <td>16:38:06</td> <td>1.06 GB</td> </tr> <tr> <td>146</td> <td>Enya</td> <td>8:29:38</td> <td>606 MB</td> </tr> <tr class="Dark"> <td>119</td> <td>Stranglers</td> <td>7:29:38</td> <td>573.46 MB</td> </tr> <tr> <td>103</td> <td>Tori Amos</td> <td>7:35:34</td> <td>547.14 MB</td> </tr> <tr class="Dark"> <td>94</td> <td>The Ventures</td> <td>4:02:19</td> <td>319.41 MB</td> </tr> <tr> <td>84</td> <td>The Wiggles</td> <td>2:14:55</td> <td>128.36 MB</td> </tr> <tr class="Dark"> <td>84</td> <td>Supertramp</td> <td>7:23:35</td> <td>651.98 MB</td> </tr> <tr> <td>84</td> <td>The Silencers</td> <td>6:39:16</td> <td>496.91 MB</td> </tr> <tr class="Dark"> <td>80</td> <td>The Beatles</td> <td>3:11:15</td> <td>212.03 MB</td> </tr> <tr> <td>80</td> <td>The Police</td> <td>4:54:55</td> <td>393.72 MB</td> </tr> </table> <p/> <table border="0" cellspacing="0" cellpadding="4" width="100%"> <tr><th colspan="4">Top 10 Artists played</th></tr> <tr class="aleft"> <th>Tracks</th> <th>Artist</th> <th>Length</th> <th>File size</th> </tr> <tr class="Dark"> <td>61</td> <td>Death Cab for Cutie</td> <td>3:47:23</td> <td>314.31 MB</td> </tr> <tr> <td>59</td> <td>Fleetwood Mac</td> <td>3:13:00</td> <td>185.21 MB</td> </tr> <tr class="Dark"> <td>56</td> <td>Dire Straits</td> <td>5:45:54</td> <td>1012.04 MB</td> </tr> <tr> <td>54</td> <td>The Eagles</td> <td>2:43:02</td> <td>224.29 MB</td> </tr> <tr class="Dark"> <td>31</td> <td>Depeche Mode</td> <td>2:09:16</td> <td>211.07 MB</td> </tr> <tr> <td>30</td> <td>Donovan</td> <td>2:06:06</td> <td>181.35 MB</td> </tr> <tr class="Dark"> <td>30</td> <td>Jethro Tull</td> <td>0:58:30</td> <td>78.99 MB</td> </tr> <tr> <td>30</td> <td>Marvin Gaye</td> <td>1:37:02</td> <td>88.85 MB</td> </tr> <tr class="Dark"> <td>30</td> <td>The Cult</td> <td>1:48:45</td> <td>99.55 MB</td> </tr> <tr> <td>29</td> <td>Crosby, Stills, Nash & Young</td> <td>1:18:25</td> <td>71.88 MB</td> </tr> </table> <p/> <table border="0" cellspacing="0" cellpadding="4" width="100%"> <tr><th colspan="4">Top 10 Albums played</th></tr> <tr class="aleft"> <th>Tracks</th> <th>Album</th> <th>Length</th> <th>File size</th> </tr> <tr class="Dark"> <td>61</td> <td>Death Cab for Cutie - Plans</td> <td>3:47:23</td> <td>314.31 MB</td> </tr> <tr> <td>61</td> <td>Death Cab for Cutie - Transatlanticism</td> <td>3:47:23</td> <td>314.31 MB</td> </tr> <tr class="Dark"> <td>59</td> <td>Fleetwood Mac - Rumours</td> <td>3:13:00</td> <td>185.21 MB</td> </tr> <tr> <td>59</td> <td>Fleetwood Mac - Rumours (Expanded & Remastered) - Disc 1 of 2</td> <td>3:13:00</td> <td>185.21 MB</td> </tr> <tr class="Dark"> <td>56</td> <td>Dire Straits - Alchemy - Live</td> <td>5:45:54</td> <td>1012.04 MB</td> </tr> <tr> <td>56</td> <td>Dire Straits - Brothers in Arms</td> <td>5:45:54</td> <td>1012.04 MB</td> </tr> <tr class="Dark"> <td>56</td> <td>Dire Straits - Communiqué</td> <td>5:45:54</td> <td>1012.04 MB</td> </tr> <tr> <td>56</td> <td>Dire Straits - Desperado: The Soundtrack</td> <td>5:45:54</td> <td>1012.04 MB</td> </tr> <tr class="Dark"> <td>56</td> <td>Dire Straits - Dire Straits</td> <td>5:45:54</td> <td>1012.04 MB</td> </tr> <tr> <td>56</td> <td>Dire Straits - Making Movies</td> <td>5:45:54</td> <td>1012.04 MB</td> </tr> </table> <p/> <table border="0" cellspacing="0" cellpadding="4" width="100%"> <tr><th colspan="4">Top 10 Genres</th></tr> <tr class="aleft"> <th>Tracks</th> <th>Genre</th> <th>Length</th> <th>File size</th> </tr> <tr class="Dark"> <td>1307</td> <td>Rock</td> <td>91:27:58</td> <td>8.37 GB</td> </tr> <tr> <td>318</td> <td>Pop</td> <td>22:20:13</td> <td>1.68 GB</td> </tr> <tr class="Dark"> <td>213</td> <td>Rock/Pop</td> <td>15:19:24</td> <td>989.84 MB</td> </tr> <tr> <td>172</td> <td>Alternative</td> <td>12:13:34</td> <td>930.08 MB</td> </tr> <tr class="Dark"> <td>142</td> <td>Children</td> <td>3:52:22</td> <td>217.74 MB</td> </tr> <tr> <td>105</td> <td>Classic Rock</td> <td>7:24:14</td> <td>552.38 MB</td> </tr> <tr class="Dark"> <td>97</td> <td>New Age</td> <td>5:38:42</td> <td>404.5 MB</td> </tr> <tr> <td>93</td> <td>Hebrew</td> <td>6:53:17</td> <td>445.8 MB</td> </tr> <tr class="Dark"> <td>89</td> <td>Instrumental Rock</td> <td>3:45:19</td> <td>297.37 MB</td> </tr> <tr> <td>87</td> <td>Hard Rock</td> <td>7:22:23</td> <td>629.47 MB</td> </tr> </table> <p/> <table border="0" cellspacing="0" cellpadding="4" width="100%"> <tr><th colspan="4">Top 10 Genres played</th></tr> <tr class="aleft"> <th>Tracks</th> <th>Genre</th> <th>Length</th> <th>File size</th> </tr> <tr class="Dark"> <td>117</td> <td>Rock</td> <td>8:18:32</td> <td>1.14 GB</td> </tr> <tr> <td>84</td> <td>Classic Rock</td> <td>3:41:32</td> <td>303.27 MB</td> </tr> <tr class="Dark"> <td>66</td> <td>Alternative</td> <td>4:00:24</td> <td>330.11 MB</td> </tr> <tr> <td>33</td> <td>Children</td> <td>0:16:04</td> <td>15.26 MB</td> </tr> <tr class="Dark"> <td>31</td> <td>Electronic</td> <td>2:09:16</td> <td>211.07 MB</td> </tr> <tr> <td>30</td> <td>Folk, Children</td> <td>2:06:06</td> <td>181.35 MB</td> </tr> <tr class="Dark"> <td>30</td> <td>Gothic Rock</td> <td>1:48:45</td> <td>99.55 MB</td> </tr> <tr> <td>18</td> <td>Interview</td> <td>0:05:09</td> <td>5.29 MB</td> </tr> <tr class="Dark"> <td>2</td> <td>Soundtrack</td> <td>0:04:07</td> <td>5.43 MB</td> </tr> <tr> <td>2</td> <td>Hard Rock</td> <td>0:01:02</td> <td>1.95 MB</td> </tr> </table> <p/> <table border="0" cellspacing="0" cellpadding="4" width="100%"> <tr><th colspan="4">Ratings</th></tr> <tr class="aleft"> <th>Tracks</th> <th>Rating</th> <th>Length</th> <th>File size</th> </tr> <tr class="Dark"> <td>50</td> <td>*****</td> <td>3:29:08</td> <td>287.75 MB</td> </tr> <tr> <td>10</td> <td>****"</td> <td>0:43:33</td> <td>43.82 MB</td> </tr> <tr class="Dark"> <td>374</td> <td>****</td> <td>27:06:23</td> <td>1.9 GB</td> </tr> <tr> <td>1</td> <td>***"</td> <td>0:04:32</td> <td>4.88 MB</td> </tr> <tr class="Dark"> <td>577</td> <td>***"</td> <td>39:35:30</td> <td>3.09 GB</td> </tr> <tr> <td>1259</td> <td>***</td> <td>86:53:09</td> <td>6.4 GB</td> </tr> <tr class="Dark"> <td>398</td> <td>**"</td> <td>43:15:57</td> <td>2.2 GB</td> </tr> <tr> <td>42</td> <td>**"</td> <td>3:08:02</td> <td>338.97 MB</td> </tr> <tr class="Dark"> <td>2</td> <td>**</td> <td>0:09:27</td> <td>8.36 MB</td> </tr> <tr> <td>490</td> <td>**</td> <td>33:41:27</td> <td>2.61 GB</td> </tr> <tr class="Dark"> <td>76</td> <td>**</td> <td>5:43:10</td> <td>678.78 MB</td> </tr> <tr> <td>137</td> <td>*"</td> <td>9:41:32</td> <td>761.67 MB</td> </tr> <tr class="Dark"> <td>7</td> <td>*"</td> <td>0:34:30</td> <td>48.65 MB</td> </tr> <tr> <td>1</td> <td>*</td> <td>0:04:12</td> <td>3.85 MB</td> </tr> <tr class="Dark"> <td>167</td> <td>*</td> <td>11:29:25</td> <td>915.08 MB</td> </tr> <tr> <td>42</td> <td>*</td> <td>3:01:28</td> <td>511.99 MB</td> </tr> <tr class="Dark"> <td>34</td> <td>"</td> <td>2:25:20</td> <td>180.33 MB</td> </tr> <tr> <td>6</td> <td>"</td> <td>0:27:14</td> <td>80.23 MB</td> </tr> <tr class="Dark"> <td>9</td> <td></td> <td>0:29:17</td> <td>32.08 MB</td> </tr> <tr> <td>2</td> <td>0</td> <td>0:05:12</td> <td>5.04 MB</td> </tr> </table> <p/> <table border="0" cellspacing="0" cellpadding="4" width="100%"> <tr><th colspan="4">Ratings played</th></tr> <tr class="aleft"> <th>Tracks</th> <th>Rating</th> <th>Length</th> <th>File size</th> </tr> <tr class="Dark"> <td>445</td> <td>*****</td> <td>28:28:07</td> <td>2.49 GB</td> </tr> <tr> <td>2</td> <td>****</td> <td>0:09:59</td> <td>13.46 MB</td> </tr> <tr class="Dark"> <td>1</td> <td>***"</td> <td>0:04:32</td> <td>4.88 MB</td> </tr> <tr> <td>29</td> <td>***"</td> <td>2:12:56</td> <td>181.09 MB</td> </tr> <tr class="Dark"> <td>36</td> <td>***</td> <td>0:29:02</td> <td>33.18 MB</td> </tr> <tr> <td>3</td> <td>**"</td> <td>0:02:17</td> <td>2.28 MB</td> </tr> <tr class="Dark"> <td>17</td> <td>**</td> <td>0:06:06</td> <td>7.19 MB</td> </tr> <tr> <td>8</td> <td>*"</td> <td>0:02:23</td> <td>2.43 MB</td> </tr> <tr class="Dark"> <td>12</td> <td>*</td> <td>0:04:47</td> <td>4.73 MB</td> </tr> <tr> <td>1</td> <td>0</td> <td>0:01:41</td> <td>924 KB</td> </tr> </table> <p/> <table border="0" cellspacing="0" cellpadding="4" width="100%"> <tr><td style='border-bottom-width:0px'> Generated by <a href='http://www.mediamonkey.com'>MediaMonkey</a> on Sunday, July 29, 2007 at 9:25:59 PM </td></tr> </table> <p/> </body> </html> | ||||
Fixed in build | 1089 | ||||
|
Pavel: Review and fix Scripts\stats.vbs file, there are several SQLs that need to be rewritten in order to comply with MySQL syntax and particularly the new DB structure of MM 3.0 (see mp3consts.pas for DB schema). E.g. in strSQL = "SELECT Count(*) AS CountOfID FROM (SELECT Artists.ID FROM (Artists INNER JOIN Songs ON Artists.ID = Songs.IDArtist) INNER JOIN Played ON Songs.ID = Played.IdSong GROUP BY Artists.ID)" Songs.IDArtist has to be replaced by ArtistSongs.IDArtist (and whole query appropriately modified). |
|
As reported in http://www.mediamonkey.com/forum/viewtopic.php?t=16742, this doesn't work well yet. For me it doesn't freeze, but reports several errors. It seems to be related to the fact that I use it on nearly empty Library, without any played tracks, etc. |
|
This is still reported to not work. Also Case Checker script is reported to not work correctly. I haven't tested neither. |
|
I'm able to generate the report, however, I noticed several errors: 1) Average year appears as: 19307163 2) Average rating is 'bomb'. I suspect that unrated tracks are being included in the averages. They shouldn't be. |
|
Fixed in build 1042. |
|
Verified 1044. |
|
One more issue reported: http://www.mediamonkey.com/forum/viewtopic.php?t=19230. |
|
Fixed in build 1051. |
|
Verified that there aren't any regressions. |
|
Just looked this over more carefully in 1051 and I see that MM reports that I have 3082 genres even though I only have about 70. Also, the 'Played Column' is blank for numerous fields even though I've played many tracks! These include: -Totals > Genres -Totals > Years -Totals > Playlists -Averages > Tracks per Artist -Averages > Tracks per Album -Averages > Tracks per Genre -Averages > Tracks per Year -Averages > Tracks per rating -Averages > Bitrate -Averages > Year |
|
Fixed in build 1052. |
|
Tested in 1054 and several issues remain: 1) Top 10 Albums played. This section of the report seems faulty. For some reason it is showing multiple albums by the same artist, and giving all of them the exact same Time (it looks like the query is based on Artist rather than Album, but I'm not certain). 2) Ratings. This section of the report splits ratings needlessly. i.e. 2-stars is split into several 2-stars sections. 3) Averages - Tracks played per day. This line item shows 1 track played per day even though far more are played. Note: all of these can be seen in the stats.htm file posted within mantis. |
|
2) This is probably caused by ratings on the scale 0-100 that we transform to 5 stars system, i.e. 98, 99 and 100 all are 5-stars and should be grouped together. |
|
Fixed in build 1057. |
|
Tested 1067. A couple of errors remain: -Averages > Tracks per Artist: Figure seems to be calculated incorrectly -Averages > Tracks per Genre: Figure seems to be calculated incorrectly -Averages > Tracks per Rating: Figure seems to be calculated incorrectly -- But we can probably get rid of this statistic altogether. -Top 10 Artists: Lengths are off by 1 minute for most entries -Top 10 Artists played: Lengths are off by 1 minute for most entries -Top 10 Genres: empty Genre shouldn't be listed (since it's not listed for other stats). -Top 10 Genres: some lengths are off by 1 minute -Top 10 Genres play: lengths off by 1 minute -Ratings: lengths don't match what the library shows -- often off by 1 minute, but sometimes by more. Note: could it be that the 'off by 1 minute errors' are related to something else? I tested this by: a) printing the report in MM 2.x b) printing the same report in MM 3.x c) comparing the report in 3.x to the totals indicated in the status bar in 3.x |
|
Raising priority since besides the issues described above, the report is still failing completely in some cases: http://www.mediamonkey.com/forum/viewtopic.php?t=21234 http://www.mediamonkey.com/forum/viewtopic.php?t=21163 Posting the databases to the ftp server, however, when I tested these dbs on my machine with build 1082, the report functioned correctly. Makes me think that it's a database problem, but I don't know... |
|
I tested the 'off by 1 minute errors' and noticed it's related to differences between MS Acces database table values (MM 2.x) and SQLite database table values (MM 3.x). When I tested databases posted to the FTP server, report functioned correctly on my machine, without any problems. Fixed in build 1084. |
|
Here's a note from one of our users--please confirm that your fix resolves this: I think I finally find out what is causing the Statistics report error. The problem is, basically, the decimal separator defined by the system locale. When the decimal separator is "," instead of "." there's a lot of rounding errors in the "Averages" section of report. These errors raise an overflow if there's more than four songs in the library! I used a small library with only four songs to make a few tests. In the attached zip I put this library file, the exported html reports and some screenshots showing what happens when system locale is set to U.S. and when it is set to Portuguese (Brazil). I hope this can help you. BTW, my system is WinXP Pro + SP2, in Portuguese (Brazil), with all updates. I can assure all other MM scripts are working OK, so Windows Scripting Host is not the problem, I think. note: I'm posting the test files to the ftp server. |
|
Fixed in build 1089. |
|
Verified by users b4. |