Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed hardcoded messages

Fixed the hardcoded messages thanks to all team from XBMC and mailing list.
Also updated version to reflex changes
  • Loading branch information...
commit 304bb5ceba8390832562d765db8021eecf96f3f3 1 parent f33eded
@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="0.1"
+ version="1.1"
provider-name="metabaron">
<requires>
<import addon="xbmc.python" version="1.0"/>
View
1  changelog.txt
@@ -1,2 +1,3 @@
+version 1.1 - Fixed the bug related to message hardcoded thanks to XBMC mailing list
Version 1.0
- initial public release
View
23 default.py
@@ -9,16 +9,15 @@
__author__ = "Mathieu Feulvarch"
__copyright__ = "Copyright 2011, Mathieu Feulvarch "
__license__ = "GPL"
-__version__ = "1.0"
+__version__ = "1.1"
__maintainer__ = "Mathieu Feulvarch"
__email__ = "mathieu@feulvarch.fr"
__status__ = "Production"
-__settings__ = xbmcaddon.Addon(id='script.gomiso')
+__scriptID__ = "script.gomiso"
+__settings__ = xbmcaddon.Addon(id=__scriptID__)
__language__ = __settings__.getLocalizedString
-_ = sys.modules[ "__main__" ].__language__
__cwd__ = __settings__.getAddonInfo('path')
-__scriptID__ = "script.gomiso"
BASE_RESOURCE_PATH = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'lib' ) )
LANGUAGE_RESOURCE_PATH = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'language' ) )
@@ -110,9 +109,7 @@ def percentageRemaining(currenttime, duration):
#Retrieving user information and display a message that authentification is ok
json_result = json.loads(letsGo.getUserInfo())
-#Facing a suddent strange problem with automatic language system, so hardcoding all strings until I found the reason (might be related to encoding from windows / github / linux (my systems)
-#xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', json_result['user']['username'] + " " + __language__(30916), 5000, __settings__.getAddonInfo("icon")))
-xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', json_result['user']['username'] + " connected", 5000, __settings__.getAddonInfo("icon")))
+xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', json_result['user']['username'] + " " + __language__(30916), 5000, __settings__.getAddonInfo("icon")))
videoThreshold = int(__settings__.getSetting( "VideoThreshold" ))
if videoThreshold == 0:
@@ -154,12 +151,10 @@ def percentageRemaining(currenttime, duration):
#letsGo.checking(json_result[0]['media']['id'], season, episode, __language__(30919))
letsGo.checking(json_result[0]['media']['id'], season, episode, "Watched on XBMC - Gomiso plugin")
if verboseScreen:
- #xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', showname + ' S' + season + 'E' + episode + ' ' + __language__(30918), 5000, __settings__.getAddonInfo("icon")))
- xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', showname + ' S' + season + 'E' + episode + ' submitted', 5000, __settings__.getAddonInfo("icon")))
+ xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', showname + ' S' + season + 'E' + episode + ' ' + __language__(30918), 5000, __settings__.getAddonInfo("icon")))
else:
if verboseScreen:
- #xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', showname + ' S' + season + 'E' + episode + ' ' + __language__(30917), 5000, __settings__.getAddonInfo("icon")))
- xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', showname + ' S' + season + 'E' + episode + ' not submitted', 5000, __settings__.getAddonInfo("icon")))
+ xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', showname + ' S' + season + 'E' + episode + ' ' + __language__(30917), 5000, __settings__.getAddonInfo("icon")))
checkedTitle = currentTitle
#Or are we watching a movie
elif len(xbmc.getInfoLabel("VideoPlayer.Title")) >= 1:
@@ -172,10 +167,8 @@ def percentageRemaining(currenttime, duration):
if len(json_result) != 0:
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")))
- xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', showname + ' S' + season + 'E' + episode + ' submitted', 5000, __settings__.getAddonInfo("icon")))
+ xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', movieName + ' ' + __language__(30918), 5000, __settings__.getAddonInfo("icon")))
else:
if verboseScreen:
- #xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', movieName + ' ' + __language__(30917), 5000, __settings__.getAddonInfo("icon")))
- xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', showname + ' S' + season + 'E' + episode + ' not submitted', 5000, __settings__.getAddonInfo("icon")))
+ xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', movieName + ' ' + __language__(30917), 5000, __settings__.getAddonInfo("icon")))
checkedTitle = currentTitle
View
4 resources/language/English/strings.xml
@@ -9,6 +9,6 @@
<string id="30916">Connected</string>
<string id="30917">Cannot submit</string>
<string id="30918">Submitted</string>
- <string id="30919">Watched on XBMC - Gomiso plugin</script>
- <string id="30920">Display submission message</script>
+ <string id="30919">Watched on XBMC - Gomiso plugin</string>
+ <string id="30920">Display submission message</string>
</strings>
View
20 resources/language/French/strings.xml
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
- <string id="30001">Options Générales</string>
- <string id="30013">Options d'envois des informations</string>
+ <string id="30901">Options Générales</string>
+ <string id="30913">Options d'envois des informations</string>
- <string id="30005">Nom d'utilisateur</string>
- <string id="30006">Mot de passe</string>
- <string id="30015">Soumettre les infos après XX%</string>
- <string id="30016">Connecté</string>
- <string id="30017">Impossible de soumettre</string>
- <string id="30018">Soumit</string>
- <string id="30019">Regardé sur XBMC (extension Gomiso)</script>
- <string id="30020">Afficher les messages quand soumit</script>
+ <string id="30905">Nom d'utilisateur</string>
+ <string id="30906">Mot de passe</string>
+ <string id="30915">Soumettre les infos après XX%</string>
+ <string id="30916">Connecté</string>
+ <string id="30917">Impossible de soumettre</string>
+ <string id="30918">Soumit</string>
+ <string id="30919">Regardé sur XBMC (extension Gomiso)</string>
+ <string id="30920">Afficher les messages quand soumit</string>
</strings>
View
12 resources/settings.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
- <setting type="lsep" label="General Settings" />
- <setting id="Username" type="text" label="Username" default="" />
- <setting id="Password" type="text" option="PAssword" label="30906" default="" />
+ <setting type="lsep" label="30901" />
+ <setting id="Username" type="text" label="30905" default="" />
+ <setting id="Password" type="text" option="password" label="30906" default="" />
- <setting type="lsep" label="Submission options" />
- <setting id="NotifyOnSubmit" type="bool" label="Display submission message" default="true" />
- <setting id="VideoThreshold" type="enum" label="Submit after watching XX%" values="25%|75%" default="1" />
+ <setting type="lsep" label="30913" />
+ <setting id="NotifyOnSubmit" type="bool" label="30920" default="true" />
+ <setting id="VideoThreshold" type="enum" label="30915" values="25%|75%" default="1" />
</settings>
Please sign in to comment.
Something went wrong with that request. Please try again.