Skip to content

Commit

Permalink
Fixed tvshows with year in name, ex. Castle (2009).
Browse files Browse the repository at this point in the history
  • Loading branch information
amet committed Aug 18, 2011
1 parent 9543ba7 commit 5762461
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -6,9 +6,10 @@
# Credits to amet, Guilherme Jardim, and many more.
# mrto

import urllib2, re, string, xbmc, sys, os, time
import urllib2, re, string, xbmc, sys, os
from utilities import log, languageTranslate


_ = sys.modules[ "__main__" ].__language__

main_url = "http://napisy.me/search.php?str="
Expand Down Expand Up @@ -47,6 +48,12 @@ def search_subtitles( file_original_path, title, tvshow, year, season, episode,
subtitles_list = []
msg = ""
if len(tvshow) > 0:
for rok in re.finditer(' \(\d\d\d\d\)', tvshow):
rok = rok.group()
if len(rok) > 0:
tvshow = tvshow.replace(rok, "")
else:
continue
tvshow_plus = tvshow.replace(" ","+")
if len(season) < 2:
season_full = '0%s' % (season)
Expand Down

0 comments on commit 5762461

Please sign in to comment.