Just List Albums 2.1 - Updated 17/03/2013

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

Moderators: Peke, Gurus

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by trixmoto »

You need to open the script file in a text editor and then look at the top.
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.
ClassicRockJunkie
Posts: 13
Joined: Wed Jul 20, 2011 2:19 pm

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by ClassicRockJunkie »

Strange results in my output of the list.

I have elected to list the artist/year/Album/Genre. Two things happen whened I ran the report.

First is illustrated with this copied from the text file, on several albums it is giving a date with a long decimal string. Yet when I check the album it shows up as a completely different and correct album date. In the example the correct date and the one stored in the properties under MM is 1975 not 1985.333333333333:

Aerosmith - 1985.33333333333 - Aerosmith - Classic Rock (24/8)
Aerosmith - 2005 - Aerosmith - Gold - Classic Rock (33/34)
Aerosmith - 1973 - Aerosmith [1993 SBM Remaster] - Classic Rock (7/8)
Aerosmith - 1993 - Aerosmith's Greatest Hits - Classic Rock (10/10)
Aerosmith - 1994 - Big Ones - Classic Rock (34/16)
Aerosmith - 1973 - Box of Fire - Classic Rock (1/1)
Aerosmith - 2010 - Classics Live - Classic Rock (5/7)
Aerosmith - 1987 - Classics Live 2 - Classic Rock (8/8)
Aerosmith - 1987 - Classics Live II - Classic Rock (8/8)

Also, is it possible to have the report sort by artist then year and not artist/album? ... not a big deal just a preference to keep the albums chronological for each artist.

The other thing I am not understanding is why throughout my list I get compilation albums. Why would they not be listed just one time under Various in alpha order instead of showing up through out the list? I am assuming this entry reflects two tracks by The Allman Brothers Band that are on the compilation albums. Is there anyway to have them show up in the appropriate area or perhaps have the compilation albums listed after all regular albums? The way this works now I am getting Sounds of the Seventies - 1978 showing up about 19 times in my list (once for each of the track artists).

Alice In Chains - MTV Unplugged - 1996 - Alice In Chains - MTV Unplugged - Rock (13/13)
Various - 1990 - Sounds Of The Seventies - 1978 - Jazz, Rock (17/20)
Various - 1993 - Sounds Of The Seventies - AM Top Twenty - Rock (22/22)

The Allman Brothers Band - 1989 - Dreams (CD1) - Southern Rock (17/17)
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by trixmoto »

The date definitely shouldn't be displaying with a recurring decimal (or any decimal places for that matter) but it looks like you must have a track in the album which is not marked as 1975, which is was is causing the discrepancy.

I don't think it would be easy to sort by artist and then year, as there's no API method for that currently, but not impossible.

This script asks MM for a list of all albums using the API methods, so if all the tracks from an album are appearing, it's because MM thinks each one is a separate album. To rectify this you could try selecting all of the tracks and updating the album artist and album name at the same time, this should convince it. There's also a fix option in the File menu somewhere to fix multi-artist albums, I think.
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.
ClassicRockJunkie
Posts: 13
Joined: Wed Jul 20, 2011 2:19 pm

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by ClassicRockJunkie »

Thanks, I will take a look at the Compilation album. I know that in that particular ablum the track artists are all different though one is on two tracks of the 19 or so. Album artist is set to Various. A work around may be to put the album artist into the track name.

Example: o4 More Then Feeling By Boston.flac

That would allow both artist and album-artist to be various. Many of my compilation albums have that style in the tracks already.

Keeping the albums in chronological order would be nice, but not a big deal that it is not doable. I may play around with doing a CSV report, import to excel and then work some sort queries/if statements to possibly sort it as I would like. Heck it's probably more trouble then all that would be worth. I did check and all the tracks have the correct date of 1973 yet some how in the report it has 1985.3333333 that makes no sense. I have the original CD and a Remastered it is the original that the date is showing up incorrectly. The date is taken from the Properties field isn't it? Meaning if I pull up properties for the tracks and they each say 1973 that is the date that should display.

