Skip to Content
It is currently July 6th, 2022, 9:05 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Capitalize Titles
PostPosted: July 31st, 2021, 7:58 pm 
Offline
Junior User
Junior User

Joined: August 7th, 2018, 7:29 am
Posts: 31
I miss the support from 'back in the day'.

There was a list of PAL scripts to grab that gave enough information to adapt to your needs, and hopefully learn a bit of coding. I don't know where that list went to.

I am looking for a PAL script that would go through your database and Capitalize the song titles and artists. I can't find that anywhere.

Any ideas?


Top
 Profile  
Reply with quote  
 Post subject: Re: Capitalize Titles
PostPosted: August 1st, 2021, 8:55 am 
Offline
SVS Member
SVS Member

Joined: May 8th, 2004, 9:00 am
Posts: 10571
Location: Denver, CO
It would be WAY faster to utilize a direct MYSQL update on the database, using phpMydmin or workbench, rather than using PAL. PAL would take forever, 1 second per iteration. I would not recommend using (PAL.LockExecution), as this could freeze your SAM while executing if you have a large number of tracks.

Code:
UPDATE songlist SET title = UPPER(title), artist = UPPER(artist)
If you don't want your sweepers, station IDs etc affected use the where clause to limit the update to songtype ='S'

Code:
UPDATE songlist SET title = UPPER(title), artist = UPPER(artist) where songtype = 'S'


HIGHLY recommend backing up the database before attempting mass updates.

_________________
- Rob Oyler, SVS
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Capitalize Titles
PostPosted: August 1st, 2021, 12:11 pm 
Offline
Junior User
Junior User

Joined: August 7th, 2018, 7:29 am
Posts: 31
I have over 2000 tracks. I am NOT using MySQL. I am using Firebird.

This is a DEMO setup and not online so time is not an issue.

I am importing about 600 new tracks from my personal music and it was not taken care of well in Title format. So I am trying to clean it up.

Would you suggest changing to MySQL? I have no problem saving the music category files and reimporting it.

I just am not real familiar with MySQL and wouldn't know which of the database options I need to start with. I can play with that as well.

Thanks for the response.


Top
 Profile  
Reply with quote  
 Post subject: Re: Capitalize Titles
PostPosted: August 1st, 2021, 12:46 pm 
Offline
SVS Member
SVS Member

Joined: December 6th, 2004, 9:00 am
Posts: 8306
Location: Cologne (Germany)
You can use Firebird as well, but you'll have to look up the SQL Syntax differences yourself and modify the SQL query to work with that.
The table structure is the same in every database, Firebird is just a lot harder to handle.

WMI wrote:
I just am not real familiar with MySQL and wouldn't know which of the database options I need to start with. I can play with that as well.

These days I'd recommend using MariaDB instead (which is a drop-in-replacement for MySQL) so you don't fall into a trap of buying anything from Oracle. They're making it harder every day to find the open source version of MySQL.

WMI wrote:
I have no problem saving the music category files and reimporting it.

The backup option of SAM for Firebird is copying the firebird database file to a separate location. You can't import a Firebird database file into MySQL/MariaDB, though.

_________________
Benedikt Bauer - SVS (Spacial Volunteer Support)

Shop for readymade PAL scripts by countrywesterndj - Or get a custom script made by me (or others)

My Project:
Send "Now Playing" from SAM to Twitter and/or Facebook | Sourcecode


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group