Archive

Archive for June, 2006

Launchy

June 22, 2006 Leave a comment
I have mentioned earlier about how much I like slickrun and how I had made a magic word  list for common tasks.
Omar mentioned about Launchy and I have been trying it for couple of days and I love it.
 
It has a prettier UI , note the transparant border with visual studio in the background  in the picture below, and it indexes directories and files on it own so its intellisent out of the box, note that I had to type only ‘w med’ to launch windows media player.
 
Quick, non intrusive, recommended.
Categories: Uncategorized

Using Windows Media Player as the Universal Player

 
Update2:
 
Jon has packaged this properly and put up in his tools website. Please download by clicking the image above.
 
Update1: modified original code as per Jon’s suggestion 
 
I was tired of having too many media players (iTunes, QuickTime, Real, WinAmp) and wanted just my windows media player do all the stuff. This is what I did:
 
Uninstalled all third party players ( I love WinAmp, so may be I’ll come back to it later)
Installed Klite Mega Codec pack and used "5. Lots of stuff" option while installation, this took care of most of the stuff.
Installed OpenPLSinWM from Jon for my shoutcasts
 
Modified OpenPLSinWM , you can download here: so that I can listen to AAC+ streams
 
Note: For aac+ support in Windows Media Player, please install orban plugin
 
code:
1using System.IO;
2using System.Net;
3using System.Text.RegularExpressions;
4
5 namespace OpenPLSinWM
6
7{
8class OpenPlsInWM
9
10 {
11 [STAThread]
12 static void Main(string[] args)
13 {
14
15    if (args.GetUpperBound(0) > -1)
16    {
17
18        string filename = args[0];
19
20        using (StreamReader sr = new StreamReader(filename))
21        {
22        string pls = sr.ReadToEnd().ToLower();
23        Regex  http = new Regex(@"http://(.*)");
24        string url = http.Match(pls).Value;
25
26        WebResponse wres = WebRequest.Create(url).GetResponse();
27
28        //if aac+ stream replace http with icyx to play with orban
29
30        if(wres.Headers.Get("content-type")=="audio/aacp")
31        url=url.Replace("http","icyx");
32
33
34        if(url!=string.Empty)           
35        System.Diagnostics.Process.Start("wmplayer.exe",url);
36
37        else
38        Console.Write("could not read stream url info");
39
40        }
41    }
42
43
44    else
45
46    {
47         Console.WriteLine("Usage: OpenPlsInWM "playlist.pls"");
48         Console.WriteLine("Associate PLS file extension with this application to allow Windows Media Player to play them.");
49    }
50  }
51 }
52}
53