I am knew to MM and your scripts, but so far I am impressed with both. I will ask though why not a Albums list version of the Custom Reports. It's so much easier to just select the options in custom reports - not that modifying the script is hard, just easy to play around and see which way it works best. Just a thought for the future. More work for you and less for us neophytes ... LOL Thanks again for your prompt reply and great work.
ClassicRockJunkie
Posts: 13
Joined: Wed Jul 20, 2011 2:19 pm

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by ClassicRockJunkie »

trixmoto wrote:The date definitely shouldn't be displaying with a recurring decimal (or any decimal places for that matter) but it looks like you must have a track in the album which is not marked as 1975, which is was is causing the discrepancy.

I don't think it would be easy to sort by artist and then year, as there's no API method for that currently, but not impossible.

This script asks MM for a list of all albums using the API methods, so if all the tracks from an album are appearing, it's because MM thinks each one is a separate album. To rectify this you could try selecting all of the tracks and updating the album artist and album name at the same time, this should convince it. There's also a fix option in the File menu somewhere to fix multi-artist albums, I think.
I think I have found the problem on the compilation albums showing up as they do. The compmask only works with the artist not the album artist. So when the artist is not Various, but is the actual track artist the script picks up each artist and track as a separate album based on the API method which causes the track to be listed under the track artist rather then a single listing of the comp album - with 19 artists for the 20 tracks you get 19 line items. It does this and then displays the Album Artist and Album name as the script instructs it to do. Either that or I am missing something and it is supposed to be able to ignore the track artists and only list the album artist?

NOTE: Mask and CompMask variables can include fields... <Artist><Album><Year><Rating><Length><Tot><Max><Discs><Bitrate>
' <Line><Genre><Comment>
' TrackMask variable can include: <Track#><Artist><Title><Album><Album Artist><Genre><Year><Bitrate><BPM><Composer>
' <Custom 1><Custom 2><Custom 3><Filename><Length><Rating><Custom 4><Custom 5><Disc#>
' <Comment><Line><Playcount>


tot = getval(iter,"vTot")
max = getval(iter,"vMax")
art = itm.AlbumArtistName
alb = itm.AlbumName
comp = False

By my thinking it should be if album artist = "Various" then it would list the album as "Various - Songs of the Seventies Vol. 1". But it appears to use the artist for the track which fools the script into thinking there are 19 albums, by 19 artists. If I understood your suggestion it would be to make both the artist and album artist read various - but if that is what you mean it defeats the purpose of having an album artist and the track artist.

Here is what I am using currently for the report:

Dim Mask : Mask = "<Artist> - <Year> - <Album> - <Genre> (<Tot>/<Max>)" 'mask for artist albums
Dim TrackMask : TrackMask = "" 'blank mask means no tracks are displayed
Dim CompMask : CompMask = "<Artist> - <Year> - <Album> - <Genre> (<Tot>/<Max>)" 'mask for compilation albums
Dim FirstMask : FirstMask = "" 'mask for first track in an album


Did I miss a step or doing something that is causing it not to see the compilations properly? In my library compilation albums have album artist set to various and then artist is used to name the track artist which gave me the results of 19 line items for the 19 track artists.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by trixmoto »

You've already highlighted the line of code which shows that for album masks <Artist> refers to the album artist name, so I'm not really sure what you're asking me. :-?
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.
ClassicRockJunkie
Posts: 13
Joined: Wed Jul 20, 2011 2:19 pm

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by ClassicRockJunkie »

trixmoto wrote:You've already highlighted the line of code which shows that for album masks <Artist> refers to the album artist name, so I'm not really sure what you're asking me. :-?
I'm asking that since the track artist is different for each track that's why the script is listing each track as a separate album, is there a way to change one of the flags to stop that. As I understand it with each track having a seperate Artist while having Album Artist of various the result will be each a line item of Various mixed in with the albums for that artist ...

the track by Aerosmith results in the line in the report that says:
"Various - 1990 - Sounds Of The Seventies - 1975 - Classic Hard Rock, Rock, Southern Rock (17/20)"

The only way to stop it from listing each track as a separate album would be to change the artist to also have the value "various". Which defeats the intended purpose of Artist and Album Artist, so either accept the extra listings or put the artist name in the title rather and change artist to various. There is no way to show the script that it is a compilation and to only list the album one time. If there is a way to do it I am not understanding what needs to be different and would appreciate any guidance.

Thanks.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by trixmoto »

