Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Merge branch 'AnonTester-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jarmo committed Jan 12, 2020
2 parents 0ac0689 + 3451207 commit 97e0f20
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion addon.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="service.subtitles.subscene"
name="Subscene.com"
version="1.8.1"
version="1.8.2"
provider-name="jarmo">
<requires>
<import addon="xbmc.python" version="2.14.0"/>
Expand Down
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1.8.2
- Fix python 3 tv show subtitle search

1.8.1
- Kodi 19 / Python 3 compatibility
- Add line break after subtitle title and before subtitle comments
Expand Down
13 changes: 3 additions & 10 deletions service.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import xbmc
if sys.version_info.major == 3:
import urllib.request, urllib.parse, urllib.error
import html.parser
import html.parser as HTMLParser
else:
import urllib
import urllib2
Expand All @@ -20,7 +20,6 @@
import difflib
from operator import itemgetter


__addon__ = xbmcaddon.Addon()
__author__ = __addon__.getAddonInfo('author')
__scriptid__ = __addon__.getAddonInfo('id')
Expand Down Expand Up @@ -86,10 +85,7 @@ def rmtree(path):
def find_movie(content, title, year):
found_urls = {}
found_movies = []
if sys.version_info.major == 3:
h = html.parser.HTMLParser()
else:
h = HTMLParser.HTMLParser()
h = HTMLParser.HTMLParser()
for secmatches in re.finditer(search_section_pattern, content, re.IGNORECASE | re.DOTALL):
log(__name__, secmatches.group('section'))
for matches in re.finditer(movie_season_pattern, secmatches.group('content'), re.IGNORECASE | re.DOTALL):
Expand Down Expand Up @@ -234,10 +230,7 @@ def getallsubs(url, allowed_languages, filename="", episode=""):
return

subtitles = []
if sys.version_info.major == 3:
h = html.parser.HTMLParser()
else:
h = HTMLParser.HTMLParser()
h = HTMLParser.HTMLParser()
episode_regex = None
if episode != "":
episode_regex = re.compile(get_episode_pattern(episode), re.IGNORECASE)
Expand Down

0 comments on commit 97e0f20

Please sign in to comment.