-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathchannels.py
182 lines (144 loc) · 10.1 KB
/
channels.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
import time
import simplejson
from channel import BaseChannel, ChannelException,ChannelMetaClass, STATUS_BAD, STATUS_GOOD, STATUS_UGLY
from utils import *
class AlJazeeraArabic(BaseChannel):
playable = False
short_name = 'aljazeera_ar'
long_name = 'Al-Jazeera Live (Arabic)'
default_action = 'list_streams'
def action_list_streams(self):
data = {}
data.update(self.args)
data.update({'action': 'play_stream', 'Title': 'Very High Definition', 'stream_url': 'rtmp://media2.lsops.net/live playpath=aljazeer_ar_veryhigh.sdp swfUrl="http://www.livestation.com/flash/player/5.4/player.swf" pageURL="http://www.livestation.com/channels/3-al-jazeera-arabic-arabic" swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'action': 'play_stream', 'Title': 'High Definition', 'stream_url': 'rtmp://media2.lsops.net/live playpath=aljazeer_ar_high.sdp swfUrl="http://www.livestation.com/flash/player/5.4/player.swf" pageURL="http://www.livestation.com/channels/3-al-jazeera-arabic-arabic" swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'action': 'play_stream', 'Title': 'Standard Definition', 'stream_url': 'rtmp://media2.lsops.net/live playpath=aljazeer_ar_medium.sdp swfUrl="http://www.livestation.com/flash/player/5.4/player.swf" pageURL="http://www.livestation.com/channels/3-al-jazeera-arabic-arabic" swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'action': 'play_stream', 'Title': 'Low Definition', 'stream_url': 'rtmp://media2.lsops.net/live playpath=aljazeer_ar_low.sdp swfUrl="http://www.livestation.com/flash/player/5.4/player.swf" pageURL="http://www.livestation.com/channels/3-al-jazeera-arabic-arabic" swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
self.plugin.end_list()
def action_play_stream(self):
self.plugin.set_stream_url(self.args['stream_url'])
class AlJazeeraEnglish(BaseChannel):
playable = False
short_name = 'aljazeera'
long_name = 'Al-Jazeera Live (English)'
default_action = 'list_streams'
def action_list_streams(self):
data = {}
data.update(self.args)
data.update({'action': 'play_stream', 'Title': 'Very High Definition', 'stream_url': 'rtmp://media2.lsops.net/live playpath=aljazeer_en_veryhigh.sdp swfUrl="http://www.livestation.com/flash/player/5.4/player.swf" pageURL="http://www.livestation.com/channels/3-al-jazeera-english-english" swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'action': 'play_stream', 'Title': 'High Definition', 'stream_url': 'rtmp://media2.lsops.net/live playpath=aljazeer_en_high.sdp swfUrl="http://www.livestation.com/flash/player/5.4/player.swf" pageURL="http://www.livestation.com/channels/3-al-jazeera-english-english" swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'action': 'play_stream', 'Title': 'Standard Definition', 'stream_url': 'rtmp://media2.lsops.net/live playpath=aljazeer_en_medium.sdp swfUrl="http://www.livestation.com/flash/player/5.4/player.swf" pageURL="http://www.livestation.com/channels/3-al-jazeera-english-english" swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'action': 'play_stream', 'Title': 'Low Definition', 'stream_url': 'rtmp://media2.lsops.net/live playpath=aljazeer_en_low.sdp swfUrl="http://www.livestation.com/flash/player/5.4/player.swf" pageURL="http://www.livestation.com/channels/3-al-jazeera-english-english" swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
self.plugin.end_list()
def action_play_stream(self):
self.plugin.set_stream_url(self.args['stream_url'])
class BBC(BaseChannel):
playable = True
short_name = 'bbc'
long_name = 'BBC World News'
default_action = 'play_stream'
def action_play_stream(self):
self.plugin.set_stream_url('rtmp://media2.lsops.net/live/ playpath=bbcworld1_en_high.sdp swfUrl="http://www.livestation.com/flash/player/5.4/player.swf" pageUrl="http://www.livestation.com/channels/10-bbc-world-news-english" swfVfy=true live=true')
class RT(BaseChannel):
playable = False
short_name = 'rt'
long_name = 'RT'
default_action = 'list_streams'
def action_list_streams(self):
data = {}
data.update(self.args)
data.update({'action': 'play_stream', 'Title': 'English', 'stream_url': 'rtmp://fms5.visionip.tv/live app=live swfUrl=http://rt.com/s/swf/player5.4.viral.swf pageURL=http://rt.com/on-air/ playpath=RT_3 live=true'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'action': 'play_stream', 'Title': 'Spanish', 'stream_url': 'rtmp://rt.fms.visionip.tv/live/ app=live swfurl=http://actualidad.rt.com/swf/player.swf pageurl=http://actualidad.rt.com/mas/envivo/ playpath=RT_Spanish_3 swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'action': 'play_stream', 'Title': 'Arabic', 'stream_url': 'rtmp://russiatoday.fms.visionip.tv/rt/Russia_al_yaum_1000k_1 app=rt/Russia_al_yaum_1000k_1 swfurl=http://arabic.rt.com/style/liveplayer.swf pageurl=http://arabic.rt.com/live_high playpath=1000k_1 swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
self.plugin.end_list()
def action_play_stream(self):
self.plugin.set_stream_url(self.args['stream_url'])
class ABCNews24(BaseChannel):
playable=True
short_name = 'abc24'
long_name = "ABC News 24 (Australia)"
default_action = 'play_stream'
def action_play_stream(self):
self.plugin.set_stream_url("rtmp://cp103653.live.edgefcs.net:1935/live?_fcs_vhost=cp103653.live.edgefcs.net&akmfv=1.8 playpath=international_medium@36382 swfVfy=true live=true")
class EuroNews(BaseChannel):
playable = True
short_name = 'euronews'
long_name = 'EuroNews'
default_action = 'play_stream'
def action_play_stream(self):
self.plugin.set_stream_url('rtmp://media2.lsops.net/live/ playpath=euronews_en_high.sdp swfUrl="http://www.livestation.com/flash/player/5.4/player.swf" pageUrl="http://www.livestation.com/channels/1-euronews-english" swfVfy=true live=true')
class NASAHD(BaseChannel):
playable = True
short_name = 'nasahd'
long_name = 'NASA HD'
default_action = 'play_stream'
def action_play_stream(self):
self.plugin.set_stream_url('rtmp://flash86.ustream.tv:1935/ustreamVideo/6540154 playpath=streams/live app=ustreamVideo/6540154 swfUrl="http://cdn1.ustream.tv/swf/4/viewer.rsl.558.swf" pageUrl="http://www.nasa.gov/multimedia/nasatv/ustream.html" live=true')
class France24(BaseChannel):
playable = False
short_name = 'france24'
long_name = 'France 24'
default_action = 'list_streams'
def action_list_streams(self):
data = {}
data.update(self.args)
data.update({'action': 'play_stream', 'Title': 'English', 'stream_url': 'rtmp://stream2.france24.yacast.net/france24_live/en/ playpath=f24_liveen swfUrl="http://www.france24.com/en/sites/all/modules/maison/aef_player/flash/player.swf" swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'action': 'play_stream', 'Title': 'Francais', 'stream_url': 'rtmp://stream2.france24.yacast.net/france24_live/fr/ playpath=f24_livefr swfUrl="http://www.france24.com/fr/sites/all/modules/maison/aef_player/flash/player.swf" swfVfy=true live=true'})
self.plugin.add_list_item(data, is_folder=False)
self.plugin.end_list()
def action_play_stream(self):
self.plugin.set_stream_url(self.args['stream_url'])
class CSpan(BaseChannel):
playable = False
short_name = 'cspan'
long_name = 'CSPAN'
default_action = 'list_streams'
swf_url = 'http://www.c-span.org/cspanVideoHD.swf'
def action_list_streams(self):
data = {}
data.update(self.args)
data['action'] = 'play_stream'
data.update({'stream_url': "rtmp://cp82346.live.edgefcs.net:1935/live/CSPAN1@14845", 'Title': 'CSPAN1'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'stream_url': "rtmp://cp82347.live.edgefcs.net:1935/live/CSPAN2@14846", 'Title': 'CSPAN2'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'stream_url': "rtmp://cp82348.live.edgefcs.net:1935/live/CSPAN3@14847", 'Title': 'CSPAN3'})
self.plugin.add_list_item(data, is_folder=False)
self.plugin.end_list()
def action_play_stream(self):
parser = URLParser(swf_url = self.swf_url)
self.plugin.set_stream_url(parser(self.args['stream_url']))
class CNN(BaseChannel):
playable = False
short_name = 'cnn'
long_name = 'CNN'
default_action = 'list_streams'
swf_url = 'http://i.cdn.turner.com/cnn/.element/apps/CNNLive/2.1.5.7/assets/swfs/LivePlayer.swf'
def action_list_streams(self):
data = {}
data.update(self.args)
data['action'] = 'play_stream'
data.update({'stream_url': "rtmp://cp44679.live.edgefcs.net/live/cnn_stream1_low@2785", 'stream_number': 1, 'Title': 'CNN 1'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'stream_url': "rtmp://cp44679.live.edgefcs.net/live/cnn_stream2_low@2787", 'stream_number': 2, 'Title': 'CNN 2'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'stream_url': "rtmp://cp44679.live.edgefcs.net/live/cnn_stream3_low@2796", 'stream_number': 3, 'Title': 'CNN 3'})
self.plugin.add_list_item(data, is_folder=False)
data.update({'stream_url': "rtmp://cp44679.live.edgefcs.net/live/cnn_stream4_low@2797", 'stream_number': 4, 'Title': 'CNN 4'})
self.plugin.add_list_item(data, is_folder=False)
self.plugin.end_list()
def action_play_stream(self):
parser = URLParser(swf_url = self.swf_url)
self.plugin.set_stream_url(parser(self.args['stream_url']))