No, that's not the reason. As previously stated, the reason is that MM thinks they are different albums.
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.
ClassicRockJunkie
Posts: 13
Joined: Wed Jul 20, 2011 2:19 pm

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by ClassicRockJunkie »

Faulty logic by MM based on Artist rather then Album Artist. No problems I have figured out my work around - it's not ideal, but I don't add compilations all that often so once I fix the ones I have already it will be easy going forward. Again you were very prompt with your reply and for something you give away ... well done sire well done.

I will indeed make a contribution soon for your efforts. End of the month and all that requires I wait a few weeks, but from what I see you make MM far more useful then it was already and that was pretty darn good as well.

Thanks
ClassicRockJunkie
Posts: 13
Joined: Wed Jul 20, 2011 2:19 pm

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by ClassicRockJunkie »

trixmoto wrote:You've already highlighted the line of code which shows that for album masks <Artist> refers to the album artist name, so I'm not really sure what you're asking me. :-?
Trixmoto ...

Some very strange things are happening. As previously mentioned several albums have erroneous dates.

example: Aerosmith - 1985.33333333333 - Aerosmith - Classic Rock (24/8)

I checked and the date in the tag for each track is 1973 yet it comes out as 1985.3333333333333

Second issue is the entry for Various ... I went to do my work around on the files only to find that the files for Sounds of the Seventies no longer exist. I had retagged them and the album is no longer on my hard drive with that name.

So at that point I decided to start fresh. I cleared the library for MM removing all files from the DB. Then I reloaded my classic rock albums, but without the compilation albums as I moved those to another directory. Yet after the reloading both errors returned. Clearing should have cleaned the DB completely. I did close out MM and restart before I reloaded the albums/tracks.

Any thoughts?

Thanks
ClassicRockJunkie
Posts: 13
Joined: Wed Jul 20, 2011 2:19 pm

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by ClassicRockJunkie »

Really surprised that not even the courtesy of a reply even if it was to say sorry no idea. MM shows the files correctly under the Album title and under various when looking up the artist for compilation albums with the album artist set to various. Yet you claim that MM sees the tracks as different albums - then why only one entry under album title in MM and not individual entries? Secondly as mentioned in the previous post the album Sounds of the Seventies was changed when the tags were corrected. Despite there no longer being a listing for "Sounds of the Seventies" the script still lists the tracks and compounds it by listing it 19 times once for each track. The script should not be picking up albums that no longer exist. There were a couple of others that were renames when the tags were fixed and the same error of listing them via the old album in the report, but not when viewing albums in MM exists. It makes no sense that the script report would still pick up old albums no longer on the disk. I did not reload them into the DB when I cleared the files. I purposely left them out and had moved them to a separate HD to make sure they were not picked up accidentally.

Finally is the error for date on several albums that have a date with a decimal and 5-6 numbers right of the decimal. The albums have been checked and the tracks all are dated with the same year. They were not dated with a different year in any tracks as you thought might have caused it - which made sense if it adds the years and divides by tracks to get the "date" rather then taking the date from the date field or returning an error because of a track not being the same as the others. Unfortunately the dates were all set properly yet there is an error. It seems logical to me that the date field should be four spaces and no decimals in the output. I guess I will have to try to sort out how the date is picked up from MM DB. Having a false value result is a problem.

Even clearing the db and reloading did not clear the errors when I run the script. I really would appreciate some type of guidance as to why even after running the clear DB function in MM the results could still be picked up upon reload of the music files. Is there some other step besides running "clear" that needed to be done in order to start fresh?
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by trixmoto »

I'm sorry that you feel that I have not responded to you promptly enough, and that I am obligated to support every script I have written despite the fact that I have a lot going on in my life right now, which leaves me with no time for scripting at the moment.

I loop through all of the tracks and ask MM for the album ID (list.Item(i).Album.ID) and I output a line for each unique ID. The script does not magically pull albums out of the air, it simply uses the API to ask MM for details. When it comes to calculating the album year, I retrieve all of the tracks using the album ID and take an average of the year values.

If you feel this script does not meet your needs, feel free to modify it as you see fit, or stop using it.
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.
ClassicRockJunkie
Posts: 13
Joined: Wed Jul 20, 2011 2:19 pm

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by ClassicRockJunkie »

