Combine Albums 3.2 - Updated 26/12/2012

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

Moderators: Peke, Gurus

pietzke
Posts: 161
Joined: Sun Sep 25, 2005 7:43 am

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by pietzke »

I used that script quite a while ago and found it very useful. But since my library was growing I got a question:

Is it possible to convert AbumName (CD1) into AbumName and Disk="CD1" ?
I like to have the CD1 in the Disc# field instead of just the number, what gives a better overviev in gig Track lists with many columns.
Is the script working with MM4?

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

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by trixmoto »

I can't see any reason why this script wouldn't work in MM4, but I haven't explicitly tested it. Please let me know if you have any problems.

You could easily modify the script to add "CD" in front of the disk number if you wanted to.
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.
pietzke
Posts: 161
Joined: Sun Sep 25, 2005 7:43 am

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by pietzke »

Ok, it seems to work in MM4.
trixmoto wrote:You could easily modify the script to add "CD" in front of the disk number if you wanted to.
Well, good to know that it's easily possible, but actually I haven't got a clue of coding and scripting at all. I had a quick look through the code but I wouldn't really know what to change in there :-?. So if you plan to release another version of the script, maybe you could add that to the whishlist. Would be great to see that implemented. Thanks alot!
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by trixmoto »

Open the script file in a text editor. Replace line 147...

Code: Select all

itm.DiscNumber = disc
...with...

Code: Select all

itm.DiscNumberStr = "CD"&disc
Then replace line 155...

Code: Select all

itm.DiscNumber = Int(Left(s,1))
...with...

Code: Select all

itm.DiscNumberStr = "CD"&Int(Left(s,1))
That should do 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.
pietzke
Posts: 161
Joined: Sun Sep 25, 2005 7:43 am

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by pietzke »

Thank you very much, that modification does exactly what I was looking for. Great work, makes me happy :)
andig
Posts: 100
Joined: Thu Jul 29, 2004 2:15 am

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by andig »

Hello Trixmoto, hello all,

I've made yet a few more enhancements to the CombineAlbums script in a way that it now supports disc numbers > 9 as well.

As development seems to have slowed down a little I was wondering if it wasn't time to start hosting all the interesting scripts at GitHub. Should anybody be interested- especially Trixmoto- I've started a repository at https://github.com/andig/mediamonkey and would be happy to contribute.

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

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by trixmoto »

If you want to send me the modifications you've made, I'll take a look at adding them into the next version.
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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by trixmoto »

andig wrote:I've made yet a few more enhancements to the CombineAlbums script in a way that it now supports disc numbers > 9 as well.
I've taken a look at this, and can see that you've also taken out the code that attempts to handle discs as letters as well (A,B,C...) - was that deliberate?
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.
andig
Posts: 100
Joined: Thu Jul 29, 2004 2:15 am

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by andig »

No- I probably didn't recognize this.

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

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by trixmoto »

Ok, I'll see if I can combine the two :) Also, you've changed the regular expressions, but these aren't really my strong suit - do you remember what you changed and why?
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.
andig
Posts: 100
Joined: Thu Jul 29, 2004 2:15 am

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by andig »

trixmoto wrote:Ok, I'll see if I can combine the two :) Also, you've changed the regular expressions, but these aren't really my strong suit - do you remember what you changed and why?
Honestly they didn't match my local version and I had no clue where those changes came from (looked like artifacts). Feel free to change them back but please check if the matching brackets where moved and different array indexes of the matches are used further on.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Combine Albums 3.0 - Updated 11/01/2010

Post by trixmoto »

Ok, cheers.
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.
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Combine Albums 3.1 - Updated 16/09/2012

Post by trixmoto »

New version (3.1) is now available to download from my website. I have fixed disc numbers larger than 9, thanks to andig.
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.
andig
Posts: 100
Joined: Thu Jul 29, 2004 2:15 am

Re: Combine Albums 3.1 - Updated 16/09/2012

Post by andig »

Will check asap- thank you!
andig
Posts: 100
Joined: Thu Jul 29, 2004 2:15 am

Re: Combine Albums 3.1 - Updated 16/09/2012

Post by andig »

Hi Trixmoto,

unfortunately you're updated 3.1 doesn't seem to contain the necessary changes and gives me errors. Only did a quick check but process1..3 need to look like this:

Code: Select all

' 1. AlbumName (CD 1) -> AlbumName and Track=1##

Sub process1(itm, albumname, disc)
'	msgbox("proc1 "&albumname&" "&disc)
  disc = CInt(disc) * 100

  Do While itm.TrackOrder > 100
    itm.TrackOrder = itm.TrackOrder - 100
  Loop

  itm.AlbumName = albumname
  itm.TrackOrder = disc + itm.TrackOrder
End Sub


' 2. AlbumName (CD 1) -> AlbumName and Disc=1

Sub process2(itm, albumname, disc)
'	msgbox("proc2 "&albumname&" "&disc)
  disc = CInt(Left(disc,Len(disc)-2))

  itm.AlbumName = albumname
  itm.DiscNumber = disc
End Sub


' 3. Track=1## -> Disc=1 and Track=##

Sub process3(itm,c)
  Dim s : s = itm.TrackOrderStr
  If Len(s) > 2 Then
    c = c + 1
    itm.DiscNumber = Int(Left(s,Len(s)-2))
    itm.TrackOrder = Int(Mid(s,2))
  End If
End Sub
Post Reply