FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Streaming radio - Artist and Song

 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
warped
Newbie


Joined: 06 Feb 2006
Posts: 7
Location: US

PostPosted: Mon Feb 06, 2006 11:55 pm    Post subject: Streaming radio - Artist and Song Reply with quote

I have a suggestion that I would REALLY love to have in Clicker. Currently, when you are streaming radio clicker just displays the streams title. This is because the stream is treated just like a regular non-streamed audio file and thats the value returned by iTunes.

Now you can check the objTrack.Kind to get the type of audio and I think it returns 3 for streaming (in windows). Then you can grab the title from objiTunesApp.CurrentStreamTitle.

I just tested this in only a couple minutes so more testing would need to be done. The biggest obstacles I see right now are that some stations do not send the artist/title. You may be able to check if the CurrentStreamTitle is NULL and fall back to what is currently displayed. Another problem is because the track is not changed as far as iTunes is concerned, you'd have to have some sort of loop that automatically checks this every so often.

What do you think Jonas? I want this SOOO bad.

Robert Mahle
Microsoft SMS MVP
exTray author
www.extendedtools.com


Last edited by warped on Tue Feb 07, 2006 3:33 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Tue Feb 07, 2006 12:14 am    Post subject: Reply with quote

I think this is a good idea. Will chalk it up for an improvement suggestion.

Best.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
warped
Newbie


Joined: 06 Feb 2006
Posts: 7
Location: US

PostPosted: Tue Feb 07, 2006 12:49 am    Post subject: Reply with quote

Great!

I just threw this script together to hold me over. Your product is great! I can't wait to get more comfortable with it.





var iTunes = null
var msgbox = CreateMessageboxDialog( "messagebox_");

var helper = new ActiveXObject("SCHelper.SECHelper");
if (helper.IsProcessRunning("iTunes.exe")) {
launchWidget();
} else {
var launchQuestion = CreateQuestionDialog("launch_");
launchQuestion.textualContent = "Launch iTunes?";
theTerminal.Push(launchQuestion);
}

function launch_OK(w)
{
launchWidget();
}

function launchWidget()
{
iTunes = new ActiveXObject("iTunes.Application");

var track = iTunes.CurrentTrack;
if (track != null)
{

msgbox.title = "Streaming Info";
msgbox.textualContent = "Radio Station:\n " + track.Name + "\n\n " + iTunes.CurrentStreamTitle;

theTerminal.Push(msgbox);

}
}

//=============================================================================
Back to top
View user's profile Send private message Visit poster's website
warped
Newbie


Joined: 06 Feb 2006
Posts: 7
Location: US

PostPosted: Tue Feb 07, 2006 2:57 am    Post subject: Reply with quote

OMG I love Clicker! I modified iTunes.js to accomplish exactly what I wanted.

Little snips:

var currentSong = null;
var currentAlbum = null;
[b]var currentStream = null;[/b]

[i]in the mediaPlayer_Update function:[/i]

if (track.Name != currentSong || track.Album != currentAlbum || [b]iTunes.CurrentStreamTitle != currentStream[/b])


[i]Added in the updateMediaplayerWidget function:[/i]

[b] if(Album == null || Album == "" & iTunes.CurrentStreamTitle != null || iTunes.CurrentStreamTitle != "")
{
Album = "";
Artist = track.Name;
songRow.textualContent = iTunes.CurrentStreamTitle;
}[/b]

currentSong = track.Name;
currentAlbum = track.Album;
[b]currentStream = iTunes.CurrentStreamTitle[/b]

Robert Mahle
Microsoft SMS MVP
exTray author
www.extendedtools.com
Back to top
View user's profile Send private message Visit poster's website
salling
Site Admin


Joined: 27 Jul 2004
Posts: 7498
Location: Stockholm, Sweden

PostPosted: Tue Feb 07, 2006 12:15 pm    Post subject: Reply with quote

Fun, isn't it!? ;-)

Cheers.
--
Jonas
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Salling Clicker for Windows All times are GMT + 2 Hours
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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group