-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddon.py
97 lines (87 loc) · 4.42 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
from xbmcswift2 import Plugin, xbmcgui
from resources.lib import mainaddon
plugin = Plugin()
url1 = "https://feeds.megaphone.fm/PPY1840735050" #GLOBALTRANSLATIONS
url2 = "https://feeds.megaphone.fm/serdcast" #NERDCAST
url3 = "https://feeds.megaphone.fm/POL9526976537" #OFFMESSAGE
url4 = "https://feeds.simplecast.com/0WAkD8tI" #PLAYBOOKAUDIOBRIEFING
url5 = "https://feeds.simplecast.com/bWkOmgFt" #PULSECHECKS
url6 = "https://feeds.simplecast.com/Q7fb3j2T" #POLITICOMONEY
url7 = "https://feeds.simplecast.com/y6yyKu_h" #WOMENRULE
@plugin.route('/')
def main_menu():
items = [
{
'label': plugin.get_string(30001),
'path': plugin.url_for('episodes1'),
'thumbnail': "https://megaphone.imgix.net/podcasts/b1e39e90-4a0d-11e7-b1aa-2f52b1d6bc60/image/uploads_2F1558381350768-bncx4pfk1vl-aaacec0ec7771275578a9d96df91cad3_2FGlobalTranslation_Final.jpg?ixlib=rails-2.1.2&w=400&h=400"},
{
'label': plugin.get_string(30002),
'path': plugin.url_for('episodes2'),
'thumbnail': "https://megaphone.imgix.net/podcasts/3203c268-81c7-11e6-a0e4-ffa09ce0cb1a/image/uploads_2F1490990042872-n5kc8litbw126jy0-bf2caed744896f1d73d613a670a22fc2_2FNerdcast-FinalTagline_REV6.jpg?ixlib=rails-2.1.2&w=400&h=400"},
{
'label': plugin.get_string(30003),
'path': plugin.url_for('episodes3'),
'thumbnail': "https://megaphone.imgix.net/podcasts/4a356fe0-81cb-11e6-a9c6-2faab6abb1d4/image/uploads_2F1539702660842-jfin9wve49-d4d2b9299e88f29b1f6efdb0ef3fdf82_2FALBERTA-noname-OffMessage_Logo_FINAL_Rev4.jpg?ixlib=rails-2.1.2&w=400&h=400"},
{
'label': plugin.get_string(30004),
'path': plugin.url_for('episodes4'),
'thumbnail': "https://cdn.simplecast.com/images/78b88d91-969b-4340-973b-cc81688b2d98/c374f0d5-9816-4837-87de-f2615cb2651a/1510597298artwork.jpg"},
{
'label': plugin.get_string(30005),
'path': plugin.url_for('episodes5'),
'thumbnail': "https://is3-ssl.mzstatic.com/image/thumb/Podcasts113/v4/7a/c4/c7/7ac4c7e6-975b-86ef-b899-bf3f3a678ea5/mza_119992604573376929.jpg/600x600bb.jpg"},
{
'label': plugin.get_string(30006),
'path': plugin.url_for('episodes6'),
'thumbnail': "https://is3-ssl.mzstatic.com/image/thumb/Podcasts113/v4/b1/0a/97/b10a97dd-887d-7194-2540-ca762ef9fefd/mza_6322448531695263244.jpg/600x600bb.jpg"},
{
'label': plugin.get_string(30007),
'path': plugin.url_for('episodes7'),
'thumbnail': "https://is4-ssl.mzstatic.com/image/thumb/Podcasts123/v4/ea/a2/eb/eaa2eb6e-3557-f9bf-c236-f0c79d188c0c/mza_5850662405940263070.jpg/600x600bb.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_podcast4(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
if __name__ == '__main__':
plugin.run()