Permalink
Browse files

Merge pull request #7 from cagnulein/master

Year Issue in titles.
Solved by Cagnulein
  • Loading branch information...
2 parents 586c2c2 + e4ffcf9 commit 0d95ac2d61c697cfe7304e98ad46469871efd709 @metabaron committed Apr 2, 2012
Showing with 12 additions and 2 deletions.
  1. +12 −2 default.py
View
@@ -190,9 +190,19 @@ def percentageRemaining(currenttime, duration):
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")))
- else:
+ elif (showname[-1]!=")"):
if verboseScreen:
xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', showname + ' S' + season + 'E' + episode + ' ' + __language__(30917), 5000, __settings__.getAddonInfo("icon")))
+ else:
+ #try stripping year from the title (es. "Castle (2009)")
+ json_result = json.loads(letsGo.findMedia(showname[:-7], 'tv', 1))
+ if len(json_result) != 0:
+ 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")))
+ else:
+ if verboseScreen:
+ 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:
@@ -210,4 +220,4 @@ def percentageRemaining(currenttime, duration):
else:
if verboseScreen:
xbmc.executebuiltin("XBMC.Notification(%s, %s, %i, %s)" % ('Gomiso', movieName + ' ' + __language__(30917), 5000, __settings__.getAddonInfo("icon")))
- checkedTitle = currentTitle
+ checkedTitle = currentTitle

0 comments on commit 0d95ac2

Please sign in to comment.