Skip to content

Commit

Permalink
Merge pull request #30 from hypnos-haxxor/master
Browse files Browse the repository at this point in the history
Crash fixes and UI tweaks
  • Loading branch information
bbsan2k authored Jul 18, 2020
2 parents a471bbf + e4968b7 commit 0865f4d
Show file tree
Hide file tree
Showing 5 changed files with 652 additions and 626 deletions.
58 changes: 29 additions & 29 deletions addon.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.f1tv" name="F1TV Kodi Plugin" version="0.1.2" provider-name="BBsan2k and TheDevFreak">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.routing" version="0.2.0"/>
<import addon="script.module.requests" version="2.9.1"/>
</requires>
<extension point="xbmc.python.pluginsource" library="main.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">Provides functionality to view stream from F1TV</summary>
<description lang="en_GB">Plugin for F1TV Streaming Service</description>
<description lang="de_DE">Plugin für F1TV</description>
<language></language>
<platform>all</platform>
<license>MIT</license>
<forum></forum>
<website></website>
<email>[email protected]</email>
<source></source>
<news></news>
<disclaimer></disclaimer>
<assets>
<icon>resources/F1TV_Logo.png</icon>
<fanart></fanart>
</assets>
</extension>
</addon>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.f1tv" name="F1TV Kodi Plugin" version="0.1.3" provider-name="BBsan2k, TheDevFreak, and HypnOS HAXX0R">
<requires>
<import addon="xbmc.python" version="2.25.0"/>
<import addon="script.module.routing" version="0.2.0"/>
<import addon="script.module.requests" version="2.9.1"/>
</requires>
<extension point="xbmc.python.pluginsource" library="main.py">
<provides>video</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary lang="en_GB">Provides functionality to view stream from F1TV</summary>
<description lang="en_GB">Plugin for F1TV Streaming Service</description>
<description lang="de_DE">Plugin für F1TV</description>
<language></language>
<platform>all</platform>
<license>MIT</license>
<forum></forum>
<website></website>
<email>[email protected]</email>
<source></source>
<news></news>
<disclaimer></disclaimer>
<assets>
<icon>resources/F1TV_Logo.png</icon>
<fanart></fanart>
</assets>
</extension>
</addon>
19 changes: 14 additions & 5 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
v0.0.3
- Changed output of Season labels - now using 'name'
- Fixed Season without event 'start_dates'

v0.0.2
v0.1.3
- Fixed crash in 'Sets'
- Fixed crash in 'List by Circuit'
- 'Live Now' active event menu item renamed to 'Current Event' to lessen confusion
- Future seasons are no longer shown in 'List by Season'
- Future events are no longer shown
- All season events under 'List by Season' are no longer prefixed with a 2-digit number. Now they are prefixed by 'Round #' if they are a race.
- Plugin logo is now 512px x 512px per Kodi standards

v0.0.3
- Changed output of Season labels - now using 'name'
- Fixed Season without event 'start_dates'

v0.0.2
- Initial version
Binary file modified resources/F1TV_Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions resources/lib/F1TVParser/F1TV_Minimal_API.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def getSession(self, url):
if r.ok:
return r.json()


def getEvent(self, url, season = None):
""" Get Event object from API by supplying an url"""
complete_url = __TV_API__ + url
Expand Down Expand Up @@ -89,15 +90,15 @@ def getSeasons(self):

def getCircuits(self):
""" Get all Circuit urls that are available at API"""
complete_url = __OLD_TV_API__TV_API__ + "/api/circuit/"
complete_url = __OLD_TV_API__ + "/api/circuit/"
r = self.account_manager.getSession().get(complete_url, params={"fields": "name,eventoccurrence_urls,self"})

if r.ok:
return r.json()

def getCircuit(self, url):
""" Get Circuit object from API by supplying an url"""
complete_url = __TV_API__ + url
complete_url = __OLD_TV_API__ + url
r = self.account_manager.getSession().get(complete_url, params=__TV_API_PARAMS__["circuit"])

if r.ok:
Expand Down Expand Up @@ -129,7 +130,12 @@ def getSets(self):
content = {}
for item in rj['objects'][0]['items']:
itemj = self.account_manager.getSession().get(__OLD_TV_API__+item['content_url']).json()
content[itemj['title']] = item['content_url']
if 'title' in list(itemj):
content[itemj['title']] = item['content_url']
elif 'name' in list(itemj):
content[itemj['name']] = item['content_url']
else:
content[itemj['UNKNOWN SET: ' + 'uid']] = item['content_url']
return content

def getSetContent(self, url):
Expand Down
Loading

0 comments on commit 0865f4d

Please sign in to comment.