Skip to content

Commit 4175c4d

Browse files
committed
upload
0 parents  commit 4175c4d

22 files changed

+260
-0
lines changed

.github/FUNDING.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: Hellofawaytodie
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: #

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.pyc
2+
auto.sh
3+
image.sh

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: python
2+
python:
3+
- "2.7"
4+
install:
5+
- pip install beautifulsoup4
6+
- pip install nose
7+
- pip install requests
8+
script: nosetests

LICENSE.txt

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
Permission is hereby granted, free of charge, to any person obtaining a copy
3+
of this software and associated documentation files (the "Software"), to deal
4+
in the Software without restriction, including without limitation the rights
5+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
6+
copies of the Software, and to permit persons to whom the Software is
7+
furnished to do so, subject to the following conditions:
8+
9+
The above copyright notice and this permission notice shall be included in
10+
all copies or substantial portions of the Software.
11+
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18+
THE SOFTWARE.

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<a href="https://www.hellofawaytodie.com/">Hell Of A Way To Die</a> podcast.<br>
2+
3+
<a href="kodi.tv">KODI<a> / XBMC / Firestick audio addon for the <a href="https://www.hellofawaytodie.com">Hell of A Way To Die</a> podcast.<br>
4+
5+
<img src="https://is1-ssl.mzstatic.com/image/thumb/Podcasts113/v4/41/b0/c3/41b0c357-82db-f373-fcc4-0dd045eefff1/mza_3989264578854635602.png/600x600bb.jpg"><br>
6+
7+
Veterans without the conservatism, leftists without the authoritarian apologetics<br>
8+
9+
<a href="www.kodi.tv">Kodi</a> (formerly known as XBMC) is an award-winning free and open source (GPL) software media player and entertainment hub that can be installed on Linux, OSX, Windows, iOS and Android, featuring a 10-foot user interface for use with televisions and remote controls. It allows users to play and view most videos, music, podcasts, and other digital media files from local and network storage media and the internet.<br>
10+
11+
<b>^^^^ To install this addon ^^^^</b>, either use the <a href="https://www.tvaddons.co/github-browser-kodi/">Kodi Github installer</a> addon or save the .zip file downloaded from the 'clone or download' button to somewhere the Kodi can access (e.g. network drive or USB stick). Then on the Kodi, go to addons > install from zip file.<br>
12+
13+
<br><a href="http://www.kodi.tv"><img src="https://kodi.tv/sites/default/files/page/field_image/about--devices.jpg">

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-slate

addon.py

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
from xbmcswift2 import Plugin, xbmcgui
2+
from resources.lib import mainaddon
3+
4+
plugin = Plugin()
5+
url1 = "http://hellofawaytodie.libsyn.com/rss"
6+
@plugin.route('/')
7+
def main_menu():
8+
items = [
9+
{
10+
'label': plugin.get_string(30001),
11+
'path': plugin.url_for('episodes1'),
12+
'thumbnail': "https://is1-ssl.mzstatic.com/image/thumb/Podcasts113/v4/41/b0/c3/41b0c357-82db-f373-fcc4-0dd045eefff1/mza_3989264578854635602.png/600x600bb.jpg"},
13+
{
14+
'label': plugin.get_string(30000),
15+
'path': plugin.url_for('episodes'),
16+
'thumbnail': "https://is1-ssl.mzstatic.com/image/thumb/Podcasts113/v4/41/b0/c3/41b0c357-82db-f373-fcc4-0dd045eefff1/mza_3989264578854635602.png/600x600bb.jpg"},
17+
]
18+
return items
19+
20+
@plugin.route('/episodes1/')
21+
def episodes1():
22+
soup1 = mainaddon.get_soup1(url1)
23+
playable_podcast1 = mainaddon.get_playable_podcast1(soup1)
24+
items = mainaddon.compile_playable_podcast1(playable_podcast1)
25+
return items
26+
27+
@plugin.route('/episodes/')
28+
def episodes():
29+
soup1 = mainaddon.get_soup1(url1)
30+
playable_podcast = mainaddon.get_playable_podcast(soup1)
31+
items = mainaddon.compile_playable_podcast(playable_podcast)
32+
return items
33+
34+
if __name__ == '__main__':
35+
plugin.run()

addon.xml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<addon id="plugin.audio.WAHOAWTD" name="Hell Of A Way To Die" version="1.0.0" provider-name="leopheard">
3+
<requires>
4+
<import addon="xbmc.python" version="2.26.0"/>
5+
<import addon="script.module.xbmcswift2" version="2.4.0"/>
6+
<import addon="script.module.beautifulsoup4" version="4.3.1"/>
7+
<import addon="script.module.requests" version="1.1.0"/>
8+
<import addon="script.module.routing" version="0.2.0"/>
9+
</requires>
10+
<extension point="xbmc.python.pluginsource" library="addon.py">
11+
<provides>audio</provides>
12+
</extension>
13+
<extension point="xbmc.addon.metadata">
14+
<platform>all</platform>
15+
<language>en_us</language>
16+
<summary lang="en">What A Hell Of A Way To Die</summary>
17+
<description lang="en">Veterans without the conservatism, leftists without the authoritarian apologetics</description>
18+
<license>The MIT License (MIT)</license>
19+
<forum></forum>
20+
<email>leopheard@gmail.com</email>
21+
<source>https://github.com/leopheard/WAHOAWTD</source>
22+
<website>https://www.hellofawaytodie.com/</website>
23+
<assets>
24+
<icon>resources/media/icon.jpg</icon>
25+
<fanart>resources/media/fanart.jpg</fanart>
26+
<screenshot>resources/media/1.jpg</screenshot>
27+
<screenshot>resources/media/2.jpg</screenshot>
28+
<screenshot>resources/media/3.jpg</screenshot>
29+
</assets>
30+
</extension>
31+
</addon>

