Browse files

Changed version for Eden

Should have solved the Unicode problems
  • Loading branch information...
1 parent b847f4f commit 793860a5aaa1320d4aa8769e1b4fec6748d6e5b0 @metabaron committed Mar 28, 2012
Showing with 11 additions and 8 deletions.
  1. +2 −2 addon.xml
  2. +1 −0 changelog.txt
  3. +6 −4 default.py
  4. +2 −2 resources/lib/gomiso.py
View
4 addon.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.gomiso"
name="gomiso"
- version="1.3.0"
+ version="1.3.1"
provider-name="metabaron">
<requires>
- <import addon="xbmc.python" version="1.0"/>
+ <import addon="xbmc.python" version="2.0"/>
<import addon="script.module.simplejson" version="2.0.10"/>
</requires>
<extension point="xbmc.python.script"
View
1 changelog.txt
@@ -1,3 +1,4 @@
+version 1.3.0 Changed Python version to 2.0 for Eden
version 1.3.0 New autostart feature
Code improvement on autostart feature (function already here but previously commented)
Code improvement
View
10 default.py
@@ -138,9 +138,9 @@ def percentageRemaining(currenttime, duration):
videoThreshold = int(__settings__.getSetting("VideoThreshold"))
if videoThreshold == 0:
- videoThreshold = 75
- elif videoThreshold == 1:
videoThreshold = 25
+ elif videoThreshold == 1:
+ videoThreshold = 75
#videoThreshold=25
submitLimit = float(videoThreshold) / 100
checkedTitle = ''
@@ -177,7 +177,8 @@ def percentageRemaining(currenttime, duration):
if completion > submitLimit:
if len(xbmc.getInfoLabel("VideoPlayer.TVshowtitle")) >= 1:
#Retrieve TV show information
- showname = xbmc.getInfoLabel("VideoPlayer.TvShowTitle")
+ #showname = xbmc.getInfoLabel("VideoPlayer.TvShowTitle")
+ showname = unicode(xbmc.getInfoLabel("VideoPlayer.TvShowTitle"), errors="ignore")
showname = showname.replace(",", '')
season = xbmc.getInfoLabel("VideoPlayer.Season")
episode = xbmc.getInfoLabel("VideoPlayer.Episode")
@@ -196,7 +197,8 @@ def percentageRemaining(currenttime, duration):
#Or are we watching a movie
elif len(xbmc.getInfoLabel("VideoPlayer.Title")) >= 1:
#Retrieve movie information
- movieName = xbmc.getInfoLabel("VideoPlayer.Title")
+ #movieName = xbmc.getInfoLabel("VideoPlayer.Title")
+ movieName = unicode(xbmc.getInfoLabel("VideoPlayer.Title"), errors="ignore")
movieName = movieName.replace(",", '')
#Retrieve only one entry but would be good to have a threshold level like if more than 20 entries, no submit
View
4 resources/lib/gomiso.py
@@ -209,9 +209,9 @@ def findMedia(self, title, kind = 'all', count = 25):
print 'Cannot retrieve more than 50 results or less than 1 result at once\n'
exit()
if kind == 'all':
- resp, token = client.request('http://gomiso.com/api/oauth/v1/media.json?q=' + urllib.quote(unicode(title, 'utf-8')) + '&count=' + str(count), method='GET')
+ resp, token = client.request('http://gomiso.com/api/oauth/v1/media.json?q=' + urllib.quote(title) + '&count=' + str(count), method='GET')
else:
- resp, token = client.request('http://gomiso.com/api/oauth/v1/media.json?q=' + urllib.quote(unicode(title, 'utf-8')) + '&count=' + str(count) + '&kind=' + media_type[kind], method='GET')
+ resp, token = client.request('http://gomiso.com/api/oauth/v1/media.json?q=' + urllib.quote(title) + '&count=' + str(count) + '&kind=' + media_type[kind], method='GET')
return token
def mediaDetails(self, media_id):

0 comments on commit 793860a

Please sign in to comment.