trixmoto wrote:I'm sorry that you feel that I have not responded to you promptly enough, and that I am obligated to support every script I have written despite the fact that I have a lot going on in my life right now, which leaves me with no time for scripting at the moment.

I loop through all of the tracks and ask MM for the album ID (list.Item(i).Album.ID) and I output a line for each unique ID. The script does not magically pull albums out of the air, it simply uses the API to ask MM for details. When it comes to calculating the album year, I retrieve all of the tracks using the album ID and take an average of the year values.

If you feel this script does not meet your needs, feel free to modify it as you see fit, or stop using it.
I waited a week for a reply and had seen you reply in other threads for your other scripts. So yes after a week I became frustrated with your lack of response. I've stated it as clearly as I can state it the album is no longer there under the album name that is showing up. As for the averaging I understood that is what it's doing, but despite the tracks all having the same date it's coming up with a bogus average.

Since using the clear DB that comes with MM did not resolve the issue something strange is going on. It's more then a little frustrating to know that the tags are correct on the date and that the album is not there yet someone MM is telling the script it is. If I can figure out what is causing it I will let you know.

I have found something interesting and no idea why.

Here is the output for one of the albums that the date is showing a bogus number:

Aerosmith - 1985.33333333333 - Aerosmith - Classic Rock (24/8)

It appears to be saying there are 24 tracks out of 8. As if it somehow is looping through the album 3 times. There may have been a mp3 copy and perhaps a different file type (flac/ape) - currently there is just a flac rip of the album. Any idea why MM would still have the old data since it was cleared and reloaded with just the 8?

Here is the same album as reported by the Custom Album report script. AlbumArtist/Album/Date/Genre/Title ... this script picks up the information correctly:

Aerosmith Aerosmith 1973 Classic Rock Make It
Aerosmith Aerosmith 1973 Classic Rock Somebody
Aerosmith Aerosmith 1973 Classic Rock Dream On
Aerosmith Aerosmith 1973 Classic Rock One Way Street
Aerosmith Aerosmith 1973 Classic Rock Mama Kin
Aerosmith Aerosmith 1973 Classic Rock Write Me
Aerosmith Aerosmith 1973 Classic Rock Movin' Out
Aerosmith Aerosmith 1973 Classic Rock Walkin' The Dog
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by trixmoto »

I think you'd need to run some SQL commands on your database to determine if there are extra entries in the Songs or Albums tables. Alternatively there is something wrong with my SQL command in the script, but from what I recall it's a rather simple one with little room for error (no complex joins or anything, which I always struggle with). Do you know SQL at all?
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.
ClassicRockJunkie
Posts: 13
Joined: Wed Jul 20, 2011 2:19 pm

Re: Just List Albums 1.8 - Updated 27/02/2011

Post by ClassicRockJunkie »

By the way I do apologize as I realize my comment came across way harsher then I meant it to. While I'm frustrated by whatever is causing this there are far more important things in your life and in mine then these erroneous line items. I do hope you will accept my sincere and humble apology I used a terrible choice of wording rather then simply asking politely for any thoughts. I've been working long hours in crazy heat and then dealing with this and other things late into the night ... a terrible combination and no excuse for how I worded the early post.

I am very rusty on SQL, but I can probably manage to run some queries to test the db. I won't complain if you have any suggestions in that area. I also have a good friend who I will ask as I am pretty sure he knows SQL well. If you think it would help the community to run some tests I'm happy to do so. Otherwise I may just do a clean install of the O/S (going to do that before upgrading to Win 7 on the media machine) and then MM after I go through and clean up some tag/duplicate errors that are still there. One thing I have caught thanks to this report and looking at it in more depth is there are still several albums where I have mp3s and lossless versions - dates have been right on those so far. Then you add in the original and remastered albums that have the same album name different dates ... tag work is needed. Yet the DB appears to be holding an old value even after the tags are fixed.

For now I have pulled all compilations from the MM library yet they still show on the report. Based on that and having run the clear routine after I did that and not rescanning the compilations it has to be caused by MM retaining the info in the DB even when the files are deleted from the library. It is just weird that they do not show up when I click on album under the MM tree yet they do in the report.

It has to be the DB because as you wrote the report to do all it does is query the DB within MM. I should have realized that much sooner. DOH!
Post Reply