Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby tooone7 » Sun Oct 16, 2011 4:56 am

tommycrock wrote:
tooone7 wrote:Or perhaps show the SQL you use to do the leading zero checking :)

With a bit of help I'd be happy to try modifying this script.


Hi Tommycrock,
I found a temporary solution if you're interested.

Get the SQLViewerScript created by Bex.

Go to Tools->Scripts->SqlViewer
Then you can paste the following SQL Query in the textfield and click the "Execute DDL/DML Statement" button.

Here's the SQL for changing the SeasonNumber:
UPDATE Songs SET SeasonNumber = "0"||SeasonNumber WHERE (SeasonNumber != "" AND SeasonNumber NOT LIKE "0%" AND SeasonNumber < 10);

And for the EpisodeNumber:
UPDATE Songs SET EpisodeNumber = "0"||EpisodeNumber WHERE (EpisodeNumber != "" AND EpisodeNumber NOT LIKE "0%" AND EpisodeNumber < 10);

It worked for updating my Episode numbers (a few were skipped) but it moslty failed when running it on the Season numbers. I guess it is because it is not a number field but a text field so you cannot check for something "less than 10" (< 10).

I guess you can run the following query:
UPDATE Songs SET EpisodeNumber = "01" WHERE EpisodeNumber = "1";

and repeat that 9 times, each time incrementing the number. So "01" becomes "02" and = "1" becomes "2".

I think I'm going to do that now, it's faster than selecting everythin in the viewer and updating it.

Please make a backup of your database first! :)
Here's a nice script by Trixmoto: Backup
tooone7
 
Posts: 39
Joined: Tue Jan 04, 2011 7:17 am

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby tommycrock » Mon Oct 17, 2011 6:29 am

Thanks for that, although looking at it it's to add a leading zero, I'm wanting to delete them. Got any SQL for that?
tommycrock
 
Posts: 210
Joined: Sat May 21, 2011 9:13 am

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby tooone7 » Mon Oct 17, 2011 9:30 am

Will figure something out when I get home. :)
tooone7
 
Posts: 39
Joined: Tue Jan 04, 2011 7:17 am

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby Vyper » Tue Oct 18, 2011 5:45 am

The options for this script allows you to remove the leading zero instead of adding it. Will that do what you want?

I don't have MM4 installed yet so I don't have a way of checking it myself.
Stop Button Freak
Vyper
 
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby tooone7 » Wed Oct 19, 2011 11:28 am

tommycrock wrote:Thanks for that, although looking at it it's to add a leading zero, I'm wanting to delete them. Got any SQL for that?


Sorry to get back only now.

I have a solution for you! To remove the leading zero you can use the following SQL for SeasonNumber:
UPDATE Songs SET SeasonNumber = replace(SeasonNumber, 0, "") WHERE SeasonNumber = "01" OR SeasonNumber = "02" OR SeasonNumber = "03" OR SeasonNumber = "04" OR SeasonNumber = "05" OR SeasonNumber = "06" OR SeasonNumber = "07" OR SeasonNumber = "08" OR SeasonNumber = "09";

and for EpisodeNumber use:
UPDATE Songs SET EpisodeNumber = replace(EpisodeNumber, 0, "") WHERE EpisodeNumber = "01" OR EpisodeNumber = "02" OR EpisodeNumber = "03" OR EpisodeNumber = "04" OR EpisodeNumber = "05" OR EpisodeNumber = "06" OR EpisodeNumber = "07" OR EpisodeNumber = "08" OR EpisodeNumber = "09;

Thats all i can think off for now.

I hope Bex will update the script soon :D
Last edited by tooone7 on Wed Oct 19, 2011 11:41 am, edited 1 time in total.
tooone7
 
Posts: 39
Joined: Tue Jan 04, 2011 7:17 am

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby tooone7 » Wed Oct 19, 2011 11:30 am

Vyper wrote:The options for this script allows you to remove the leading zero instead of adding it. Will that do what you want?

