Skip to content

Commit

Permalink
[v2.0.5] release
Browse files Browse the repository at this point in the history
  • Loading branch information
bluezed committed Oct 20, 2014
1 parent f15f03f commit 03e599a
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 11 deletions.
2 changes: 1 addition & 1 deletion addons.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</extension>
</addon>

<addon id="script.ftvguide" name="FTV Guide" version="2.0.4" provider-name="rayw1986, bluezed">
<addon id="script.ftvguide" name="FTV Guide" version="2.0.5" provider-name="rayw1986, bluezed">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
Expand Down
2 changes: 1 addition & 1 deletion addons.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7831096d228091bd1ac860f78d4d90df
b9be30de33425645461f51a659106e05
2 changes: 1 addition & 1 deletion script.ftvguide/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.ftvguide" name="FTV Guide" version="2.0.4" provider-name="rayw1986, bluezed">
<addon id="script.ftvguide" name="FTV Guide" version="2.0.5" provider-name="rayw1986, bluezed">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
Expand Down
6 changes: 6 additions & 0 deletions script.ftvguide/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
--------------------------
FTV Guide - 2.0.5
--------------------------
+ Support for custom local addons.ini file
+ Favourites now get loaded from user profile, not always MASTER

--------------------------
FTV Guide - 2.0.4
--------------------------
Expand Down
4 changes: 2 additions & 2 deletions script.ftvguide/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def __init__(self):
self.channelIdx = 0
self.focusPoint = Point()
self.epgView = EPGView()
self.streamingService = streaming.StreamsService()
self.streamingService = streaming.StreamsService(ADDON)
self.player = xbmc.Player()
self.database = None

Expand Down Expand Up @@ -1182,7 +1182,7 @@ def __init__(self, database, channel):
self.player = xbmc.Player()
self.previousAddonId = None
self.strmFile = None
self.streamingService = streaming.StreamsService()
self.streamingService = streaming.StreamsService(ADDON)

def close(self):
if self.player.isPlaying():
Expand Down
3 changes: 3 additions & 0 deletions script.ftvguide/resources/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<setting id="xmltv.type" label="30123" type="enum" default="0" lvalues="30126|30127|30133|30134|30135|30136|30142"/>
<setting id="xmltv.interval" label="30128" type="enum" default="2" lvalues="30129|30130|30131|30132" visible="lt(-1,6)" />
<setting id="xmltv.file" label="30103" type="file" visible="eq(-2,6)" />

<setting id="addons.ini.type" label="30144" type="enum" default="0" lvalues="30143|30142"/>
<setting id="addons.ini.file" label="30145" type="file" visible="eq(-1,1)" />
</category>

<category label="30148">
Expand Down
8 changes: 6 additions & 2 deletions script.ftvguide/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ def isUpdated(self, channelsLastUpdated, programsLastUpdated):


class XMLTVSource(Source):
PLUGIN_DATA = xbmc.translatePath(os.path.join("special://profile/addon_data","script.ftvguide"))
PLUGIN_DATA = xbmc.translatePath(os.path.join('special://profile', 'addon_data', 'script.ftvguide'))
FTV_BASIC = 'guide_basic.xmltv'
FTV_ALL = 'guide.xmltv'
FTV_UKBASIC = 'guide_ukbasic.xmltv'
Expand All @@ -821,6 +821,8 @@ class XMLTVSource(Source):
FTV_USUKBASIC = 'guide_usukbasic.xmltv'
FTV_URL = 'http://remoteman.tv/ftv/'
KEY = 'xmltv'
INI_TYPE_FTV = 0
INI_TYPE_CUSTOM = 1
INI_FILE = 'addons.ini'
TYPE_FTV_ALL = 0
TYPE_FTV_BASIC = 1
Expand All @@ -841,6 +843,7 @@ def __init__(self, addon):
self.xmltvType = int(addon.getSetting('xmltv.type'))
self.xmltvInterval = int(addon.getSetting('xmltv.interval'))
self.logoSource = int(addon.getSetting('logos.source'))
self.addonsType = int(addon.getSetting('addons.ini.type'))

if (self.logoSource == XMLTVSource.LOGO_SOURCE_FTV):
self.logoFolder = XMLTVSource.FTV_URL + 'logos/'
Expand All @@ -863,7 +866,8 @@ def __init__(self, addon):
self.xmltvFile = str(addon.getSetting('xmltv.file')) # uses local file provided by user!

# make sure the ini file is fetched as well if necessary
self.updateLocalFile(XMLTVSource.INI_FILE)
if (self.addonsType == XMLTVSource.INI_TYPE_FTV):
self.updateLocalFile(XMLTVSource.INI_FILE)

if not self.xmltvFile or not xbmcvfs.exists(self.xmltvFile):
raise SourceNotConfiguredException()
Expand Down
9 changes: 6 additions & 3 deletions script.ftvguide/streaming.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,11 @@


class StreamsService(object):
def __init__(self):
path = xbmc.translatePath(os.path.join("special://profile/addon_data","script.ftvguide",'addons.ini'))
def __init__(self, addon):
if (int(addon.getSetting('addons.ini.type')) == 0):
path = xbmc.translatePath(os.path.join('special://profile', 'addon_data', 'script.ftvguide', 'addons.ini'))
else:
path = str(addon.getSetting('addons.ini.file'))

self.addonsParser = ConfigParser.ConfigParser(dict_type=OrderedDict)
self.addonsParser.optionxform = lambda option: option
Expand All @@ -40,7 +43,7 @@ def __init__(self):

def loadFavourites(self):
entries = list()
path = xbmc.translatePath('special://userdata/favourites.xml')
path = xbmc.translatePath(os.path.join('special://profile', 'favourites.xml'))
if os.path.exists(path):
f = open(path)
xml = f.read()
Expand Down
2 changes: 1 addition & 1 deletion zips/script.ftvguide/addon.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.ftvguide" name="FTV Guide" version="2.0.4" provider-name="rayw1986, bluezed">
<addon id="script.ftvguide" name="FTV Guide" version="2.0.5" provider-name="rayw1986, bluezed">
<requires>
<import addon="xbmc.python" version="2.1.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
Expand Down
6 changes: 6 additions & 0 deletions zips/script.ftvguide/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
--------------------------
FTV Guide - 2.0.5
--------------------------
+ Support for custom local addons.ini file
+ Favourites now get loaded from user profile, not always MASTER

--------------------------
FTV Guide - 2.0.4
--------------------------
Expand Down
Binary file added zips/script.ftvguide/script.ftvguide-2.0.5.zip
Binary file not shown.

0 comments on commit 03e599a

Please sign in to comment.