-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRadio.py~
120 lines (84 loc) · 5.14 KB
/
Radio.py~
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Jun 30 2011)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################
import wx
import wx.xrc
import startstop
ID_ADD = 1000
ID_EXIT = 1001
ID_HELP = 1002
Name = ['IBC Tamil','Kalakkal Kadambam','Tamil Radio','TAMIL DSP','NJ TAMIL RADIO','Tamil Christian Radio','Thamizhamutham Radio','Royaldaily.com','MorningStar Tamil Radio','Tharanga Tamil','KathalFM.com','Air Tamil Radio','Heaven Radio Tamil Christian Radio','TamilMelIsai.Com','OpenTamilRadio','TamilKuyilRadio.com','London Tamil Radio','SPICE RADIO','TRTTAMIL','Onex FM','JESUS fm','Bakthi Malargal','CTBC']
station_uri = {"IBC Tamil":"http://38.96.175.192:6176" , "Kalakkal Kadambam":"http://67.228.177.153:4241/Live" , "Tamil Radio":"http://85.17.139.168:8002" , "TAMIL DSP":"http://178.159.0.80:8140" , "NJ TAMIL RADIO":"http://72.82.228.139:8002" , "Tamil Christian Radio":"http://67.225.164.64:8016" , "Thamizhamutham Radio":"http://178.159.0.80:7188" , "Royaldaily.com":"http://213.246.51.97:8026" , "MorningStar Tamil Radio":"http://78.159.120.157:37893" , "Tharanga Tamil":"http://184.168.74.213:7041" , "KathalFM.com":"=http://173.44.36.50:7262" , "Air Tamil Radio":"http://173.44.36.50:8044" , "Heaven Radio Tamil Christian Radio":"http://96.44.147.234:7768" , "TamilMelIsai.Com":"http://87.117.202.97:8090" , "OpenTamilRadio":"http://174.37.16.73:4817" , "TamilKuyilRadio.com":"http://173.193.219.163:8095" , "London Tamil Radio":"http://184.107.17.34:8106" , "SPICE RADIO":"http://109.123.117.195:8040" , "TRTTAMIL":"http://88.191.88.135:8024" , "Onex FM":"http://178.32.48.230:9998" , "JESUS fm":"http://174.36.206.217:8575" , "Bakthi Malargal":"http://84.73.228.253:8000" , "CTBC":"http://174.36.206.197:8088"}
###########################################################################
## Class MyFrame1
###########################################################################
# -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Jun 30 2011)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################
#import wx
#import wx.xrc
#ID_ADD = 1000
#ID_EXIT = 1001
#ID_HELP = 1002
###########################################################################
## Class MyFrame1
###########################################################################
class MyFrame1 ( wx.Frame ):
def __init__( self, parent ):
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = u"Blue internet radio", pos = wx.DefaultPosition, size = wx.Size( 700,350 ), style = wx.DEFAULT_FRAME_STYLE|wx.TAB_TRAVERSAL )
self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
self.m_statusBar1 = self.CreateStatusBar( 1, wx.ST_SIZEGRIP, wx.ID_ANY )
bSizer1 = wx.BoxSizer( wx.HORIZONTAL )
self.m_bitmap1 = wx.StaticBitmap( self, wx.ID_ANY, wx.Bitmap( u"/home/blue/Radio/speaker.jpg", wx.BITMAP_TYPE_ANY ), wx.DefaultPosition, wx.DefaultSize, 0 )
bSizer1.Add( self.m_bitmap1, 0, wx.ALIGN_LEFT|wx.ALL, 5 )
bSizer2 = wx.BoxSizer( wx.VERTICAL )
m_listBox1Choices = Name
self.m_listBox1 = wx.ListBox( self, wx.ID_ANY, wx.DefaultPosition, wx.DefaultSize, m_listBox1Choices, 0 )
bSizer2.Add( self.m_listBox1, 1, wx.ALL|wx.EXPAND, 5 )
bSizer1.Add( bSizer2, 1, wx.EXPAND, 5 )
self.m_bitmap2 = wx.StaticBitmap( self, wx.ID_ANY, wx.Bitmap( u"/home/blue/Radio/speaker.jpg", wx.BITMAP_TYPE_ANY ), wx.Point( -1,-1 ), wx.DefaultSize, 0 )
bSizer1.Add( self.m_bitmap2, 0, wx.ALIGN_RIGHT|wx.ALL, 5 )
self.SetSizer( bSizer1 )
self.Layout()
self.m_menubar1 = wx.MenuBar( 0 )
self.file = wx.Menu()
self.add = wx.MenuItem( self.file, ID_ADD, u"&Add", wx.EmptyString, wx.ITEM_NORMAL )
self.file.AppendItem( self.add )
self.exit = wx.MenuItem( self.file, ID_EXIT, u"&Exit", wx.EmptyString, wx.ITEM_NORMAL )
self.file.AppendItem( self.exit )
self.help = wx.MenuItem( self.file, ID_HELP, u"&Help", wx.EmptyString, wx.ITEM_NORMAL )
self.file.AppendItem( self.help )
self.m_menubar1.Append( self.file, u"&File" )
self.SetMenuBar( self.m_menubar1 )
self.Centre( wx.BOTH )
# Connect Events
self.m_listBox1.Bind( wx.EVT_LISTBOX_DCLICK, self.OnSelect )
self.Bind( wx.EVT_MENU, self.OnAdd, id = self.add.GetId() )
self.Bind( wx.EVT_MENU, self.OnEdit, id = self.exit.GetId() )
self.Bind( wx.EVT_MENU, self.OnHelp, id = self.help.GetId() )
def __del__( self ):
pass
# Virtual event handlers, overide them in your derived class
def OnSelect( self, event ):
startstop.stop()
uri = self.m_listBox1.GetStringSelection()
uri=station_uri[uri]
startstop.play(uri)
event.Skip()
def OnAdd( self, event ):
event.Skip()
def OnEdit( self, event ):
event.Skip()
def OnHelp( self, event ):
event.Skip()
app = wx.App(0)
MyFrame1(None).Show()
app.MainLoop()