-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
addon.py
123 lines (120 loc) · 5.48 KB
/
addon.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
from xbmcswift2 import Plugin, xbmcgui
from resources.lib import mainaddon
plugin = Plugin()
url1 = "https://feeds.soundcloud.com/users/soundcloud:users:40330678/sounds.rss"
url2 = "http://feeds.soundcloud.com/users/soundcloud:users:429275703/sounds.rss"
url3 = "http://feeds.feedburner.com/civillibertiesminute"
url4 = "http://feeds.soundcloud.com/users/soundcloud:users:651588261/sounds.rss"
url5 = "http://feeds.soundcloud.com/users/soundcloud:users:469662171/sounds.rss"
url6 = "https://ca-ns-1.bulkstorage.ca/v1/AUTH_0d09c87549084f4ba4ad4a9e807d0d76/8054/feeds/APOR4.xml?temp_url_sig=58589393e4a6720a751332b0e2c747c6cff79af6&temp_url_expires=1888195959&inline"
url7 = "https://aclumnpod.libsyn.com/rss"
url8 = "http://www.acluohio.org/feed/audio"
url9 = "http://feeds.soundcloud.com/users/soundcloud:users:317981333/sounds.rss"
url10 = "https://feed.podbean.com/aclunh/feed.xml"
@plugin.route('/')
def main_menu():
items = [
{
'label': plugin.get_string(30001),
'path': plugin.url_for('episodes1'),
'thumbnail': "https://www.aclu.org/files/podcast/podcast-at-liberty-landing-page-cover.jpg"},
{
'label': plugin.get_string(30002),
'path': plugin.url_for('episodes2'),
'thumbnail': "https://i1.sndcdn.com/avatars-000427832679-g12u3l-original.jpg"},
{
'label': plugin.get_string(30003),
'path': plugin.url_for('episodes3'),
'thumbnail': "https://static.libsyn.com/p/assets/a/3/6/5/a36538cb1437928e/clm_cover_600x600.jpg"},
{
'label': plugin.get_string(30004),
'path': plugin.url_for('episodes4'),
'thumbnail': "https://i1.sndcdn.com/avatars-000678384755-61p8mq-original.jpg"},
{
'label': plugin.get_string(30005),
'path': plugin.url_for('episodes5'),
'thumbnail': "https://i1.sndcdn.com/avatars-000471014112-rqx3e7-original.jpg"},
{
'label': plugin.get_string(30006),
'path': plugin.url_for('episodes6'),
'thumbnail': "https://ca-ns-1.bulkstorage.ca/v1/AUTH_0d09c87549084f4ba4ad4a9e807d0d76/8054/feeds/APOR4.jpg?temp_url_sig=975795aca8756b684b736bc82b0b4c74605b0432&temp_url_expires=1572842594&inline"},
{
'label': plugin.get_string(30007),
'path': plugin.url_for('episodes7'),
'thumbnail': "https://ssl-static.libsyn.com/p/assets/0/b/6/c/0b6c44b4b3290fe6/Power_to_Podcast_itunes.png"},
{
'label': plugin.get_string(30008),
'path': plugin.url_for('episodes8'),
'thumbnail': "http://www.acluohio.org/wp-content/uploads/powerpress/iTunesImage-883.jpg"},
{
'label': plugin.get_string(30009),
'path': plugin.url_for('episodes9'),
'thumbnail': "https://i1.sndcdn.com/avatars-000409010103-cnijln-original.jpg"},
{
'label': plugin.get_string(30010),
'path': plugin.url_for('episodes10'),
'thumbnail': "https://pbcdn1.podbean.com/imglogo/image-logo/6178760/Logo-1400-final.jpg"},
]
return items
@plugin.route('/episodes1/')
def episodes1():
soup1 = mainaddon.get_soup1(url1)
playable_podcast1 = mainaddon.get_playable_podcast1(soup1)
items = mainaddon.compile_playable_podcast1(playable_podcast1)
return items
@plugin.route('/episodes2/')
def episodes2():
soup2 = mainaddon.get_soup2(url2)
playable_podcast2 = mainaddon.get_playable_podcast2(soup2)
items = mainaddon.compile_playable_podcast2(playable_podcast2)
return items
@plugin.route('/episodes3/')
def episodes3():
soup3 = mainaddon.get_soup3(url3)
playable_podcast3 = mainaddon.get_playable_podcast3(soup3)
items = mainaddon.compile_playable_podcast3(playable_podcast3)
return items
@plugin.route('/episodes4/')
def episodes4():
soup4 = mainaddon.get_soup4(url4)
playable_podcast4 = mainaddon.get_playable_podcast3(soup4)
items = mainaddon.compile_playable_podcast4(playable_podcast4)
return items
@plugin.route('/episodes5/')
def episodes5():
soup5 = mainaddon.get_soup5(url5)
playable_podcast5 = mainaddon.get_playable_podcast5(soup5)
items = mainaddon.compile_playable_podcast5(playable_podcast5)
return items
@plugin.route('/episodes6/')
def episodes6():
soup6 = mainaddon.get_soup6(url6)
playable_podcast6 = mainaddon.get_playable_podcast6(soup6)
items = mainaddon.compile_playable_podcast6(playable_podcast6)
return items
@plugin.route('/episodes7/')
def episodes7():
soup7 = mainaddon.get_soup7(url7)
playable_podcast7 = mainaddon.get_playable_podcast7(soup7)
items = mainaddon.compile_playable_podcast7(playable_podcast7)
return items
@plugin.route('/episodes8/')
def episodes8():
soup8 = mainaddon.get_soup8(url8)
playable_podcast8 = mainaddon.get_playable_podcast8(soup8)
items = mainaddon.compile_playable_podcast8(playable_podcast8)
return items
@plugin.route('/episodes9/')
def episodes9():
soup9 = mainaddon.get_soup9(url9)
playable_podcast9 = mainaddon.get_playable_podcast9(soup9)
items = mainaddon.compile_playable_podcast9(playable_podcast9)
return items
@plugin.route('/episodes10/')
def episodes10():
soup10 = mainaddon.get_soup10(url10)
playable_podcast10 = mainaddon.get_playable_podcast10(soup10)
items = mainaddon.compile_playable_podcast10(playable_podcast10)
return items
if __name__ == '__main__':
plugin.run()