-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
addon.py
36 lines (31 loc) · 1.22 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
from xbmcswift2 import Plugin, xbmcgui
from resources.lib import theempirefiles
plugin = Plugin()
URL = "https://toppodcast.com/podcast_feeds/empire-files/"
@plugin.route('/')
def main_menu():
items = [
{
'label': plugin.get_string(30000),
'path': plugin.url_for('all_episodes'),
'thumbnail': "https://toppodcast.com/wp-content/uploads/2019/07/52242-600x600bb-85-300x300.png"},
{
'label': plugin.get_string(30001),
'path': plugin.url_for('all_episodes1'),
'thumbnail': "https://toppodcast.com/wp-content/uploads/2019/07/52242-600x600bb-85-300x300.png"},
]
return items
@plugin.route('/all_episodes/')
def all_episodes():
soup = theempirefiles.get_soup(URL)
playable_podcast = theempirefiles.get_playable_podcast(soup)
items = theempirefiles.compile_playable_podcast(playable_podcast)
return items
@plugin.route('/all_episodes1/')
def all_episodes1():
soup = theempirefiles.get_soup(URL)
playable_podcast1 = theempirefiles.get_playable_podcast1(soup)
items = theempirefiles.compile_playable_podcast1(playable_podcast1)
return items
if __name__ == '__main__':
plugin.run()