I don't have MM4 installed yet so I don't have a way of checking it myself.


Hi Vyper the problem is that me and Tommy want this script to also add/remove leading zeros on Episode and Season numbers for our series and the current version of the script does not yet cater for that. :)
tooone7
 
Posts: 39
Joined: Tue Jan 04, 2011 7:17 am

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby tommycrock » Fri Oct 28, 2011 12:42 pm

tooone7 wrote:Sorry to get back only now.
Ditto...
tooone7 wrote:I have a solution for you!
Worked perfectly :D , well almost, little tweak needed, a final " for the episode numbers

Thanks very much
tommycrock
 
Posts: 210
Joined: Sat May 21, 2011 9:13 am

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby tooone7 » Sat Oct 29, 2011 7:54 am

tommycrock wrote:Worked perfectly :D , well almost, little tweak needed, a final " for the episode numbers

Thanks very much


Oh i see at the end there was a missing qoute :roll:

No problem glad i could help :)
tooone7
 
Posts: 39
Joined: Tue Jan 04, 2011 7:17 am

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby Harlequin123 » Sat Jan 07, 2012 7:42 pm

Any way to get this working in MM 4.x? Doesn't seem to show up in the application anymore.
Harlequin123
 

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby gpzbc » Sat Jan 07, 2012 10:15 pm

I know it doesn't help you at all, but it is working for me in MM4.
--
The gpzbc
gpzbc
 
Posts: 1186
Joined: Sat Sep 13, 2008 12:02 am
Location: Colorado, USA

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby AnteBios » Sun Jan 08, 2012 7:24 am

Hello,


Bex thank you for this script.

Using MM 3.2.5.1306 however, no changes are made to the filename. I don't find the option to do that. Do I need to do a "auto-organize files" after running your script?


Thanks.
AnteBios
 
Posts: 3
Joined: Sun May 29, 2011 6:01 am

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby TrueHarlequin124 » Tue Jan 10, 2012 8:09 pm

@gpzbc You're right, I see it now. It seems it doesn't show up in the main menu anywhere anymore, just in the right-click context menu.
TrueHarlequin124
 

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby tommycrock » Mon Jan 16, 2012 7:58 am

AnteBios wrote:no changes are made to the filename. I don't find the option to do that.

I'm using MM4 but it works for me without doing anything else. Do you have filename ticked in Tools-> Options | Library > Case & Leading Zero Fixer?
tommycrock
 
Posts: 210
Joined: Sat May 21, 2011 9:13 am

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby mlr » Sat May 26, 2012 7:17 am

Is there a way to mark “The” not to change to “the” in the following?
Adam and The Ants, Adele & The Raconteurs, Diana Ross & The Supremes…

Nice to Have Request:
1. An Option add the Disc # (1) to Track # (24) making the Track # (124)
2. The ability to Tick the Tracks or\and Columns to be changed…

Besides the q & N2Hs, THANK YOU for this excellent add-on, it took care of about 98% of my tweaking needs.
MediaMonkey Gold-Lifetime user since 2007
System: Windows 7 Ultimate SP 1
mlr
 
Posts: 24
Joined: Sat Jun 14, 2008 7:50 pm
Location: South Africa

Re: Case & Leading Zero Fixer 1.4.2 (2008-04-15)

Postby Vyper » Sun May 27, 2012 6:52 am

mlr wrote:Is there a way to mark “The” not to change to “the” in the following?
Adam and The Ants, Adele & The Raconteurs, Diana Ross & The Supremes…

Tools -> Options -> Case & Leading Zero Fixer ... taking 'the' out of the little words list and putting 'The' in the forced case list should work ...
Stop Button Freak
Vyper
 
Posts: 845
Joined: Tue May 23, 2006 5:53 pm

PreviousNext

Return to Need Help with Addons?

Who is online

Users browsing this forum: Bing [Bot] and 8 guests