Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

For now on, if two series or movies with the same name

no submission to Gomiso
  • Loading branch information...
commit d1445ea56d3667a0821c8c07c2046a3e7d3c2b9f 1 parent cac95be
@metabaron authored
View
2  addon.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="script.gomiso"
name="gomiso"
- version="1.5.1"
+ version="1.6.0"
provider-name="metabaron">
<requires>
<import addon="xbmc.python" version="2.0"/>
View
3  changelog.txt
@@ -1,5 +1,6 @@
-Version 1.5.1
+Version 1.6.0
German translation file, thanks to Sascha B�rk
+ If two movies or TV series have the same name, no submission
Version 1.5.0
Tokens stored under username and not a generic "tokensfile"
Version 1.4.1
View
27 default.py
@@ -10,7 +10,7 @@
__author__ = "Mathieu Feulvarch"
__copyright__ = "Copyright 2011, Mathieu Feulvarch "
__license__ = "GPL"
-__version__ = "1.5.1"
+__version__ = "1.6.0"
__maintainer__ = "Mathieu Feulvarch"
__email__ = "mathieu@feulvarch.fr"
__status__ = "Production"
@@ -34,6 +34,7 @@
#Now that we appended the directories, let's import
from gomiso import gomiso
+import shutil
def deleteAutostart():
# if os.path.exists(AUTOEXEC_FILE):
@@ -129,9 +130,7 @@ def percentageRemaining(currenttime, duration):
#Class instanciation and authentification with application key and secret
letsGo = gomiso()
-tokensFile = addon_work_folder + '/' + username
-xbmc.log("USername: " + username)
-xbmc.log("Token filename: " + tokensFile)
+
if letsGo.authentification('AgmVUNp8BgtTLQWElAnA', 'BL7xQH3Aeut68IWsOD6SGoUfsRqkC5t16jLg', username, password, tokensFile) == False:
xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', __language__(30921), 5000, __settings__.getAddonInfo("icon")))
else:
@@ -186,10 +185,14 @@ def percentageRemaining(currenttime, duration):
season = xbmc.getInfoLabel("VideoPlayer.Season")
episode = xbmc.getInfoLabel("VideoPlayer.Episode")
+ #If more than two entries, something is wrong
+ json_result = json.loads(letsGo.findMedia(showname, 'tv', 2))
+ #xbmc.log("**********")
#xbmc.log("Test TV show: " + showname + " " + season + " " + episode)
- #Retrieve only one entry but would be good to have a threshold level like if more than 20 entries, no submit
- json_result = json.loads(letsGo.findMedia(showname, 'tv', 1))
- if len(json_result) != 0:
+ #xbmc.log("Number of results: " + str(len(json_result)))
+ #xbmc.log("**********")
+ #raise SystemExit
+ if len(json_result) == 1:
letsGo.checking(json_result[0]['media']['id'], season, episode, displayMessage)
if verboseScreen:
xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', showname + ' S' + season + 'E' + episode + ' ' + __language__(30918), 5000, __settings__.getAddonInfo("icon")))
@@ -204,10 +207,14 @@ def percentageRemaining(currenttime, duration):
movieName = unicode(xbmc.getInfoLabel("VideoPlayer.Title"), errors="ignore")
movieName = movieName.replace(",", '')
+ #If more than two entries, something is wrong
+ json_result = json.loads(letsGo.findMedia(movieName, 'movie', 2))
+ #xbmc.log("**********")
#xbmc.log("Test movie: " + movieName)
- #Retrieve only one entry but would be good to have a threshold level like if more than 20 entries, no submit
- json_result = json.loads(letsGo.findMedia(movieName, 'movie', 1))
- if len(json_result) != 0:
+ #xbmc.log("Number of results: " + str(len(json_result)))
+ #xbmc.log("**********")
+ #raise SystemExit
+ if len(json_result) == 1:
letsGo.checking(json_result[0]['media']['id'], season, episode, 'watched on XBMC with gomiso addon')
if verboseScreen:
xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', movieName + ' ' + __language__(30918), 5000, __settings__.getAddonInfo("icon")))
View
2  resources/lib/_version.py
@@ -1,6 +1,6 @@
# This is the version of this source code.
-manual_verstr = "1.5.1"
+manual_verstr = "1.6.0"
Please sign in to comment.
Something went wrong with that request. Please try again.