changelog.txt

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__Version 1.0.0__
2+
1. Initial working version

resources/__init__.py

Whitespace-only changes.

resources/__init__.pyo

166 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Kodi Media Center language file
2+
# Addon Provider: leopheard
3+
msgid ""
4+
msgstr ""
5+
"Project-Id-Version: Kodi Addons\n"
6+
"Report-Msgid-Bugs-To: leopheard@gmail.com\n"
7+
"POT-Creation-Date: 2019-08-12 HO:MI+ZONE\n"
8+
"PO-Revision-Date: 2019-08-12 HO:MI+ZONE\n"
9+
"Last-Translator: Kodi Translation Team\n"
10+
"Language-Team: English (http://www.transifex.com/projects/p/xbmc-addons/language/en/)\n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: 8bit\n"
14+
"Language: en\n"
15+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
16+
17+
msgctxt "#30000"
18+
msgid "All episodes"
19+
msgstr ""
20+
21+
msgctxt "#30001"
22+
msgid "Latest episodes"
23+
msgstr ""
24+
25+
msgctxt "#30002"
26+
msgid ""
27+
msgstr ""
28+
29+
msgctxt "#30003"
30+
msgid ""
31+
msgstr ""
32+
33+
# empty string with id 32003
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Kodi Media Center language file
2+
# Addon Provider: leopheard
3+
msgid ""
4+
msgstr ""
5+
"Project-Id-Version: Kodi Addons\n"
6+
"Report-Msgid-Bugs-To: leopheard@gmail.com\n"
7+
"POT-Creation-Date: 2019-08-12 HO:MI+ZONE\n"
8+
"PO-Revision-Date: 2019-08-12 HO:MI+ZONE\n"
9+
"Last-Translator: Kodi Translation Team\n"
10+
"Language-Team: English (http://www.transifex.com/projects/p/xbmc-addons/language/en/)\n"
11+
"MIME-Version: 1.0\n"
12+
"Content-Type: text/plain; charset=UTF-8\n"
13+
"Content-Transfer-Encoding: 8bit\n"
14+
"Language: en\n"
15+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
16+
17+
msgctxt "#30000"
18+
msgid "All episodes"
19+
msgstr ""
20+
21+
msgctxt "#30001"
22+
msgid "Latest episodes"
23+
msgstr ""
24+
25+
msgctxt "#30002"
26+
msgid ""
27+
msgstr ""
28+
29+
msgctxt "#30003"
30+
msgid ""
31+
msgstr ""
32+
33+
# empty string with id 32003

resources/lib/__init__.py

Whitespace-only changes.

resources/lib/__init__.pyo

170 Bytes
Binary file not shown.

resources/lib/mainaddon.py

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import requests
2+
import re
3+
from bs4 import BeautifulSoup
4+
5+
def get_soup1(url1):
6+
page = requests.get(url1)
7+
soup1 = BeautifulSoup(page.text, 'html.parser')
8+
print("type: ", type(soup1))
9+
return soup1
10+
11+
def get_playable_podcast1(soup1):
12+
subjects = []
13+
for content in soup1.find_all('item', limit=12):
14+
try:
15+
link = content.find('enclosure')
16+
link = link.get('url')
17+
print("\n\nLink: ", link)
18+
title = content.find('title')
19+
title = title.get_text()
20+
thumbnail = content.find('itunes:image')
21+
thumbnail = thumbnail.get('href')
22+
except AttributeError:
23+
continue
24+
item = {
25+
'url': link,
26+
'title': title,
27+
'thumbnail': thumbnail,
28+
}
29+
subjects.append(item)
30+
return subjects
31+
def compile_playable_podcast1(playable_podcast1):
32+
items = []
33+
for podcast in playable_podcast1:
34+
items.append({
35+
'label': podcast['title'],
36+
'thumbnail': podcast['thumbnail'],
37+
'path': podcast['url'],
38+
'is_playable': True,
39+
})
40+
return items
41+
42+
def get_playable_podcast(soup1):
43+
subjects = []
44+
for content in soup1.find_all('item'):
45+
try:
46+
link = content.find('enclosure')
47+
link = link.get('url')
48+
print("\n\nLink: ", link)
49+
title = content.find('title')
50+
title = title.get_text()
51+
thumbnail = content.find('itunes:image')
52+
thumbnail = thumbnail.get('href')
53+
except AttributeError:
54+
continue
55+
item = {
56+
'url': link,
57+
'title': title,
58+
'thumbnail': thumbnail,
59+
}
60+
subjects.append(item)
61+
return subjects
62+
def compile_playable_podcast(playable_podcast):
63+
items = []
64+
for podcast in playable_podcast:
65+
items.append({
66+
'label': podcast['title'],
67+
'thumbnail': podcast['thumbnail'],
68+
'path': podcast['url'],
69+
'is_playable': True,
70+
})
71+
return items

resources/lib/mainaddon.pyo

12.1 KB
Binary file not shown.

resources/media/1.jpg

59.6 KB
Loading

resources/media/2.jpg

72.9 KB
Loading

resources/media/3.jpg

72.9 KB
Loading

resources/media/fanart.jpg

32.3 KB
Loading

resources/media/icon.jpg

72.9 KB
Loading

0 commit comments

Comments
 (0)