Split Artist Title 2.0 [MM2]

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Split Artist Title 2.0 [MM2]

Postby trixmoto » Tue Feb 21, 2006 11:48 am

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE
trixmoto
 
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK

Postby Bex » Tue Feb 21, 2006 12:47 pm

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
Bex
 
Posts: 6316
Joined: Fri May 21, 2004 5:44 am
Location: Sweden

Thanks very much - minor quibbles, bugs

Postby SlasherMCT » Wed Nov 01, 2006 7:07 am

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

Postby trixmoto » Wed Nov 01, 2006 7:50 am

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE
trixmoto
 
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK

Postby SlasherMCT » Wed Nov 01, 2006 7:56 am

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

Postby trixmoto » Wed Nov 01, 2006 8:15 am

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE
trixmoto
 
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK

Postby Guest » Thu Nov 02, 2006 11:20 pm

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

thanks
Guest
 

Postby sperk » Fri Nov 03, 2006 2:38 pm

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
sperk
 
Posts: 90
Joined: Wed Oct 11, 2006 1:52 pm

Postby trixmoto » Fri Nov 03, 2006 3:04 pm

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE
trixmoto
 
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK

Postby trixmoto » Tue Nov 07, 2006 1:47 pm

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE
trixmoto
 
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK

Postby SlasherMCT » Wed Nov 08, 2006 2:04 am

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

Postby trixmoto » Wed Nov 08, 2006 11:49 am

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE
trixmoto
 
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK

Postby SlasherMCT » Wed Nov 08, 2006 3:24 pm

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

Postby trixmoto » Thu Nov 09, 2006 4:36 am

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.
Send me BTC: 34VQPVsf9mCeR4nfhFvvBYZqQ7LkqNZ8Mn
Send me LTC: 3P1mzrfbyscdhbxRpXLgKz7tufGAU3SrEG
Send me DOGE: 9xPpYSqgF7P5yQiqvE1VqWb4UjxVCCLFJ6
Check out these great cryptocurrency faucets... BTC / LTC / DOGE
trixmoto
 
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Barton, UK

Postby Guest » Sat Nov 11, 2006 3:32 pm

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
Guest
 

Next

Return to Need Help with Addons?

Who is online

Users browsing this forum: Google [Bot] and 27 guests