-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaddon.py
52 lines (46 loc) · 1.88 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
import xbmc
from kodi_six import xbmc, xbmcaddon, xbmcgui, xbmcplugin, xbmcvfs
#from xbmc import Plugin, xbmcgui
#from xbmcswift2 import Plugin, xbmcgui
from kodi_six import Plugin
from resources.lib import criminalpodcast
from xmbc import xmbcplugin
URL = "https://feeds.soundcloud.com/users/soundcloud:users:69651204/sounds.rss"
plugin = Plugin()
@plugin.route('/')
def main_menu():
items = [
{
'label': plugin.get_string(30001),
'path': plugin.url_for('all_episodes1'),
'thumbnail': "https://github.com/leopheard/criminalpodcast/blob/master/resources/media/icon-inverted.jpg"},
{
'label': plugin.get_string(30000),
'path': plugin.url_for('all_episodes'),
'thumbnail': "https://github.com/leopheard/criminalpodcast/blob/master/resources/media/icon.jpg"},
{
'label': plugin.get_string(30002),
'path': plugin.url_for('new_to_criminal'),
'thumbnail': "/home/osmc/.kodi/addons/plugin.audio.criminalpodcast/resources/media/cropped-favicon-2-180x180-inverted.png"},
]
return items
@plugin.route('/all_episodes/')
def all_episodes():
soup = criminalpodcast.get_soup(URL)
playable_podcast = criminalpodcast.get_playable_podcast(soup)
items = criminalpodcast.compile_playable_podcast(playable_podcast)
return items
@plugin.route('/all_episodes1/')
def all_episodes1():
soup = criminalpodcast.get_soup(URL)
playable_podcast1 = criminalpodcast.get_playable_podcast1(soup)
items = criminalpodcast.compile_playable_podcast1(playable_podcast1)
return items
@plugin.route('/new_to_criminal/')
def new_to_criminal():
#soup = criminalpodcast.compile_new_to_criminal(URL)
compile_ntc = criminalpodcast.get_new_to_criminal
items = criminalpodcast.compile_new_to_criminal(compile_ntc)
return items
if __name__ == '__main__':
plugin.run()