View previous topic :: View next topic |
Author |
Message |
warped Newbie
Joined: 06 Feb 2006 Posts: 7 Location: US
|
Posted: Mon Feb 06, 2006 11:55 pm Post subject: Streaming radio - Artist and Song |
|
|
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 |
|
 |
salling Site Admin
Joined: 27 Jul 2004 Posts: 7498 Location: Stockholm, Sweden
|
Posted: Tue Feb 07, 2006 12:14 am Post subject: |
|
|
I think this is a good idea. Will chalk it up for an improvement suggestion.
Best.
--
Jonas |
|
Back to top |
|
 |
warped Newbie
Joined: 06 Feb 2006 Posts: 7 Location: US
|
Posted: Tue Feb 07, 2006 12:49 am Post subject: |
|
|
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 |
|
 |
warped Newbie
Joined: 06 Feb 2006 Posts: 7 Location: US
|
Posted: Tue Feb 07, 2006 2:57 am Post subject: |
|
|
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 |
|
 |
salling Site Admin
Joined: 27 Jul 2004 Posts: 7498 Location: Stockholm, Sweden
|
Posted: Tue Feb 07, 2006 12:15 pm Post subject: |
|
|
Fun, isn't it!? ;-)
Cheers.
--
Jonas |
|
Back to top |
|
 |
|