-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
addon.py
45 lines (42 loc) · 1.7 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
from xbmcswift2 import Plugin, xbmcgui
from resources.lib import mainaddon
plugin = Plugin()
url1 = "https://revolutionaryleftradio.libsyn.com/rss"
url2 = "https://redmenace.libsyn.com/rss"
url3 = "https://guerrillahistory.libsyn.com/rss"
@plugin.route('/')
def main_menu():
items = [
{
'label': plugin.get_string(30001),
'path': plugin.url_for('episodes1'),
'thumbnail': "https://ssl-static.libsyn.com/p/assets/7/3/3/a/733a93637e62338d/RLR_Logo_CROPPED_.jpg"},
{
'label': plugin.get_string(30002),
'path': plugin.url_for('episodes2'),
'thumbnail': "https://ssl-static.libsyn.com/p/assets/5/4/e/d/54ed5cfab779e4f4/RM_Alt_Logo.jpeg"},
{
'label': plugin.get_string(30003),
'path': plugin.url_for('episodes3'),
'thumbnail': "https://ssl-static.libsyn.com/p/assets/5/1/5/9/5159f4a9c2328312/Webp.net-resizeimage.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)
if __name__ == '__main__':
plugin.run()