Split Artist Title 2.0 [MM2]

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:

Split Artist Title 2.0 [MM2]

Post by trixmoto »

Often FreeDB returns a compilation album with the Artist field as "Various" and the Title field with Artist - Title. This script is designed to fix this into Artist, Title and Album Artist.

If you find you have Title - Artist then you can use the swap variables to automatically fix this too!

:o NEW VERSION BELOW :o
Last edited by trixmoto on Tue Feb 19, 2008 4:23 am, edited 4 times in total.
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.
Bex
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Post by Bex »

Thank you, thank you, thank you!
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
SlasherMCT
Posts: 38
Joined: Tue Oct 31, 2006 7:23 pm

Thanks very much - minor quibbles, bugs

Post by SlasherMCT »

Hi - Nice script although I have found a couple of problems because my title fields contain title - artist.

1. I wasn't sure what to do with these lines, and I ended up with this
SwapFirst = false '(*) Swap artist and title field first?
SwapLast = true '(*) Swap artist and title field last?
- this works in the end but the preview screen still shows them the wrong way round

2. If you use swapfirst then the preview screen doesn't show at all and the script just swaps stuff around immediately.

3. Although it works the script leaves a trailing space in the title field - I think it would be best if resulting fields are stripped - as when I try to reorganise afterwards I get a space before the ".mp3" in the filename.

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

Post by trixmoto »

Blimey, I haven't used this script in a while! I'll take a look at it and see what I can do to improve 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.
SlasherMCT
Posts: 38
Joined: Tue Oct 31, 2006 7:23 pm

Post by SlasherMCT »

I don't suppose it is possible to put a radio button in the presented dialog to choose which way the split is done?

(Pushing my luck)

:D

or possible a way of calling the script with a flag so that the same script can support both options from the ini file?

Thanks a lot - I'll hang off updating my VA's for a while - if you would like help testing I'll be glad to assist ...
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Well you could make a copy of the script, and a copy of the INI entries, and have the parameters set differently in each. I will have a look at improving this though.
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.
Guest

Post by Guest »

What can you do if the format is Artist / Song (not Artist - Song)?

thanks
sperk
Posts: 90
Joined: Wed Oct 11, 2006 1:52 pm

Post by sperk »

trixmoto wrote:Open the script file (.vbs) in a text editor and find line 61...

Code: Select all

pos = InStr(itm.title," - ")
Replace this with the following line...

Code: Select all

pos = InStr(itm.title," / ")
Thanks, worked like a charm. Great tool! :D
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

Open the script file (.vbs) in a text editor and find line 61...

Code: Select all

pos = InStr(itm.title," - ")
Replace this with the following line...

Code: Select all

pos = InStr(itm.title," / ")
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:

Post by trixmoto »

I've had a proper look at this and now fully understand the SwapFirst and SwapLast variables.

The script always splits the Title field, so SwapFirst can be set to True if the values to be split are in the Artist field (as these will be swapped into the Title field before splitting).

The script assumes it is "<Artist> - <Title>", so if it is the other way round then you can set SwapLast to True to swap them round after splitting.

I am currently rewriting the script almost completely, and in the new version these variables will not exist. Might help you for now though! :)
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.
SlasherMCT
Posts: 38
Joined: Tue Oct 31, 2006 7:23 pm

Post by SlasherMCT »

Thanks for re-writing. May I suggest you design it so that the separator can be in a variable or passed in to handle separators like "-" or "/"

I'll wait for the rewrite - cheers
trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Post by trixmoto »

New version (2.0) is now available from my website. Changes include...

- Fixed HTML written directly to document
- Removed album artist (would normally we "Various")
- Added delimiter option
- Added artist and title fields trimmed
- Added options on the confirmation screen

Please let me know what you think of the new 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.
SlasherMCT
Posts: 38
Joined: Tue Oct 31, 2006 7:23 pm

Post by SlasherMCT »

Ooooh that works a charm - I was a bit stupid at first and didn't realise that I need to press Split again after swap, but now I have that taped it works a treat.

You are a god of scripting and I salute you!

I also picked up your preview script which is really useful too.

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

Post by trixmoto »

I'm glad you like! :D
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.
Guest

Post by Guest »

trixmoto wrote:Open the script file (.vbs) in a text editor and find line 61...

Code: Select all

pos = InStr(itm.title," - ")
Replace this with the following line...

Code: Select all

pos = InStr(itm.title," / ")
hi,
I've got a new wrinkle: artist/title with no space. I tried "/" in the above mentioned line but it didn't work.
thanks
Post Reply