LcdStudio.Com Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
Winamp Title/Artist name formatting for Shoutcast radio.

 
Reply to topic    LcdStudio.Com Forum Index » Plugins View previous topic
View next topic
Winamp Title/Artist name formatting for Shoutcast radio.
Author Message
septakon



Joined: 20 Jul 2006
Posts: 3

Post Winamp Title/Artist name formatting for Shoutcast radio. Reply with quote
Hello! I am just starting to play around with LCDstudio and I love it!!!

Could anybody help me with this issue? My design will display the artist/title correctly for files on my computer. however, when listening to an online radio such as shoutcast, the artist is unknown and the title will be:

Artist Name - Song Title (station description)

for example:

Genuine - Deep Draw (Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM])

Is there a code that will allow to put "Genuine" as the artist, "Deep Draw" as the song name and take off the station description?

Thanks!
Thu Jul 20, 2006 2:18 am View user's profile Send private message
Aeryck
Homo Moderatus


Joined: 08 Mar 2006
Posts: 578
Location: 30 Miles from Hell.... (MI)

Post Reply with quote
Well, you -could- make a couple custom variables for the Artist and Title fields... Differentiating between an mp3 file and a shoutcast stream would be a different story altogether, however you could look at the "Filename" parameter (I would assume this would be the URL of your SC stream) for some conditional formatting.

I'm not an expert on C# formatting routines; someone else could probably point you to the actual code bits you'd need.. But, yes, it IS possible to accomplish what you want.

If nobody else offers code bits, I'll see if I can whip something up.

BTW, Welcome to the Forums!

_________________
"Yes, that's right. We're having a difficult time finding the enemy."
"Well, what do you use to look for them?"
"We ask people, 'are you the enemy?'. And whoever says yes, we shoot them!"
Thu Jul 20, 2006 4:00 am View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger ICQ Number
spock
Site Admin


Joined: 17 Feb 2003
Posts: 4526
Location: Athens, Greece

Post Custom Reply with quote
Yes, you could make two custom variables, as Aeryck pointed out. Just take a look at C#'s formatting functions. You can truncate the same input variable at specific points to get the song title and the artist separately. It's not hard to make it work for you.

_________________
Live long and prosper...
Fri Jul 21, 2006 11:49 pm View user's profile Send private message Send e-mail Visit poster's website ICQ Number
septakon



Joined: 20 Jul 2006
Posts: 3

Post Reply with quote
Thanks! Following your advice, I researched a little bit about C#.

I came up with that code with some copy/pasting:

if ((String)GetData("Winamp.Artist") == "Unknown")
return ((String)GetData("Winamp.Title")).Substring(((String)GetData("Winamp.Title")).LastIndexOf("\\") +1).Replace(" (Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM])", "");
else
return ((String)GetData("Winamp.Artist"))

So using the example above:

Genuine - Deep Draw (Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM])

will give the output: Genuine - Deep Draw

now, can I only keep everything before the - (hyphen) for the artist name? and everything after for the Title?

Also, for the station description, I will have to make a code for all the stations I listen to. how can I do this? For example, let's say the three stations i listen too have the following descriptions:

(SomaFM)
(Chilloutpsy)
(Ambient Space)

How can I make a code that does: Replace the (SomaFM) by "" (empty string), or replace (Chilloutpsy) by "", or replace (Ambient Space) by "".

wow, ive never done any programming at all in my life, but when I see how you can make cool things like that, i llike it!

thanks!
Sat Jul 22, 2006 12:35 am View user's profile Send private message
septakon



Joined: 20 Jul 2006
Posts: 3

Post Reply with quote
programming is hard and should be left to people with greater logical thinking capabilities.
Tue Jul 25, 2006 1:33 am View user's profile Send private message
arje06



Joined: 17 May 2010
Posts: 1

Post Re: Winamp Title/Artist name formatting for Shoutcast radio. Reply with quote
Well, that's good for you, and we are glad to know the result of your works if you don't mind. I know that this thread is quite old that's why I'm looking forward to know the result of your work. How about posting it here?

_________________
justin beaver singer

Last edited by arje06 on Wed Jun 09, 2010 12:30 pm; edited 2 times in total
Mon May 17, 2010 8:06 am View user's profile Send private message
spock
Site Admin


Joined: 17 Feb 2003
Posts: 4526
Location: Athens, Greece

Post Four Reply with quote
Oh, really? Just like you, resurrecting a four-year-old thread, only to write this?
Marvellous!

_________________
Live long and prosper...
Mon May 17, 2010 10:06 pm View user's profile Send private message Send e-mail Visit poster's website ICQ Number
Display posts from previous:    
Reply to topic    LcdStudio.Com Forum Index » Plugins All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.