-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddon.py
76 lines (54 loc) · 1.99 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
from xbmcswift2 import Plugin, xbmcgui
from resources.lib import jimmydoreshow
plugin = Plugin()
URL = "https://thejimmydoreshow.libsyn.com/rss"
URL2 = "https://comedyandeverythingelse.libsyn.com/rss"
@plugin.route('/')
def main_menu():
"""
main menu
"""
items = [
{
'label': plugin.get_string(30000),
'path': plugin.url_for('all_episodes'),
'thumbnail': "https://ssl-static.libsyn.com/p/assets/b/0/4/3/b043eaa3e36ed529/JDPodThumb1.jpg"},
{
'label': plugin.get_string(30001),
'path': plugin.url_for('all_episodes1'),
'thumbnail': "https://ssl-static.libsyn.com/p/assets/b/0/4/3/b043eaa3e36ed529/JDPodThumb1.jpg"},
{
'label': plugin.get_string(30002),
'path': plugin.url_for('all_comedy'),
'thumbnail': "https://ssl-static.libsyn.com/p/assets/7/9/5/3/7953b2f961f84fe3/caee-for-podcast.jpg"},
]
return items
@plugin.route('/all_episodes/')
def all_episodes():
"""
contains playable podcasts listed as just-in
"""
soup = jimmydoreshow.get_soup(URL)
playable_podcast = jimmydoreshow.get_playable_podcast(soup)
items = jimmydoreshow.compile_playable_podcast(playable_podcast)
return items
@plugin.route('/all_episodes1/')
def all_episodes1():
"""
contains playable podcasts listed as just-in
"""
soup = jimmydoreshow.get_soup(URL)
playable_podcast1 = jimmydoreshow.get_playable_podcast1(soup)
items = jimmydoreshow.compile_playable_podcast1(playable_podcast1)
return items
@plugin.route('/all_comedy/')
def all_comedy():
"""
contains playable podcasts listed as just-in
"""
soup2 = jimmydoreshow.get_soup(URL2)
playable_comedy = jimmydoreshow.get_playable_comedy(soup2)
items = jimmydoreshow.compile_playable_comedy(playable_comedy)
return items
if __name__ == '__main__':
plugin.run()