AdvancedReportModify

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

Moderators: Peke, Gurus

Nebbin
Posts: 316
Joined: Mon May 30, 2005 4:52 am
Location: Australia

Post by Nebbin »

Code: Select all

SQL = "SELECT  Albums.ID,  Artists.Artist, Albums.Album FROM ((Albums INNER JOIN Songs ON Albums.ID = Songs.IDAlbum) INNER JOIN Artists ON Albums.IDArtist = Artists.ID) INNER JOIN Played ON Songs.ID = Played.IdSong WHERE (((Albums.ID)<>0)) GROUP BY Albums.ID, Artists.Artist, Albums.Album ORDER BY Count(Songs.ID) DESC" 
Yeah, I found the section of the script dealing with it, but I haven't a clue what that line represents. Maybe it's the lack of caffeine... or any kind of significant coding experience :) I could take a guess, but that's all it is.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

I think (and I'm not SQL expert) that it adds up the number of times that each of the tracks on the album has been played and ranks them according to that.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.
Nebbin
Posts: 316
Joined: Mon May 30, 2005 4:52 am
Location: Australia

Post by Nebbin »

Thanks Trix. I hadn't thought of that.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

That's correct. The sql counts all times a song has been played on an album and then sums up the individual songs to give the album a playcount.
I see that the statement uses the Played table and I must say that it is a bit unusual to use the data from the Played table to get the playcount since then only songs played in MM will be counted and not any songs played on portable devices. To correct this, replace the existing code with this one:

Code: Select all

SQL = "SELECT Albums.ID, Artists.Artist, Albums.Album FROM Songs, Albums, Artists WHERE Songs.IDAlbum = Albums.ID AND Albums.IDArtist = Artists.ID AND Songs.IDAlbum<>0 GROUP BY Albums.ID, Artists.Artist, Albums.Album ORDER BY Sum(Songs.PlayCounter) DESC"
Kanski, I hope you don't mind?
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
CoRsU
Posts: 345
Joined: Tue Dec 19, 2006 6:23 am
Location: DA-City, Germany

Post by CoRsU »

5 Stars Rating instead of the Albums Art List

How can i change the script that i see all my 5 Stars rated Songs instead of the Album Cover View???

Thx for any Help!!!
CoRsU
Nebbin
Posts: 316
Joined: Mon May 30, 2005 4:52 am
Location: Australia

Post by Nebbin »

Hmmm... doesn't summing up individual track playcounts bias the rating towards multi-artist albums? (ie those with large numbers of tracks per CD.) This seems to be especially the case in larger collections where you don't get to play one album very many times. I was wondering why so many of my Ministry of Sound cd's were in the list.

Is there a way to make this an average instead? Would an average even work?

EDIT: Oops, that idea would probably bias towards CD singles... :( Forget it then. I think I'll just "put up with" the current system :)
adamski99
Posts: 4
Joined: Wed Jan 03, 2007 7:29 am

Post by adamski99 »

Help, I get this error after installing and running from MM

Erro #5 - Microsoft VBscript runtime erro
Invalid procedure call or argument: 'AscW'
File: "C:\Program Files\MeddiaMonkey\ARModify.vbs", Line 681, Column:4

Then the next dialogue:

error happened during script execution:
Invalid procedure call or argument: 'AscW'

Am I doing something silly?
adamski99
Posts: 4
Joined: Wed Jan 03, 2007 7:29 am

Post by adamski99 »

Anyone, please?

Is this thread dead?
raven096
Posts: 7
Joined: Sun Feb 12, 2006 2:50 pm

Feature request?

Post by raven096 »

How hard would it be to add the option of picking a 'date from' for the new albums? Hopefully no one has requested this, I hate to read and there were alot of previous post here. sorry.

Basically what I'm asking is instead of asking for the number of new albums to list how about using a date format to select from. I don't know about anyone else but I don't always keep track of the exact number of albums added but I have a pretty good idea when I added stuff.
WantedToThank

Post by WantedToThank »

Thanks for that fantastic script !! Although it seems dead, it is one of my preferred ones
MCSmarties
Posts: 251
Joined: Tue Dec 06, 2005 8:01 pm

Is development on this script definitely dead?

Post by MCSmarties »

Hi,

Seems to me that this thread has become awfully quiet. KanSki, are you still around?

I would love to see an enhanced version of this script but before I start meddling with it myself (with my extremely modest scripting skills), I'd like to know if there isn't already extensive development being done behind the scenes...
kanski
Posts: 80
Joined: Fri Mar 10, 2006 11:18 am
Location: Russian Fed.
Contact:

Post by kanski »

MCSmarties wrote:Is development on this script definitely dead?
yes
Hooah
Posts: 147
Joined: Sun Aug 13, 2006 6:30 pm

Post by Hooah »

I'm sad now.
wokou
MCSmarties
Posts: 251
Joined: Tue Dec 06, 2005 8:01 pm

Post by MCSmarties »

Awww... :cry:

Well, thanks for letting us know anyway.
So, who else is interested in continuing development?

I have several ideas but while I can start to tinker with the script, I'm sure I will need more than a little help to get any modifications I have in mind to work!
MCSmarties
Posts: 251
Joined: Tue Dec 06, 2005 8:01 pm

Post by MCSmarties »

I am very interested in the future of this script but am seriously lacking in skills to continue tweaking it on my own. I did manage to fix a little bug that has been bothering me (see bottom of this post) but am ashamed to say that after spending literally hours poring over the code, I couldn't figure out how to make the changes and additions I wanted.

So, who wants to help, since kanski has no further plans to continue development on this?

While I wouldn't refuse ready-made solutions ;-) , what I am really looking for is some help to get me started on my issues. I am afraid that I must not understand how this script works at a fundamental level... :cry:
Please PM me if you are willing to help!

Anyway, I'm posting my "wishlist" below. I divided it into 3 'priorities', sorted not only by what I would like to have fixed or improved first but also by (to my naive eye perhaps) increasing complexity.

Other thoughts, additions, comments would be most welcome, thanks!

BUGS
- at least for me (see my report here), the Content menu doesn't work using Internet Explorer. Is this a bug or did I do something wrong? Both style.xls and style_IE.xls are uploaded.

- Content pages starting with non-standard characters (for example Ç, Ö, Ü...) give a 404 error even though they appear in the drop-down menu

- table widths should depend on the available window size/resolution
(if the browser window is maximized, the tables should take up all available space, not be remain 'squished' into the top left corner)

ADDITIONS

PRIORITY 1
- add active links for Genre and Year when added to track view
(leading to the 'Albums by (Genre)' and 'Albums by (Year)' tables)

- add fields that exist in the track mask also to the album mask, particularly <Album Artist>, <Custom 1>, <Custom 2>, <Custom 3> (use some 'averaging method' for the custom fields, similar to the one used for 'Genre')

- add <Original Year> to track mask


PRIORITY 2
- an option to make individual 'album by field' pages for the <Custom> fields (like the existing Albums by Genre and Albums by Year) and add links to them in both the Albums pages and Tracks pages

- merge <Year> and <Original Year> for the 'Years' statistics and 'Year' pages (so you can view all albums "related to" a particular year regardless whether that year is used in a <year> or <original year> tag)


PRIORITY 3
- make separate tabs for 'TOP 10' statistics and 'Total' statistics (instead of just one statistics page)
Ex:
'TOP 10' tab would contain 'TOP 10 Albums, TOP 10 Artists, TOP 10 Years...
'Total' tab opens a drop-down menu (like the 'content' tab) with links to a table with ALL years, one with ALL genres, one with ALL albums (Albums Art list) etc...

- add the option to make individual pages for EACH song, accessible by clicking on the track title.
These pages would contain most importantly the comments and lyrics for that song, but also the fields in MMs 'detail' view (composer, lyricist, original artist...)

I'm aware the challenge will be to keep the size of these pages as small as possible (using plain TXT maybe?) to keep the overall report size manageable!

- make the script compatible with MM3. I'm particularly thinking about a way to support the upcoming multiple entry fields (artists, genres, albums...)

So there you are, these are my grand plans ;-)

The one thing I did manage to fix (after taking a hard look at the Magic Nodes script for inspiration) was the missing 'custom fields' information. Currently, the script displays "custom 1" etc. instead of the NAME of these fields (as entered in the Mediamonkey options).

Custom Field names fix

First, add the following function:

Code: Select all

Function CN(i)
	CN = SDB.IniFile.StringValue("CustomFields","Fld" & i & "Name")
End Function
Then search and replace all instances of "Custom 1 Name", "Custom 2 Name", "Custom 3 Name" with CN(1), CN(2), CN(3) respectively, for example:

Code: Select all

CreateStatisticTable SQL, "TOP 10 Custom 1 Name", "Custom 1 Name"
becomes

Code: Select all

CreateStatisticTable SQL, "TOP 10 " & CN(1), CN(1)
Finally, replace in the tracks table:

Code: Select all

    gettrack = Replace(gettrack,"<Custom 1>","<td>Custom 1</td>")

    gettrack = Replace(gettrack,"<Custom 2>","<td>Custom 2</td>")

    gettrack = Replace(gettrack,"<Custom 3>","<td>Custom 3</td>")
with

Code: Select all

    gettrack = Replace(gettrack,"<Custom 1>", "<td>"&CN(1)&"</td>")
    gettrack = Replace(gettrack,"<Custom 2>", "<td>"&CN(2)&"</td>")
    gettrack = Replace(gettrack,"<Custom 3>", "<td>"&CN(3)&"</td>")
Post Reply